Go to the documentation of this file.
38 #ifndef CLARIS_WKS_STYLE_MANAGER
39 # define CLARIS_WKS_STYLE_MANAGER
97 bool get(
int styleId,
Style &style)
const;
103 bool get(
int ksenId,
KSEN &ksen)
const;
141 shared_ptr<ClarisWksStyleManagerInternal::State>
m_state;
178 friend std::ostream &
operator<<(std::ostream &o,
KSEN const &ksen);
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
shared_ptr< ClarisWksStyleManagerInternal::State > m_state
the state
Definition: ClarisWksStyleManager.hxx:141
bool getUniqueColor(MWAWColor &col) const
check if the pattern has only one color; if so returns true...
Definition: MWAWGraphicStyle.cxx:86
int m_valign
the vertical alignment
Definition: ClarisWksStyleManager.hxx:180
bool readGraphStyles(int N, int fSz)
read a GraphicStyle sequence
Definition: ClarisWksStyleManager.cxx:2570
int m_localStyleId
a local style id
Definition: ClarisWksStyleManager.hxx:216
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:453
@ Triple
Definition: libmwaw_internal.hxx:318
std::map< int, int > m_lookupMap
the style lookupMap
Definition: ClarisWksStyleManager.cxx:222
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
int m_rulerPId
the ruler parent id ( or maybe the style parent)
Definition: ClarisWksStyleManager.hxx:208
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
void setDefaultWallPaperList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:491
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
std::vector< MWAWGraphicStyle::Pattern > m_wallpaperList
a list wallPaperId -> pattern
Definition: ClarisWksStyleManager.cxx:240
virtual ~Pattern()
destructor
Definition: ClarisWksStyleManager.cxx:86
the KSEN structure a structure related to paragraph and cell style
Definition: ClarisWksStyleManager.hxx:172
@ Dash
Definition: libmwaw_internal.hxx:316
std::string m_extra
extra data
Definition: MWAWGraphicStyle.hxx:442
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:282
bool getPattern(int id, MWAWGraphicStyle::Pattern &pattern, float &percent) const
return the pattern which corresponds to an id.
Definition: ClarisWksStyleManager.cxx:1627
void setDefaultColorList(int version)
set the default color map
Definition: ClarisWksStyleManager.cxx:244
ClarisWksStyleManager(MWAWParserStatePtr parserState, ClarisWksDocument *document=0)
constructor
Definition: ClarisWksStyleManager.cxx:1571
State()
constructor
Definition: ClarisWksStyleManager.cxx:194
float m_percent
the percentage
Definition: ClarisWksStyleManager.cxx:83
void checkOrdering(std::vector< int16_t > &vec16, std::vector< int32_t > &vec32) const
small fonction used to check unusual endian ordering of a list of int16_t, int32_t
Definition: ClarisWksDocument.cxx:356
MWAWBorder::Style m_lineType
the line type
Definition: ClarisWksStyleManager.hxx:182
@ Simple
Definition: libmwaw_internal.hxx:316
GradientType m_gradientType
the gradient type
Definition: MWAWGraphicStyle.hxx:396
std::ostream & operator<<(std::ostream &o, ClarisWksStyleManager::KSEN const &ksen)
Definition: ClarisWksStyleManager.cxx:1468
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:117
int m_type
the type
Definition: ClarisWksStyleManager.cxx:139
@ boldBit
Definition: MWAWFont.hxx:182
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:387
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
Gradient(int type=0, int nColor=0, int angle=0, float decal=0)
construtor
Definition: ClarisWksStyleManager.cxx:94
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
std::vector< MWAWColor > m_colorList
a list colorId -> color
Definition: ClarisWksStyleManager.cxx:234
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
MWAWBox2i m_box
the center bdbox
Definition: ClarisWksStyleManager.cxx:149
@ G_Rectangular
Definition: MWAWGraphicStyle.hxx:55
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
int getFontId(int localId) const
return a mac font id corresponding to a local id
Definition: ClarisWksStyleManager.cxx:1640
@ Simple
Definition: MWAWFont.hxx:49
@ None
Definition: libmwaw_internal.hxx:316
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:509
int m_ksenId
the ksen id
Definition: ClarisWksStyleManager.hxx:212
the structure to store the style in a ClarisWksStyleManager
Definition: ClarisWksStyleManager.hxx:192
main document information used to create a ClarisWorks file
Definition: ClarisWksDocument.hxx:74
std::vector< ClarisWksStyleManager::KSEN > m_ksenList
the KSEN list
Definition: ClarisWksStyleManager.cxx:230
Style()
constructor
Definition: ClarisWksStyleManager.hxx:194
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:271
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
@ Dot
Definition: libmwaw_internal.hxx:316
Type
the line repetition
Definition: libmwaw_internal.hxx:318
std::vector< unsigned char > m_data
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1],...
Definition: MWAWGraphicStyle.hxx:247
std::string m_extra
extra data
Definition: ClarisWksStyleManager.hxx:220
std::vector< GradientStop > m_gradientStopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:402
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:127
@ embossBit
Definition: MWAWFont.hxx:182
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:381
MWAWBorder::Type m_lineRepeat
the line repetition
Definition: ClarisWksStyleManager.hxx:184
ClarisWksStyleManager & operator=(ClarisWksStyleManager const &orig)
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:406
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:171
Style
the line style
Definition: libmwaw_internal.hxx:316
int version() const
return the file version
Definition: ClarisWksStyleManager.cxx:1581
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:205
Internal: the state of a ClarisWksStyleManager.
Definition: ClarisWksStyleManager.cxx:192
std::map< int, ClarisWksStyleManager::Style > m_stylesMap
the styles map id->style
Definition: ClarisWksStyleManager.cxx:220
ClarisWksStyleManager(ClarisWksStyleManager const &orig)
int m_nameId
the style name id
Definition: ClarisWksStyleManager.hxx:210
@ shadowBit
Definition: MWAWFont.hxx:183
bool readStylesDef(int N, int fSz)
try to read the style definition zone
Definition: ClarisWksStyleManager.cxx:2085
std::vector< std::string > m_nameList
the style name list
Definition: ClarisWksStyleManager.cxx:232
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:375
bool get(int styleId, Style &style) const
return the style corresponding to a styleId
Definition: ClarisWksStyleManager.cxx:1645
void setDefaultGradientList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:332
std::vector< Pattern > m_patternList
a list patternId -> pattern
Definition: ClarisWksStyleManager.cxx:236
@ G_Radial
Definition: MWAWGraphicStyle.hxx:55
bool update(MWAWGraphicStyle &style) const
update the style
Definition: ClarisWksStyleManager.cxx:152
int m_graphicId
the graphic (checkme)
Definition: ClarisWksStyleManager.hxx:214
a border
Definition: libmwaw_internal.hxx:314
MWAWColor m_colors[4]
the color
Definition: ClarisWksStyleManager.cxx:143
void setDefaultPatternList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:306
bool readStyleNames(int N, int fSz)
read a STYL Name sequence
Definition: ClarisWksStyleManager.cxx:2445
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:242
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
std::vector< MWAWFont > m_fontList
the list of fonts
Definition: ClarisWksStyleManager.cxx:224
MWAWParserStatePtr m_parserState
the parser state
Definition: ClarisWksStyleManager.hxx:139
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
bool readGradientList(long endPos=-1)
reads a gradient map zone ( v2)
Definition: ClarisWksStyleManager.cxx:1794
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:293
std::vector< ClarisWksStyleManager::CellFormat > m_cellFormatList
the list of format
Definition: ClarisWksStyleManager.cxx:226
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
bool readFont(int id, int fontSize, MWAWFont &font)
try to read a named font
Definition: ClarisWksStyleManager.cxx:2340
@ G_Linear
Definition: MWAWGraphicStyle.hxx:55
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:134
Pattern(uint16_t const *pat=0)
constructor ( 4 int by patterns )
Definition: ClarisWksStyleManager.cxx:58
static Script sub()
return a yposition which correspond to a basic subscript
Definition: MWAWFont.hxx:112
bool updateGradient(int grad, MWAWGraphicStyle &style) const
update a style using a gradiant id
Definition: ClarisWksStyleManager.cxx:1692
int m_version
the version
Definition: ClarisWksStyleManager.cxx:216
float m_decal
the decal
Definition: ClarisWksStyleManager.cxx:147
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:245
bool ok() const
check if the gradient is valid
Definition: ClarisWksStyleManager.cxx:101
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
a structure to store the style list and the lookup zone
Definition: ClarisWksStyleManager.hxx:61
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:383
int m_lines
an int used to add some oblique line ( or cross )
Definition: ClarisWksStyleManager.hxx:186
std::map< int, int > m_localFIdMap
a map local fontId->fontId
Definition: ClarisWksStyleManager.cxx:218
Internal: the structures of a ClarisWksStyleManagerInternal.
Definition: ClarisWksStyleManager.cxx:53
bool readColorList(MWAWEntry const &entry)
reads a color map zone ( v4-v6)
Definition: ClarisWksStyleManager.cxx:1883
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1132
bool readCellStyles(int N, int fSz)
Definition: ClarisWksStyleManager.cxx:2491
@ Double
Definition: libmwaw_internal.hxx:318
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1013
@ italicBit
Definition: MWAWFont.hxx:182
bool readGenStyle(int id)
try to read a STYL_ subzone (in v4-6)
Definition: ClarisWksStyleManager.cxx:1981
Internal: the gradient of a ClarisWksStyleManager.
Definition: ClarisWksStyleManager.cxx:92
friend std::ostream & operator<<(std::ostream &o, KSEN const &ksen)
operator<<
Definition: ClarisWksStyleManager.cxx:1468
int m_cellFormatId
the formatId
Definition: ClarisWksStyleManager.hxx:204
int m_numColors
the number of color
Definition: ClarisWksStyleManager.cxx:141
bool updateWallPaper(int wall, MWAWGraphicStyle &style) const
update a style using a wall paper id
Definition: ClarisWksStyleManager.cxx:1712
std::string m_extra
extra data
Definition: ClarisWksStyleManager.hxx:188
shared_ptr< ClarisWksText > getTextParser()
returns the text parser
Definition: ClarisWksDocument.hxx:162
HorizontalAlignment
the default horizontal alignment.
Definition: MWAWCell.hxx:116
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
MWAWVec2f m_gradientPercentCenter
the gradient center
Definition: MWAWGraphicStyle.hxx:408
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:122
Internal: the pattern of a ClarisWksStyleManager.
Definition: ClarisWksStyleManager.cxx:56
bool readFontNames()
read the font name style zone (method to store font names in v2/v3 files)
Definition: ClarisWksStyleManager.cxx:2187
@ LargeDot
Definition: libmwaw_internal.hxx:316
bool getRulerName(int id, std::string &name) const
return the name corresponding to a styleId
Definition: ClarisWksStyleManager.cxx:1587
friend std::ostream & operator<<(std::ostream &o, Gradient const &gr)
operator<<
Definition: ClarisWksStyleManager.cxx:108
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
int getFontId(int localId) const
return a mac font id corresponding to a local id
Definition: ClarisWksStyleManager.cxx:208
std::vector< Gradient > m_gradientList
a list gradientId -> gradient
Definition: ClarisWksStyleManager.cxx:238
@ Double
Definition: MWAWFont.hxx:51
bool getColor(int id, MWAWColor &col) const
return the color which corresponds to an id (if possible)
Definition: ClarisWksStyleManager.cxx:1614
float m_gradientAngle
the gradient angle
Definition: MWAWGraphicStyle.hxx:404
@ Single
Definition: libmwaw_internal.hxx:318
bool readPatternList(long endPos=-1)
reads a pattern map zone ( v2)
Definition: ClarisWksStyleManager.cxx:1734
friend std::ostream & operator<<(std::ostream &o, Style const &style)
operator<<
Definition: ClarisWksStyleManager.cxx:1542
@ HALIGN_LEFT
Definition: MWAWCell.hxx:116
int m_rulerId
the ruler
Definition: ClarisWksStyleManager.hxx:206
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
int m_angle
the angle
Definition: ClarisWksStyleManager.cxx:145
bool readStyleFonts(int N, int fSz)
read a STYL_CHAR Font sequence
Definition: ClarisWksStyleManager.cxx:2416
int m_styleId
the style id
Definition: ClarisWksStyleManager.hxx:218
std::vector< MWAWGraphicStyle > m_graphList
the Graphic list
Definition: ClarisWksStyleManager.cxx:228
bool readStyles(MWAWEntry const &entry)
try to read the styles definition (in v4-6)
Definition: ClarisWksStyleManager.cxx:1932
ClarisWksDocument * m_document
the document
Definition: ClarisWksStyleManager.hxx:137
~ClarisWksStyleManager()
destructor
Definition: ClarisWksStyleManager.cxx:1577
@ HALIGN_RIGHT
Definition: MWAWCell.hxx:116
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
bool readKSEN(int N, int fSz)
read a KSEN sequence
Definition: ClarisWksStyleManager.cxx:2664
int m_fontId
the char
Definition: ClarisWksStyleManager.hxx:202
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:445
bool readLookUp(int N, int fSz)
try to read the lookup zone
Definition: ClarisWksStyleManager.cxx:2146
KSEN()
constructor
Definition: ClarisWksStyleManager.hxx:174
@ HALIGN_CENTER
Definition: MWAWCell.hxx:116
@ G_Axial
Definition: MWAWGraphicStyle.hxx:55
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
Generated on Wed Jun 17 2020 06:30:09 for libmwaw by
doxygen 1.8.18