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