a structure to store the style list and the lookup zone More...
#include <CWStyleManager.hxx>
Classes | |
struct | CellFormat |
the CELL structure a structure related to number/date format More... | |
struct | KSEN |
the KSEN structure a structure related to paragraph and cell style More... | |
struct | Style |
the structure to store the style in a CWStyleManager More... | |
Public Member Functions | |
CWStyleManager (CWParser &mainParser) | |
constructor | |
~CWStyleManager () | |
destructor | |
bool | readColorList (MWAWEntry const &entry) |
reads a color map zone ( v4-v6) | |
bool | readPatternList (long endPos=-1) |
reads a pattern map zone ( v2) | |
bool | readGradientList (long endPos=-1) |
reads a gradient map zone ( v2) | |
bool | readStyles (MWAWEntry const &entry) |
try to read the styles definition (in v4-6) | |
bool | updateGradient (int grad, MWAWGraphicStyle &style) const |
update a style using a gradiant id | |
bool | updateWallPaper (int wall, MWAWGraphicStyle &style) const |
update a style using a wall paper id | |
int | getFontId (int localId) const |
return a mac font id corresponding to a local id | |
bool | getColor (int id, MWAWColor &col) const |
return the color which corresponds to an id (if possible) | |
bool | getPattern (int id, MWAWGraphicStyle::Pattern &pattern, float &percent) const |
return the pattern which corresponds to an id. | |
bool | get (int styleId, Style &style) const |
return the style corresponding to a styleId | |
bool | get (int fontId, MWAWFont &font) const |
return the font corresponding to a fontId | |
bool | get (int formatId, CellFormat &format) const |
return the cell format corresponding to a cellFormatId | |
bool | get (int ksenId, KSEN &ksen) const |
return the ksen style corresponding to a ksenId | |
bool | get (int graphId, MWAWGraphicStyle &graph) const |
return the graphic style corresponding to a graphicId | |
bool | readFont (int id, int fontSize, MWAWFont &font) |
try to read a named font | |
Protected Member Functions | |
int | version () const |
return the file version | |
bool | readGenStyle (int id) |
try to read a STYL_ subzone (in v4-6) | |
bool | readStylesDef (int N, int fSz) |
try to read the style definition zone | |
bool | readLookUp (int N, int fSz) |
try to read the lookup zone | |
bool | readCellStyles (int N, int fSz) |
bool | readFontNames (int N, int fSz) |
read the font name style zone | |
bool | readGraphStyles (int N, int fSz) |
read a GraphicStyle sequence | |
bool | readKSEN (int N, int fSz) |
read a KSEN sequence | |
bool | readStyleNames (int N, int fSz) |
read a STYL Name sequence | |
bool | readStyleFonts (int N, int fSz) |
read a STYL_CHAR Font sequence | |
Protected Attributes | |
MWAWParserStatePtr | m_parserState |
the parser state | |
CWParser * | m_mainParser |
the main parser | |
shared_ptr < CWStyleManagerInternal::State > | m_state |
the state | |
Private Member Functions | |
CWStyleManager (CWStyleManager const &orig) | |
CWStyleManager & | operator= (CWStyleManager const &orig) |
a structure to store the style list and the lookup zone
CWStyleManager::CWStyleManager | ( | CWParser & | mainParser | ) |
constructor
destructor
CWStyleManager::CWStyleManager | ( | CWStyleManager const & | orig | ) | [private] |
bool CWStyleManager::get | ( | int | styleId, |
CWStyleManager::Style & | style | ||
) | const |
return the style corresponding to a styleId
Referenced by CWTableInternal::TableCell::update().
bool CWStyleManager::get | ( | int | fontId, |
MWAWFont & | font | ||
) | const |
return the font corresponding to a fontId
bool CWStyleManager::get | ( | int | formatId, |
CWStyleManager::CellFormat & | format | ||
) | const |
return the cell format corresponding to a cellFormatId
bool CWStyleManager::get | ( | int | ksenId, |
CWStyleManager::KSEN & | ksen | ||
) | const |
return the ksen style corresponding to a ksenId
bool CWStyleManager::get | ( | int | graphId, |
MWAWGraphicStyle & | graph | ||
) | const |
return the graphic style corresponding to a graphicId
bool CWStyleManager::getColor | ( | int | id, |
MWAWColor & | col | ||
) | const |
return the color which corresponds to an id (if possible)
Referenced by readFont(), and readGraphStyles().
int CWStyleManager::getFontId | ( | int | localId | ) | const |
return a mac font id corresponding to a local id
Referenced by readFont().
bool CWStyleManager::getPattern | ( | int | id, |
MWAWGraphicStyle::Pattern & | pattern, | ||
float & | percent | ||
) | const |
return the pattern which corresponds to an id.
Referenced by readGraphStyles().
CWStyleManager& CWStyleManager::operator= | ( | CWStyleManager const & | orig | ) | [private] |
bool CWStyleManager::readCellStyles | ( | int | N, |
int | fSz | ||
) | [protected] |
Referenced by readGenStyle().
bool CWStyleManager::readColorList | ( | MWAWEntry const & | entry | ) |
reads a color map zone ( v4-v6)
bool CWStyleManager::readFont | ( | int | id, |
int | fontSize, | ||
MWAWFont & | font | ||
) |
try to read a named font
Referenced by readStyleFonts().
bool CWStyleManager::readFontNames | ( | int | N, |
int | fSz | ||
) | [protected] |
read the font name style zone
Referenced by readGenStyle().
bool CWStyleManager::readGenStyle | ( | int | id | ) | [protected] |
try to read a STYL_ subzone (in v4-6)
Referenced by readStyles().
bool CWStyleManager::readGradientList | ( | long | endPos = -1 | ) |
reads a gradient map zone ( v2)
Referenced by readGenStyle().
bool CWStyleManager::readGraphStyles | ( | int | N, |
int | fSz | ||
) | [protected] |
read a GraphicStyle sequence
Referenced by readGenStyle().
bool CWStyleManager::readKSEN | ( | int | N, |
int | fSz | ||
) | [protected] |
read a KSEN sequence
Referenced by readGenStyle().
bool CWStyleManager::readLookUp | ( | int | N, |
int | fSz | ||
) | [protected] |
try to read the lookup zone
Referenced by readGenStyle().
bool CWStyleManager::readPatternList | ( | long | endPos = -1 | ) |
reads a pattern map zone ( v2)
Referenced by readGenStyle().
bool CWStyleManager::readStyleFonts | ( | int | N, |
int | fSz | ||
) | [protected] |
read a STYL_CHAR Font sequence
Referenced by readGenStyle().
bool CWStyleManager::readStyleNames | ( | int | N, |
int | fSz | ||
) | [protected] |
read a STYL Name sequence
Referenced by readGenStyle().
bool CWStyleManager::readStyles | ( | MWAWEntry const & | entry | ) |
try to read the styles definition (in v4-6)
bool CWStyleManager::readStylesDef | ( | int | N, |
int | fSz | ||
) | [protected] |
try to read the style definition zone
Referenced by readGenStyle().
bool CWStyleManager::updateGradient | ( | int | grad, |
MWAWGraphicStyle & | style | ||
) | const |
update a style using a gradiant id
bool CWStyleManager::updateWallPaper | ( | int | wall, |
MWAWGraphicStyle & | style | ||
) | const |
update a style using a wall paper id
int CWStyleManager::version | ( | ) | const [protected] |
return the file version
Referenced by get(), getColor(), getPattern(), readFont(), readGenStyle(), readGradientList(), readGraphStyles(), readPatternList(), readStyles(), updateGradient(), and updateWallPaper().
CWParser* CWStyleManager::m_mainParser [protected] |
the main parser
Referenced by readGenStyle(), and readGraphStyles().
MWAWParserStatePtr CWStyleManager::m_parserState [protected] |
the parser state
Referenced by readCellStyles(), readColorList(), readFont(), readFontNames(), readGenStyle(), readGradientList(), readGraphStyles(), readKSEN(), readLookUp(), readPatternList(), readStyleFonts(), readStyleNames(), readStyles(), readStylesDef(), and version().
shared_ptr<CWStyleManagerInternal::State> CWStyleManager::m_state [protected] |
the state
Referenced by CWStyleManager(), get(), getColor(), getFontId(), getPattern(), readCellStyles(), readColorList(), readFontNames(), readGradientList(), readGraphStyles(), readKSEN(), readLookUp(), readPatternList(), readStyleFonts(), readStylesDef(), updateGradient(), updateWallPaper(), and version().