Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ClarisWksStyleManager Class Reference

a structure to store the style list and the lookup zone More...

`#include <ClarisWksStyleManager.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 ClarisWksStyleManager More...

## Public Member Functions
| ClarisWksStyleManager (MWAWParserStatePtr const &parserState, ClarisWksDocument *document=nullptr)
| constructor More...
| ~ClarisWksStyleManager ()
| destructor More...
bool | readColorList (MWAWEntry const &entry)
| reads a color map zone ( v4-v6) More...
bool | readPatternList (long endPos=-1)
| reads a pattern map zone ( v2) More...
bool | readGradientList (long endPos=-1)
| reads a gradient map zone ( v2) More...
bool | readStyles (MWAWEntry const &entry)
| try to read the styles definition (in v4-6) More...
bool | readFontNames ()
| read the font name style zone (method to store font names in v2/v3 files) More...
bool | updateGradient (int grad, MWAWGraphicStyle &style) const
| update a style using a gradiant id More...
bool | updateWallPaper (int wall, MWAWGraphicStyle &style) const
| update a style using a wall paper id More...
int | getFontId (int localId) const
| return a mac font id corresponding to a local id More...
bool | getColor (int id, MWAWColor &col) const
| return the color which corresponds to an id (if possible) More...
bool | getPattern (int id, MWAWGraphicStyle::Pattern &pattern, float &percent) const
| return the pattern which corresponds to an id. More...
bool | getRulerName (int id, std::string &name) const
| return the name corresponding to a styleId More...
bool | get (int styleId, Style &style) const
| return the style corresponding to a styleId More...
bool | get (int fontId, MWAWFont &font) const
| return the font corresponding to a fontId More...
bool | get (int formatId, CellFormat &format) const
| return the cell format corresponding to a cellFormatId More...
bool | get (int ksenId, KSEN &ksen) const
| return the ksen style corresponding to a ksenId More...
bool | get (int graphId, MWAWGraphicStyle &graph) const
| return the graphic style corresponding to a graphicId More...
bool | readFont (int id, int fontSize, MWAWFont &font)
| try to read a named font More...
bool | readFontAndPos (int id, int &posC, MWAWFont &font)
| try to read a font More...

## Protected Member Functions
int | version () const
| return the file version More...
bool | readGenStyle (int id)
| try to read a STYL_ subzone (in v4-6) More...
bool | readStylesDef (int N, int fSz)
| try to read the style definition zone More...
bool | readLookUp (int N, int fSz)
| try to read the lookup zone More...
bool | readCellStyles (int N, int fSz)
bool | readFontNames (int N, int fSz)
| read the font name style zone (in the style zones) More...
bool | readGraphStyles (int N, int fSz)
| read a GraphicStyle sequence More...
bool | readKSEN (int N, int fSz)
| read a KSEN sequence More...
bool | readStyleNames (int N, int fSz)
| read a STYL Name sequence More...
bool | readStyleFonts (int N, int fSz)
| read a STYL_CHAR Font sequence More...

## Protected Attributes
ClarisWksDocument * | m_document
| the document More...
MWAWParserStatePtr | m_parserState
| the parser state More...
std::shared_ptr< ClarisWksStyleManagerInternal::State > | m_state
| the state More...

## Private Member Functions
| ClarisWksStyleManager (ClarisWksStyleManager const &orig)=delete
ClarisWksStyleManager & | operator= (ClarisWksStyleManager const &orig)=delete

## Detailed Description

a structure to store the style list and the lookup zone

## Constructor & Destructor Documentation

## ◆ ClarisWksStyleManager() [1/2]

ClarisWksStyleManager::ClarisWksStyleManager | ( | MWAWParserStatePtr const & | parserState,
|  | ClarisWksDocument * | document = `nullptr`
| ) |  |

constructor

## ◆ ~ClarisWksStyleManager()

ClarisWksStyleManager::~ClarisWksStyleManager | ( |  | ) |

destructor

## ◆ ClarisWksStyleManager() [2/2]

ClarisWksStyleManager::ClarisWksStyleManager | ( | ClarisWksStyleManager const & | orig | ) |
| private delete

## Member Function Documentation

## ◆ get() [1/5]

bool ClarisWksStyleManager::get | ( | int | styleId,
|  | ClarisWksStyleManager::Style & | style
| ) |  | const

return the style corresponding to a styleId

## ◆ get() [2/5]

bool ClarisWksStyleManager::get | ( | int | fontId,
|  | MWAWFont & | font
| ) |  | const

return the font corresponding to a fontId

## ◆ get() [3/5]

bool ClarisWksStyleManager::get | ( | int | formatId,
|  | ClarisWksStyleManager::CellFormat & | format
| ) |  | const

return the cell format corresponding to a cellFormatId

## ◆ get() [4/5]

bool ClarisWksStyleManager::get | ( | int | ksenId,
|  | ClarisWksStyleManager::KSEN & | ksen
| ) |  | const

return the ksen style corresponding to a ksenId

## ◆ get() [5/5]

bool ClarisWksStyleManager::get | ( | int | graphId,
|  | MWAWGraphicStyle & | graph
| ) |  | const

return the graphic style corresponding to a graphicId

## ◆ getColor()

bool ClarisWksStyleManager::getColor | ( | int | id,
|  | MWAWColor & | col
| ) |  | const

return the color which corresponds to an id (if possible)

Referenced by readFont(), readFontAndPos(), and readGraphStyles().

## ◆ getFontId()

int ClarisWksStyleManager::getFontId | ( | int | localId | ) | const

return a mac font id corresponding to a local id

Referenced by readFont(), and readFontAndPos().

## ◆ getPattern()

bool ClarisWksStyleManager::getPattern | ( | int | id,
|  | MWAWGraphicStyle::Pattern & | pattern,
|  | float & | percent
| ) |  | const

return the pattern which corresponds to an id.

Referenced by readGraphStyles().

## ◆ getRulerName()

bool ClarisWksStyleManager::getRulerName | ( | int | id,
|  | std::string & | name
| ) |  | const

return the name corresponding to a styleId

## ◆ operator=()

ClarisWksStyleManager& ClarisWksStyleManager::operator= | ( | ClarisWksStyleManager const & | orig | ) |
| private delete

## ◆ readCellStyles()

bool ClarisWksStyleManager::readCellStyles | ( | int | N,
|  | int | fSz
| ) |  |
| protected

Referenced by readGenStyle().

## ◆ readColorList()

bool ClarisWksStyleManager::readColorList | ( | MWAWEntry const & | entry | ) |

reads a color map zone ( v4-v6)

## ◆ readFont()

bool ClarisWksStyleManager::readFont | ( | int | id,
|  | int | fontSize,
|  | MWAWFont & | font
| ) |  |

try to read a named font

Referenced by readStyleFonts().

## ◆ readFontAndPos()

bool ClarisWksStyleManager::readFontAndPos | ( | int | id,
|  | int & | posC,
|  | MWAWFont & | font
| ) |  |

try to read a font

## ◆ readFontNames() [1/2]

bool ClarisWksStyleManager::readFontNames | ( |  | ) |

read the font name style zone (method to store font names in v2/v3 files)

Referenced by readGenStyle().

## ◆ readFontNames() [2/2]

bool ClarisWksStyleManager::readFontNames | ( | int | N,
|  | int | fSz
| ) |  |
| protected

read the font name style zone (in the style zones)

## ◆ readGenStyle()

bool ClarisWksStyleManager::readGenStyle | ( | int | id | ) |
| protected

try to read a STYL_ subzone (in v4-6)

Referenced by readStyles().

## ◆ readGradientList()

bool ClarisWksStyleManager::readGradientList | ( | long | endPos = `-1` | ) |

reads a gradient map zone ( v2)

Referenced by readGenStyle().

## ◆ readGraphStyles()

bool ClarisWksStyleManager::readGraphStyles | ( | int | N,
|  | int | fSz
| ) |  |
| protected

read a GraphicStyle sequence

Referenced by readGenStyle().

## ◆ readKSEN()

bool ClarisWksStyleManager::readKSEN | ( | int | N,
|  | int | fSz
| ) |  |
| protected

read a KSEN sequence

Referenced by readGenStyle().

## ◆ readLookUp()

bool ClarisWksStyleManager::readLookUp | ( | int | N,
|  | int | fSz
| ) |  |
| protected

try to read the lookup zone

Referenced by readGenStyle().

## ◆ readPatternList()

bool ClarisWksStyleManager::readPatternList | ( | long | endPos = `-1` | ) |

reads a pattern map zone ( v2)

Referenced by readGenStyle().

## ◆ readStyleFonts()

bool ClarisWksStyleManager::readStyleFonts | ( | int | N,
|  | int | fSz
| ) |  |
| protected

read a STYL_CHAR Font sequence

Referenced by readGenStyle().

## ◆ readStyleNames()

bool ClarisWksStyleManager::readStyleNames | ( | int | N,
|  | int | fSz
| ) |  |
| protected

read a STYL Name sequence

Referenced by readGenStyle().

## ◆ readStyles()

bool ClarisWksStyleManager::readStyles | ( | MWAWEntry const & | entry | ) |

try to read the styles definition (in v4-6)

## ◆ readStylesDef()

bool ClarisWksStyleManager::readStylesDef | ( | int | N,
|  | int | fSz
| ) |  |
| protected

try to read the style definition zone

Referenced by readGenStyle().

## ◆ updateGradient()

bool ClarisWksStyleManager::updateGradient | ( | int | grad,
|  | MWAWGraphicStyle & | style
| ) |  | const

update a style using a gradiant id

## ◆ updateWallPaper()

bool ClarisWksStyleManager::updateWallPaper | ( | int | wall,
|  | MWAWGraphicStyle & | style
| ) |  | const

update a style using a wall paper id

## ◆ version()

int ClarisWksStyleManager::version | ( |  | ) | const
| protected

return the file version

Referenced by get(), getColor(), getPattern(), readFont(), readFontAndPos(), readGenStyle(), readGradientList(), readGraphStyles(), readPatternList(), readStyles(), updateGradient(), and updateWallPaper().

## Member Data Documentation

## ◆ m_document

ClarisWksDocument* ClarisWksStyleManager::m_document
| protected

the document

Referenced by readGenStyle(), and readGraphStyles().

## ◆ m_parserState

MWAWParserStatePtr ClarisWksStyleManager::m_parserState
| protected

the parser state

Referenced by readCellStyles(), readColorList(), readFont(), readFontAndPos(), readFontNames(), readGenStyle(), readGradientList(), readGraphStyles(), readKSEN(), readLookUp(), readPatternList(), readStyleFonts(), readStyleNames(), readStyles(), readStylesDef(), and version().

## ◆ m_state

std::shared_ptr<ClarisWksStyleManagerInternal::State> ClarisWksStyleManager::m_state
| protected

the state

Referenced by ClarisWksStyleManager(), get(), getColor(), getFontId(), getPattern(), getRulerName(), readCellStyles(), readColorList(), readFontNames(), readGradientList(), readGraphStyles(), readKSEN(), readLookUp(), readPatternList(), readStyleFonts(), readStyleNames(), readStylesDef(), updateGradient(), updateWallPaper(), and version().

The documentation for this class was generated from the following files:

- ClarisWksStyleManager.hxx
- ClarisWksStyleManager.cxx