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;
168 friend std::ostream &operator<<(std::ostream &o,
CellFormat const &form);
193 friend std::ostream &
operator<<(std::ostream &o,
KSEN const &ksen);
215 , 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:551
int m_valign
the vertical alignment
Definition: ClarisWksStyleManager.hxx:195
bool readGraphStyles(int N, int fSz)
read a GraphicStyle sequence
Definition: ClarisWksStyleManager.cxx:2638
int m_localStyleId
a local style id
Definition: ClarisWksStyleManager.hxx:240
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:243
#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:232
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
void setDefaultWallPaperList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:512
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:261
the KSEN structure a structure related to paragraph and cell style
Definition: ClarisWksStyleManager.hxx:182
@ Dash
Definition: libmwaw_internal.hxx:335
std::string m_extra
extra data
Definition: MWAWGraphicStyle.hxx:568
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:415
bool getPattern(int id, MWAWGraphicStyle::Pattern &pattern, float &percent) const
return the pattern which corresponds to an id.
Definition: ClarisWksStyleManager.cxx:1650
void setDefaultColorList(int version)
set the default color map
Definition: ClarisWksStyleManager.cxx:265
ClarisWksStyleManager(ClarisWksStyleManager const &orig)=delete
State()
constructor
Definition: ClarisWksStyleManager.cxx:204
float m_percent
the percentage
Definition: ClarisWksStyleManager.cxx:88
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:197
@ Simple
Definition: libmwaw_internal.hxx:335
std::ostream & operator<<(std::ostream &o, ClarisWksStyleManager::KSEN const &ksen)
Definition: ClarisWksStyleManager.cxx:1489
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
int m_type
the type
Definition: ClarisWksStyleManager.cxx:148
@ boldBit
Definition: MWAWFont.hxx:190
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:520
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:99
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
Pattern & operator=(Pattern const &)=default
std::vector< MWAWColor > m_colorList
a list colorId -> color
Definition: ClarisWksStyleManager.cxx:255
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
MWAWBox2i m_box
the center bdbox
Definition: ClarisWksStyleManager.cxx:158
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:1663
@ G_Linear
Definition: MWAWGraphicStyle.hxx:177
@ Simple
Definition: MWAWFont.hxx:49
@ None
Definition: libmwaw_internal.hxx:335
int m_ksenId
the ksen id
Definition: ClarisWksStyleManager.hxx:236
the structure to store the style in a ClarisWksStyleManager
Definition: ClarisWksStyleManager.hxx:207
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:251
Style()
constructor
Definition: ClarisWksStyleManager.hxx:209
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:363
std::string m_extra
extra data
Definition: ClarisWksStyleManager.hxx:244
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:514
Defines MWAWCell (cell content and format)
MWAWBorder::Type m_lineRepeat
the line repetition
Definition: ClarisWksStyleManager.hxx:199
@ G_Rectangular
Definition: MWAWGraphicStyle.hxx:177
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:277
Style
the line style
Definition: libmwaw_internal.hxx:335
int version() const
return the file version
Definition: ClarisWksStyleManager.cxx:1604
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
Pattern(Pattern const &)=default
Internal: the state of a ClarisWksStyleManager.
Definition: ClarisWksStyleManager.cxx:202
std::map< int, ClarisWksStyleManager::Style > m_stylesMap
the styles map id->style
Definition: ClarisWksStyleManager.cxx:241
int m_nameId
the style name id
Definition: ClarisWksStyleManager.hxx:234
@ shadowBit
Definition: MWAWFont.hxx:191
bool readStylesDef(int N, int fSz)
try to read the style definition zone
Definition: ClarisWksStyleManager.cxx:2073
std::vector< std::string > m_nameList
the style name list
Definition: ClarisWksStyleManager.cxx:253
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
bool get(int styleId, Style &style) const
return the style corresponding to a styleId
Definition: ClarisWksStyleManager.cxx:1668
void setDefaultGradientList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:353
std::vector< Pattern > m_patternList
a list patternId -> pattern
Definition: ClarisWksStyleManager.cxx:257
bool update(MWAWGraphicStyle &style) const
update the style
Definition: ClarisWksStyleManager.cxx:161
int m_graphicId
the graphic (checkme)
Definition: ClarisWksStyleManager.hxx:238
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:141
a border
Definition: libmwaw_internal.hxx:333
MWAWColor m_colors[4]
the color
Definition: ClarisWksStyleManager.cxx:152
void setDefaultPatternList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:327
bool readStyleNames(int N, int fSz)
read a STYL Name sequence
Definition: ClarisWksStyleManager.cxx:2513
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
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:245
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:83
bool readGradientList(long endPos=-1)
reads a gradient map zone ( v2)
Definition: ClarisWksStyleManager.cxx:1799
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:426
ClarisWksStyleManager(MWAWParserStatePtr const &parserState, ClarisWksDocument *document=nullptr)
constructor
Definition: ClarisWksStyleManager.cxx:1592
std::vector< ClarisWksStyleManager::CellFormat > m_cellFormatList
the list of format
Definition: ClarisWksStyleManager.cxx:247
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:2305
Pattern & operator=(Pattern &&)=default
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:1715
int m_version
the version
Definition: ClarisWksStyleManager.cxx:237
@ G_Axial
Definition: MWAWGraphicStyle.hxx:177
float m_decal
the decal
Definition: ClarisWksStyleManager.cxx:156
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
bool ok() const
check if the gradient is valid
Definition: ClarisWksStyleManager.cxx:110
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
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:516
int m_lines
an int used to add some oblique line ( or cross )
Definition: ClarisWksStyleManager.hxx:201
std::map< int, int > m_localFIdMap
a map local fontId->fontId
Definition: ClarisWksStyleManager.cxx:239
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:1872
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
bool readCellStyles(int N, int fSz)
Definition: ClarisWksStyleManager.cxx:2559
@ Double
Definition: libmwaw_internal.hxx:337
Pattern()
constructor
Definition: MWAWGraphicStyle.hxx:279
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:1970
Internal: the gradient of a ClarisWksStyleManager.
Definition: ClarisWksStyleManager.cxx:97
int m_cellFormatId
the formatId
Definition: ClarisWksStyleManager.hxx:228
Gradient m_gradient
the gradient
Definition: MWAWGraphicStyle.hxx:533
int m_numColors
the number of color
Definition: ClarisWksStyleManager.cxx:150
bool updateWallPaper(int wall, MWAWGraphicStyle &style) const
update a style using a wall paper id
Definition: ClarisWksStyleManager.cxx:1736
std::string m_extra
extra data
Definition: ClarisWksStyleManager.hxx:203
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
~Pattern() final
destructor
Definition: ClarisWksStyleManager.cxx:91
long m_dataSize
the data size
Definition: ClarisWksStruct.hxx:73
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
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:2175
@ LargeDot
Definition: libmwaw_internal.hxx:335
bool getRulerName(int id, std::string &name) const
return the name corresponding to a styleId
Definition: ClarisWksStyleManager.cxx:1610
friend std::ostream & operator<<(std::ostream &o, Gradient const &gr)
operator<<
Definition: ClarisWksStyleManager.cxx:117
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:229
std::vector< Gradient > m_gradientList
a list gradientId -> gradient
Definition: ClarisWksStyleManager.cxx:259
@ 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:1637
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:1758
bool readFontAndPos(int id, int &posC, MWAWFont &font)
try to read a font
Definition: ClarisWksStyleManager.cxx:2381
@ HALIGN_LEFT
Definition: MWAWCell.hxx:128
int m_rulerId
the ruler
Definition: ClarisWksStyleManager.hxx:230
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:154
@ G_Radial
Definition: MWAWGraphicStyle.hxx:177
bool readStyleFonts(int N, int fSz)
read a STYL_CHAR Font sequence
Definition: ClarisWksStyleManager.cxx:2484
int m_styleId
the style id
Definition: ClarisWksStyleManager.hxx:242
std::vector< MWAWGraphicStyle > m_graphList
the Graphic list
Definition: ClarisWksStyleManager.cxx:249
bool readStyles(MWAWEntry const &entry)
try to read the styles definition (in v4-6)
Definition: ClarisWksStyleManager.cxx:1921
ClarisWksDocument * m_document
the document
Definition: ClarisWksStyleManager.hxx:139
~ClarisWksStyleManager()
destructor
Definition: ClarisWksStyleManager.cxx:1600
@ HALIGN_RIGHT
Definition: MWAWCell.hxx:128
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
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:2731
int m_fontId
the char
Definition: ClarisWksStyleManager.hxx:226
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
std::vector< Stop > m_stopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:262
bool readLookUp(int N, int fSz)
try to read the lookup zone
Definition: ClarisWksStyleManager.cxx:2134
std::shared_ptr< ClarisWksText > getTextParser()
returns the text parser
Definition: ClarisWksDocument.hxx:164
KSEN()
constructor
Definition: ClarisWksStyleManager.hxx:184
@ HALIGN_CENTER
Definition: MWAWCell.hxx:128
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20