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;
143 std::shared_ptr<ClarisWksStyleManagerInternal::State>
m_state;
165 friend std::ostream &operator<<(std::ostream &o,
CellFormat const &form);
190 friend std::ostream &
operator<<(std::ostream &o,
KSEN const &ksen);
212 , m_ksenId(-1), m_graphicId(-1)
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
bool getUniqueColor(MWAWColor &col) const
check if the pattern has only one color; if so returns true...
Definition: MWAWGraphicStyle.cxx:86
Pattern(uint16_t const *pat=nullptr)
constructor ( 4 int by patterns )
Definition: ClarisWksStyleManager.cxx:58
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:547
int m_valign
the vertical alignment
Definition: ClarisWksStyleManager.hxx:192
bool readGraphStyles(int N, int fSz)
read a GraphicStyle sequence
Definition: ClarisWksStyleManager.cxx:2633
int m_localStyleId
a local style id
Definition: ClarisWksStyleManager.hxx:237
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:474
@ Triple
Definition: libmwaw_internal.hxx:337
std::map< int, int > m_lookupMap
the style lookupMap
Definition: ClarisWksStyleManager.cxx:239
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
int m_rulerPId
the ruler parent id ( or maybe the style parent)
Definition: ClarisWksStyleManager.hxx:229
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:838
void setDefaultWallPaperList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:508
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:257
the KSEN structure a structure related to paragraph and cell style
Definition: ClarisWksStyleManager.hxx:179
@ Dash
Definition: libmwaw_internal.hxx:335
std::string m_extra
extra data
Definition: MWAWGraphicStyle.hxx:478
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:318
bool getPattern(int id, MWAWGraphicStyle::Pattern &pattern, float &percent) const
return the pattern which corresponds to an id.
Definition: ClarisWksStyleManager.cxx:1646
void setDefaultColorList(int version)
set the default color map
Definition: ClarisWksStyleManager.cxx:261
ClarisWksStyleManager(ClarisWksStyleManager const &orig)=delete
State()
constructor
Definition: ClarisWksStyleManager.cxx:200
float m_percent
the percentage
Definition: ClarisWksStyleManager.cxx:85
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:376
MWAWBorder::Style m_lineType
the line type
Definition: ClarisWksStyleManager.hxx:194
@ Simple
Definition: libmwaw_internal.hxx:335
GradientType m_gradientType
the gradient type
Definition: MWAWGraphicStyle.hxx:432
std::ostream & operator<<(std::ostream &o, ClarisWksStyleManager::KSEN const &ksen)
Definition: ClarisWksStyleManager.cxx:1485
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
int m_type
the type
Definition: ClarisWksStyleManager.cxx:145
@ boldBit
Definition: MWAWFont.hxx:190
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:423
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
Gradient(int type=0, int nColor=0, int angle=0, float decal=0)
construtor
Definition: ClarisWksStyleManager.cxx:96
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
std::vector< MWAWColor > m_colorList
a list colorId -> color
Definition: ClarisWksStyleManager.cxx:251
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:135
MWAWBox2i m_box
the center bdbox
Definition: ClarisWksStyleManager.cxx:155
@ 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:1659
@ Simple
Definition: MWAWFont.hxx:49
@ None
Definition: libmwaw_internal.hxx:335
int m_ksenId
the ksen id
Definition: ClarisWksStyleManager.hxx:233
the structure to store the style in a ClarisWksStyleManager
Definition: ClarisWksStyleManager.hxx:204
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:247
Style()
constructor
Definition: ClarisWksStyleManager.hxx:206
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:292
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
@ Dot
Definition: libmwaw_internal.hxx:335
Type
the line repetition
Definition: libmwaw_internal.hxx:337
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:263
std::string m_extra
extra data
Definition: ClarisWksStyleManager.hxx:241
std::vector< GradientStop > m_gradientStopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:438
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
@ embossBit
Definition: MWAWFont.hxx:190
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:417
Defines MWAWCell (cell content and format)
MWAWBorder::Type m_lineRepeat
the line repetition
Definition: ClarisWksStyleManager.hxx:196
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:427
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:180
Style
the line style
Definition: libmwaw_internal.hxx:335
int version() const
return the file version
Definition: ClarisWksStyleManager.cxx:1600
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
ClarisWksStyleManager & operator=(ClarisWksStyleManager const &orig)=delete
Internal: the state of a ClarisWksStyleManager.
Definition: ClarisWksStyleManager.cxx:198
std::map< int, ClarisWksStyleManager::Style > m_stylesMap
the styles map id->style
Definition: ClarisWksStyleManager.cxx:237
int m_nameId
the style name id
Definition: ClarisWksStyleManager.hxx:231
@ shadowBit
Definition: MWAWFont.hxx:191
bool readStylesDef(int N, int fSz)
try to read the style definition zone
Definition: ClarisWksStyleManager.cxx:2068
std::vector< std::string > m_nameList
the style name list
Definition: ClarisWksStyleManager.cxx:249
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:411
bool get(int styleId, Style &style) const
return the style corresponding to a styleId
Definition: ClarisWksStyleManager.cxx:1664
void setDefaultGradientList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:349
std::vector< Pattern > m_patternList
a list patternId -> pattern
Definition: ClarisWksStyleManager.cxx:253
@ G_Radial
Definition: MWAWGraphicStyle.hxx:55
bool update(MWAWGraphicStyle &style) const
update the style
Definition: ClarisWksStyleManager.cxx:158
int m_graphicId
the graphic (checkme)
Definition: ClarisWksStyleManager.hxx:235
a border
Definition: libmwaw_internal.hxx:333
MWAWColor m_colors[4]
the color
Definition: ClarisWksStyleManager.cxx:149
void setDefaultPatternList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:323
bool readStyleNames(int N, int fSz)
read a STYL Name sequence
Definition: ClarisWksStyleManager.cxx:2508
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:258
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:91
bool readHeader(MWAWInputStreamPtr input, bool strict=false)
try to read the header
Definition: ClarisWksStruct.cxx:72
std::vector< MWAWFont > m_fontList
the list of fonts
Definition: ClarisWksStyleManager.cxx:241
MWAWParserStatePtr m_parserState
the parser state
Definition: ClarisWksStyleManager.hxx:141
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:81
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:329
ClarisWksStyleManager(MWAWParserStatePtr const &parserState, ClarisWksDocument *document=nullptr)
constructor
Definition: ClarisWksStyleManager.cxx:1588
std::vector< ClarisWksStyleManager::CellFormat > m_cellFormatList
the list of format
Definition: ClarisWksStyleManager.cxx:243
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
bool readFont(int id, int fontSize, MWAWFont &font)
try to read a named font
Definition: ClarisWksStyleManager.cxx:2300
@ G_Linear
Definition: MWAWGraphicStyle.hxx:55
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:141
static Script sub()
return a yposition which correspond to a basic subscript
Definition: MWAWFont.hxx:120
bool updateGradient(int grad, MWAWGraphicStyle &style) const
update a style using a gradiant id
Definition: ClarisWksStyleManager.cxx:1711
int m_version
the version
Definition: ClarisWksStyleManager.cxx:233
float m_decal
the decal
Definition: ClarisWksStyleManager.cxx:153
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:261
bool ok() const
check if the gradient is valid
Definition: ClarisWksStyleManager.cxx:107
long end() const
returns the end offset
Definition: MWAWEntry.hxx:86
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:275
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:419
int m_lines
an int used to add some oblique line ( or cross )
Definition: ClarisWksStyleManager.hxx:198
std::map< int, int > m_localFIdMap
a map local fontId->fontId
Definition: ClarisWksStyleManager.cxx:235
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:1867
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1187
bool readCellStyles(int N, int fSz)
Definition: ClarisWksStyleManager.cxx:2554
@ Double
Definition: libmwaw_internal.hxx:337
Pattern()
constructor
Definition: MWAWGraphicStyle.hxx:182
long m_size
the size of the DSET header
Definition: ClarisWksStruct.hxx:69
@ italicBit
Definition: MWAWFont.hxx:190
bool readGenStyle(int id)
try to read a STYL_ subzone (in v4-6)
Definition: ClarisWksStyleManager.cxx:1965
Internal: the gradient of a ClarisWksStyleManager.
Definition: ClarisWksStyleManager.cxx:94
int m_cellFormatId
the formatId
Definition: ClarisWksStyleManager.hxx:225
int m_numColors
the number of color
Definition: ClarisWksStyleManager.cxx:147
bool updateWallPaper(int wall, MWAWGraphicStyle &style) const
update a style using a wall paper id
Definition: ClarisWksStyleManager.cxx:1731
std::string m_extra
extra data
Definition: ClarisWksStyleManager.hxx:200
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:553
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
~Pattern() final
destructor
Definition: ClarisWksStyleManager.cxx:88
long m_dataSize
the data size
Definition: ClarisWksStruct.hxx:73
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:97
MWAWVec2f m_gradientPercentCenter
the gradient center
Definition: MWAWGraphicStyle.hxx:444
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:130
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:2170
@ LargeDot
Definition: libmwaw_internal.hxx:335
bool getRulerName(int id, std::string &name) const
return the name corresponding to a styleId
Definition: ClarisWksStyleManager.cxx:1606
friend std::ostream & operator<<(std::ostream &o, Gradient const &gr)
operator<<
Definition: ClarisWksStyleManager.cxx:114
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:225
std::vector< Gradient > m_gradientList
a list gradientId -> gradient
Definition: ClarisWksStyleManager.cxx:255
@ 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:1633
float m_gradientAngle
the gradient angle
Definition: MWAWGraphicStyle.hxx:440
a basic structure
Definition: ClarisWksStruct.hxx:53
@ Single
Definition: libmwaw_internal.hxx:337
bool readPatternList(long endPos=-1)
reads a pattern map zone ( v2)
Definition: ClarisWksStyleManager.cxx:1753
bool readFontAndPos(int id, int &posC, MWAWFont &font)
try to read a font
Definition: ClarisWksStyleManager.cxx:2376
@ HALIGN_LEFT
Definition: MWAWCell.hxx:125
int m_rulerId
the ruler
Definition: ClarisWksStyleManager.hxx:227
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:151
bool readStyleFonts(int N, int fSz)
read a STYL_CHAR Font sequence
Definition: ClarisWksStyleManager.cxx:2479
int m_styleId
the style id
Definition: ClarisWksStyleManager.hxx:239
std::vector< MWAWGraphicStyle > m_graphList
the Graphic list
Definition: ClarisWksStyleManager.cxx:245
bool readStyles(MWAWEntry const &entry)
try to read the styles definition (in v4-6)
Definition: ClarisWksStyleManager.cxx:1916
ClarisWksDocument * m_document
the document
Definition: ClarisWksStyleManager.hxx:139
~ClarisWksStyleManager()
destructor
Definition: ClarisWksStyleManager.cxx:1596
@ HALIGN_RIGHT
Definition: MWAWCell.hxx:125
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:834
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
std::shared_ptr< ClarisWksStyleManagerInternal::State > m_state
the state
Definition: ClarisWksStyleManager.hxx:143
bool readKSEN(int N, int fSz)
read a KSEN sequence
Definition: ClarisWksStyleManager.cxx:2726
int m_fontId
the char
Definition: ClarisWksStyleManager.hxx:223
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
bool readLookUp(int N, int fSz)
try to read the lookup zone
Definition: ClarisWksStyleManager.cxx:2129
std::shared_ptr< ClarisWksText > getTextParser()
returns the text parser
Definition: ClarisWksDocument.hxx:164
KSEN()
constructor
Definition: ClarisWksStyleManager.hxx:181
@ HALIGN_CENTER
Definition: MWAWCell.hxx:125
@ G_Axial
Definition: MWAWGraphicStyle.hxx:55
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Tue Apr 24 2018 22:55:11 for libmwaw by
doxygen 1.8.20