This class parses the Lotus style. More...
#include <LotusStyleManager.h>
Public Member Functions | |
| LotusStyleManager (LotusParser &parser) | |
| constructor | |
| ~LotusStyleManager () | |
| destructor | |
| void | cleanState () |
| clean internal state | |
| void | updateState () |
| update the state (need to be called before asking for style) | |
| bool | getColor8 (int cId, WPSColor &color) const |
| returns if possible the color(id between 0 and 7) | |
| bool | getColor16 (int cId, WPSColor &color) const |
| returns if possible the color(id between 0 and 15) | |
| bool | getColor256 (int cId, WPSColor &color) const |
| returns if possible the color(id between 0 and 255) | |
| bool | getPattern48 (int id, WPSGraphicStyle::Pattern &pattern) const |
| returns the pattern corresponding to a pattern id (id between 1 and 48) | |
| bool | getPattern64 (int id, WPSGraphicStyle::Pattern &pattern) const |
| returns the pattern corresponding to a pattern id (id between 1 and 64) | |
| bool | updateCellStyle (int cellId, WPSCellFormat &format, WPSFont &font, libwps_tools_win::Font::Type &fontType) |
| update a cell format using the cell id | |
| bool | updateFontStyle (int fontId, WPSFont &font, libwps_tools_win::Font::Type &fontType) |
| update a font using the font id | |
| bool | updateLineStyle (int lineId, WPSGraphicStyle &style) const |
| update style using line id | |
| bool | updateSurfaceStyle (int colorId, WPSGraphicStyle &style) const |
| update style using color id | |
| bool | updateGraphicStyle (int graphicId, WPSGraphicStyle &style) const |
| update style using graphic id | |
| bool | updateSurfaceStyle (int fColorId, int bColorId, int patternId, WPSGraphicStyle &style) const |
| update style using front/back color and pattern id | |
Protected Member Functions | |
| int | version () const |
| return the file version | |
| bool | readColorStyle (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a color style | |
| bool | readFormatStyle (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a format style | |
| bool | readLineStyle (std::shared_ptr< WPSStream > stream, long endPos, int vers) |
| reads a line style | |
| bool | readGraphicStyle (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a graphic style | |
| bool | readGraphicStyleC9 (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a graphic style: fc9, lotus123 | |
| bool | readFontStyleA0 (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a font style: fa0 | |
| bool | readFontStyleF0 (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a font style: ff0 (wk4) | |
| bool | readCellStyleD2 (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a cell style: fd2 (mac 123 or 123) | |
| bool | readCellStyleE6 (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a cell style: fe6 (wk4) | |
| bool | readStyleE6 (std::shared_ptr< WPSStream > stream, long endPos) |
| reads a style: fe6 (123) | |
| bool | readFMTFontName (std::shared_ptr< WPSStream > stream) |
| reads a format font name: zones 0xae | |
| bool | readFMTFontSize (std::shared_ptr< WPSStream > stream) |
| reads a format font sizes zones 0xaf and 0xb1 | |
| bool | readFMTFontId (std::shared_ptr< WPSStream > stream) |
| reads a format font id zone: 0xb0 | |
| bool | updateShadowStyle (int colorId, WPSGraphicStyle &style) const |
| update style using color id for defining shadow | |
| bool | readCellStyleD2Data (LotusStyleManagerInternal::CellStyleEntry const &entry, std::set< int > &seen) |
| really reads the cell style: fd2 (123) | |
Static Protected Member Functions | |
| static bool | readMenuStyleE7 (std::shared_ptr< WPSStream > stream, long endPos) |
| reads the list of style: 32e7 (wk4) | |
Private Member Functions | |
| LotusStyleManager (LotusStyleManager const &orig)=delete | |
| LotusStyleManager & | operator= (LotusStyleManager const &orig)=delete |
Private Attributes | |
| LotusParser & | m_mainParser |
| the main parser | |
| std::shared_ptr< LotusStyleManagerInternal::State > | m_state |
| the internal state | |
Friends | |
| class | LotusParser |
This class parses the Lotus style.
|
explicit |
constructor
Referenced by LotusParser::LotusParser(), LotusParser, LotusStyleManager(), and operator=().
| LotusStyleManager::~LotusStyleManager | ( | ) |
destructor
|
privatedelete |
| void LotusStyleManager::cleanState | ( | ) |
clean internal state
Referenced by LotusParser.
| bool LotusStyleManager::getColor16 | ( | int | cId, |
| WPSColor & | color ) const |
returns if possible the color(id between 0 and 15)
Referenced by LotusParser, and readCellStyleE6().
| bool LotusStyleManager::getColor256 | ( | int | cId, |
| WPSColor & | color ) const |
returns if possible the color(id between 0 and 255)
Referenced by LotusParser, readCellStyleE6(), readFontStyleA0(), readFontStyleF0(), readGraphicStyleC9(), and updateSurfaceStyle().
| bool LotusStyleManager::getColor8 | ( | int | cId, |
| WPSColor & | color ) const |
returns if possible the color(id between 0 and 7)
Referenced by LotusParser.
| bool LotusStyleManager::getPattern48 | ( | int | id, |
| WPSGraphicStyle::Pattern & | pattern ) const |
returns the pattern corresponding to a pattern id (id between 1 and 48)
Referenced by updateCellStyle().
| bool LotusStyleManager::getPattern64 | ( | int | id, |
| WPSGraphicStyle::Pattern & | pattern ) const |
returns the pattern corresponding to a pattern id (id between 1 and 64)
Referenced by getPattern48(), and updateSurfaceStyle().
|
privatedelete |
|
protected |
reads a cell style: fd2 (mac 123 or 123)
Referenced by getPattern48().
|
protected |
really reads the cell style: fd2 (123)
\note this function normally called when all the styles are read, so it can reliably recover its data
Referenced by getPattern48(), readCellStyleD2(), readCellStyleD2Data(), and updateCellStyle().
|
protected |
reads a cell style: fe6 (wk4)
Referenced by getPattern48().
|
protected |
reads a color style
Referenced by getPattern48().
|
protected |
reads a format font id zone: 0xb0
Referenced by getPattern48().
|
protected |
reads a format font name: zones 0xae
Referenced by getPattern48().
|
protected |
reads a format font sizes zones 0xaf and 0xb1
Referenced by getPattern48().
|
protected |
reads a font style: fa0
Referenced by getPattern48().
|
protected |
reads a font style: ff0 (wk4)
Referenced by getPattern48().
|
protected |
reads a format style
Referenced by getPattern48().
|
protected |
reads a graphic style
Referenced by getPattern48().
|
protected |
reads a graphic style: fc9, lotus123
Referenced by getPattern48().
|
protected |
reads a line style
Referenced by getPattern48().
|
staticprotected |
reads the list of style: 32e7 (wk4)
Referenced by getPattern48().
|
protected |
reads a style: fe6 (123)
Referenced by getPattern48().
| bool LotusStyleManager::updateCellStyle | ( | int | cellId, |
| WPSCellFormat & | format, | ||
| WPSFont & | font, | ||
| libwps_tools_win::Font::Type & | fontType ) |
update a cell format using the cell id
Referenced by getPattern48().
| bool LotusStyleManager::updateFontStyle | ( | int | fontId, |
| WPSFont & | font, | ||
| libwps_tools_win::Font::Type & | fontType ) |
update a font using the font id
Referenced by getPattern48(), readCellStyleE6(), and updateCellStyle().
| bool LotusStyleManager::updateGraphicStyle | ( | int | graphicId, |
| WPSGraphicStyle & | style ) const |
update style using graphic id
Referenced by getPattern48().
| bool LotusStyleManager::updateLineStyle | ( | int | lineId, |
| WPSGraphicStyle & | style ) const |
update style using line id
Referenced by getPattern48(), and updateGraphicStyle().
|
protected |
update style using color id for defining shadow
Referenced by getPattern48(), and updateGraphicStyle().
| void LotusStyleManager::updateState | ( | ) |
update the state (need to be called before asking for style)
Referenced by LotusParser.
| bool LotusStyleManager::updateSurfaceStyle | ( | int | colorId, |
| WPSGraphicStyle & | style ) const |
update style using color id
Referenced by getPattern48(), and updateGraphicStyle().
| bool LotusStyleManager::updateSurfaceStyle | ( | int | fColorId, |
| int | bColorId, | ||
| int | patternId, | ||
| WPSGraphicStyle & | style ) const |
update style using front/back color and pattern id
|
protected |
return the file version
Referenced by getPattern48(), readCellStyleD2(), updateCellStyle(), updateGraphicStyle(), and updateSurfaceStyle().
|
friend |
Referenced by LotusParser, and LotusStyleManager().
|
private |
the main parser
Referenced by LotusStyleManager(), readCellStyleD2(), readCellStyleD2Data(), readCellStyleE6(), readFontStyleA0(), readFontStyleF0(), updateState(), and version().
|
private |
the internal state
Referenced by cleanState(), getColor16(), getColor256(), getColor8(), getPattern64(), LotusStyleManager(), readCellStyleD2(), readCellStyleD2Data(), readCellStyleE6(), readColorStyle(), readFMTFontId(), readFMTFontName(), readFMTFontSize(), readFontStyleA0(), readFontStyleF0(), readFormatStyle(), readGraphicStyle(), readGraphicStyleC9(), readLineStyle(), readStyleE6(), updateCellStyle(), updateFontStyle(), updateGraphicStyle(), updateLineStyle(), updateShadowStyle(), updateState(), updateSurfaceStyle(), and version().