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;
167 friend std::ostream &operator<<(std::ostream &o,
CellFormat const &form);
192 friend std::ostream &
operator<<(std::ostream &o,
KSEN const &ksen);
214 , m_ksenId(-1), m_graphicId(-1)
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
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:549
int m_valign
the vertical alignment
Definition: ClarisWksStyleManager.hxx:194
bool readGraphStyles(int N, int fSz)
read a GraphicStyle sequence
Definition: ClarisWksStyleManager.cxx:2635
int m_localStyleId
a local style id
Definition: ClarisWksStyleManager.hxx:239
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
Definition: libmwaw_internal.hxx:337
std::map< int, int > m_lookupMap
the style lookupMap
Definition: ClarisWksStyleManager.cxx:241
#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:231
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:840
void setDefaultWallPaperList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:510
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:259
the KSEN structure a structure related to paragraph and cell style
Definition: ClarisWksStyleManager.hxx:181
Definition: libmwaw_internal.hxx:335
std::string m_extra
extra data
Definition: MWAWGraphicStyle.hxx:482
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:322
bool getPattern(int id, MWAWGraphicStyle::Pattern &pattern, float &percent) const
return the pattern which corresponds to an id.
Definition: ClarisWksStyleManager.cxx:1648
void setDefaultColorList(int version)
set the default color map
Definition: ClarisWksStyleManager.cxx:263
State()
constructor
Definition: ClarisWksStyleManager.cxx:202
float m_percent
the percentage
Definition: ClarisWksStyleManager.cxx:87
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:196
Definition: libmwaw_internal.hxx:335
GradientType m_gradientType
the gradient type
Definition: MWAWGraphicStyle.hxx:436
std::ostream & operator<<(std::ostream &o, ClarisWksStyleManager::KSEN const &ksen)
Definition: ClarisWksStyleManager.cxx:1487
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
int m_type
the type
Definition: ClarisWksStyleManager.cxx:147
Definition: MWAWFont.hxx:190
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:427
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:98
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:253
MWAWBox2i m_box
the center bdbox
Definition: ClarisWksStyleManager.cxx:157
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:1661
Definition: MWAWFont.hxx:49
Definition: libmwaw_internal.hxx:335
int m_ksenId
the ksen id
Definition: ClarisWksStyleManager.hxx:235
the structure to store the style in a ClarisWksStyleManager
Definition: ClarisWksStyleManager.hxx:206
main document information used to create a ClarisWorks file
Definition: ClarisWksDocument.hxx:73
std::vector< ClarisWksStyleManager::KSEN > m_ksenList
the KSEN list
Definition: ClarisWksStyleManager.cxx:249
Style()
constructor
Definition: ClarisWksStyleManager.hxx:208
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:47
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:265
const std::string & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:136
std::string m_extra
extra data
Definition: ClarisWksStyleManager.hxx:243
std::vector< GradientStop > m_gradientStopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:442
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
Definition: MWAWFont.hxx:190
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:421
MWAWBorder::Type m_lineRepeat
the line repetition
Definition: ClarisWksStyleManager.hxx:198
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:1602
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:200
std::map< int, ClarisWksStyleManager::Style > m_stylesMap
the styles map id->style
Definition: ClarisWksStyleManager.cxx:239
int m_nameId
the style name id
Definition: ClarisWksStyleManager.hxx:233
Definition: MWAWFont.hxx:191
bool readStylesDef(int N, int fSz)
try to read the style definition zone
Definition: ClarisWksStyleManager.cxx:2070
std::vector< std::string > m_nameList
the style name list
Definition: ClarisWksStyleManager.cxx:251
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:415
bool get(int styleId, Style &style) const
return the style corresponding to a styleId
Definition: ClarisWksStyleManager.cxx:1666
void setDefaultGradientList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:351
std::vector< Pattern > m_patternList
a list patternId -> pattern
Definition: ClarisWksStyleManager.cxx:255
Definition: MWAWGraphicStyle.hxx:55
bool update(MWAWGraphicStyle &style) const
update the style
Definition: ClarisWksStyleManager.cxx:160
int m_graphicId
the graphic (checkme)
Definition: ClarisWksStyleManager.hxx:237
a border
Definition: libmwaw_internal.hxx:333
MWAWColor m_colors[4]
the color
Definition: ClarisWksStyleManager.cxx:151
void setDefaultPatternList(int version)
set the default pattern map
Definition: ClarisWksStyleManager.cxx:325
bool readStyleNames(int N, int fSz)
read a STYL Name sequence
Definition: ClarisWksStyleManager.cxx:2510
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:260
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:92
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:243
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:82
bool readGradientList(long endPos=-1)
reads a gradient map zone ( v2)
Definition: ClarisWksStyleManager.cxx:1796
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:333
ClarisWksStyleManager(MWAWParserStatePtr const &parserState, ClarisWksDocument *document=nullptr)
constructor
Definition: ClarisWksStyleManager.cxx:1590
std::vector< ClarisWksStyleManager::CellFormat > m_cellFormatList
the list of format
Definition: ClarisWksStyleManager.cxx:245
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:2302
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:1713
int m_version
the version
Definition: ClarisWksStyleManager.cxx:235
float m_decal
the decal
Definition: ClarisWksStyleManager.cxx:155
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:263
bool ok() const
check if the gradient is valid
Definition: ClarisWksStyleManager.cxx:109
long end() const
returns the end offset
Definition: MWAWEntry.hxx:87
a structure to store the style list and the lookup zone
Definition: ClarisWksStyleManager.hxx:60
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:423
int m_lines
an int used to add some oblique line ( or cross )
Definition: ClarisWksStyleManager.hxx:200
std::map< int, int > m_localFIdMap
a map local fontId->fontId
Definition: ClarisWksStyleManager.cxx:237
Internal: the structures of a ClarisWksStyleManagerInternal.
Definition: ClarisWksStyleManager.cxx:52
bool readColorList(MWAWEntry const &entry)
reads a color map zone ( v4-v6)
Definition: ClarisWksStyleManager.cxx:1869
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1189
bool readCellStyles(int N, int fSz)
Definition: ClarisWksStyleManager.cxx:2556
Definition: libmwaw_internal.hxx:337
Pattern()
constructor
Definition: MWAWGraphicStyle.hxx:182
long m_size
the size of the DSET header
Definition: ClarisWksStruct.hxx:69
Definition: MWAWFont.hxx:190
bool readGenStyle(int id)
try to read a STYL_ subzone (in v4-6)
Definition: ClarisWksStyleManager.cxx:1967
Internal: the gradient of a ClarisWksStyleManager.
Definition: ClarisWksStyleManager.cxx:96
int m_cellFormatId
the formatId
Definition: ClarisWksStyleManager.hxx:227
int m_numColors
the number of color
Definition: ClarisWksStyleManager.cxx:149
bool updateWallPaper(int wall, MWAWGraphicStyle &style) const
update a style using a wall paper id
Definition: ClarisWksStyleManager.cxx:1733
std::string m_extra
extra data
Definition: ClarisWksStyleManager.hxx:202
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:555
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
~Pattern() final
destructor
Definition: ClarisWksStyleManager.cxx:90
long m_dataSize
the data size
Definition: ClarisWksStruct.hxx:73
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:98
MWAWVec2f m_gradientPercentCenter
the gradient center
Definition: MWAWGraphicStyle.hxx:448
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:2172
Definition: libmwaw_internal.hxx:335
bool getRulerName(int id, std::string &name) const
return the name corresponding to a styleId
Definition: ClarisWksStyleManager.cxx:1608
friend std::ostream & operator<<(std::ostream &o, Gradient const &gr)
operator<<
Definition: ClarisWksStyleManager.cxx:116
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
int getFontId(int localId) const
return a mac font id corresponding to a local id
Definition: ClarisWksStyleManager.cxx:227
std::vector< Gradient > m_gradientList
a list gradientId -> gradient
Definition: ClarisWksStyleManager.cxx:257
Definition: MWAWFont.hxx:51
bool getColor(int id, MWAWColor &col) const
return the color which corresponds to an id (if possible)
Definition: ClarisWksStyleManager.cxx:1635
float m_gradientAngle
the gradient angle
Definition: MWAWGraphicStyle.hxx:444
a basic structure
Definition: ClarisWksStruct.hxx:53
Definition: libmwaw_internal.hxx:337
bool readPatternList(long endPos=-1)
reads a pattern map zone ( v2)
Definition: ClarisWksStyleManager.cxx:1755
bool readFontAndPos(int id, int &posC, MWAWFont &font)
try to read a font
Definition: ClarisWksStyleManager.cxx:2378
Definition: MWAWCell.hxx:127
int m_rulerId
the ruler
Definition: ClarisWksStyleManager.hxx:229
Class to store font.
Definition: MWAWFont.hxx:43
a structure used to define a cell and its format
Definition: MWAWCell.hxx:52
int m_angle
the angle
Definition: ClarisWksStyleManager.cxx:153
bool readStyleFonts(int N, int fSz)
read a STYL_CHAR Font sequence
Definition: ClarisWksStyleManager.cxx:2481
int m_styleId
the style id
Definition: ClarisWksStyleManager.hxx:241
std::vector< MWAWGraphicStyle > m_graphList
the Graphic list
Definition: ClarisWksStyleManager.cxx:247
bool readStyles(MWAWEntry const &entry)
try to read the styles definition (in v4-6)
Definition: ClarisWksStyleManager.cxx:1918
ClarisWksDocument * m_document
the document
Definition: ClarisWksStyleManager.hxx:139
~ClarisWksStyleManager()
destructor
Definition: ClarisWksStyleManager.cxx:1598
Definition: MWAWCell.hxx:127
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:836
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:2728
int m_fontId
the char
Definition: ClarisWksStyleManager.hxx:225
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:2131
std::shared_ptr< ClarisWksText > getTextParser()
returns the text parser
Definition: ClarisWksDocument.hxx:164
KSEN()
constructor
Definition: ClarisWksStyleManager.hxx:183
Definition: MWAWCell.hxx:127
Definition: MWAWGraphicStyle.hxx:55
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Mon May 13 2019 06:38:57 for libmwaw by
doxygen 1.8.16