This class parses a WK2..WK4 Lotus spreadsheet. More...
#include <Lotus.h>
Public Member Functions | |
LotusParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN) | |
constructor More... | |
~LotusParser () | |
destructor More... | |
void | parse (librevenge::RVNGSpreadsheetInterface *documentInterface) |
called by WPSDocument to parse the file More... | |
bool | checkHeader (WPSHeader *header, bool strict=false) |
checks if the document header is correct (or not) More... | |
![]() | |
WKSParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header) | |
virtual | ~WKSParser () |
Protected Member Functions | |
int | version () const |
return the file version More... | |
bool | getFont (int id, WPSFont &font, libwps_tools_win::Font::Type &type) const |
returns the font corresponding to an id More... | |
libwps_tools_win::Font::Type | getDefaultFontType () const |
returns the default font type, ie. More... | |
bool | hasGraphics (int sheetId) const |
return true if the sheet sheetId has some graphic More... | |
void | sendGraphics (int sheetId) |
send the graphics corresponding to a sheetId More... | |
bool | getLeftTopPosition (Vec2i const &cell, int spreadsheet, Vec2f &pos) const |
returns the left top position of a cell More... | |
bool | updateEmbeddedObject (int id, WPSEmbeddedObject &object) const |
try to retrieve the content of a graphic, knowing it local id More... | |
bool | createZones () |
try to parse the different zones More... | |
bool | createListener (librevenge::RVNGSpreadsheetInterface *interface) |
creates the main listener More... | |
bool | parseFormatStream () |
check for the existence of a format stream, if it exists, parse it More... | |
bool | checkHeader (shared_ptr< WPSStream > stream, bool mainStream, bool strict) |
checks if the document header is correct (or not) More... | |
bool | readZones (shared_ptr< WPSStream > stream) |
finds the different zones (spreadsheet, chart, print, ...) More... | |
bool | readDataZone (shared_ptr< WPSStream > stream) |
parse the different zones 1B More... | |
bool | readZone (shared_ptr< WPSStream > stream) |
reads a zone More... | |
bool | readZoneV3 (shared_ptr< WPSStream > stream) |
parse a wk123 zone More... | |
bool | readMacFontName (shared_ptr< WPSStream > stream, long endPos) |
reads a mac font name More... | |
bool | readFMTStyleName (shared_ptr< WPSStream > stream) |
reads a format style name: b6 More... | |
bool | readLinkZone (shared_ptr< WPSStream > stream) |
reads a link More... | |
bool | readDocumentInfoMac (shared_ptr< WPSStream > stream, long endPos) |
reads a mac document info zone: zone 1b, then 2af8 More... | |
bool | readChartDefinition (shared_ptr< WPSStream > stream) |
reads a chart definitions More... | |
bool | readChartName (shared_ptr< WPSStream > stream) |
reads the chart name or title More... | |
![]() | |
RVNGInputStreamPtr & | getInput () |
RVNGInputStreamPtr | getFileInput () |
WPSHeaderPtr & | getHeader () |
int | version () const |
void | setVersion (int vers) |
libwps::DebugFile & | ascii () |
a DebugFile used to write what we recognize when we parse the document More... | |
Protected Attributes | |
shared_ptr< WKSContentListener > | m_listener |
shared_ptr< LotusParserInternal::State > | m_state |
the listener (if set) More... | |
shared_ptr< LotusStyleManager > | m_styleManager |
the style manager More... | |
shared_ptr< LotusGraph > | m_graphParser |
the graph manager More... | |
shared_ptr< LotusSpreadsheet > | m_spreadsheetParser |
the spreadsheet manager More... | |
shared_ptr< WPSOLE1Parser > | m_ole1Parser |
the ole1 parser More... | |
Friends | |
class | LotusParserInternal::SubDocument |
class | LotusGraph |
class | LotusSpreadsheet |
class | LotusStyleManager |
This class parses a WK2..WK4 Lotus spreadsheet.
LotusParser::LotusParser | ( | RVNGInputStreamPtr & | input, |
WPSHeaderPtr & | header, | ||
libwps_tools_win::Font::Type | encoding = libwps_tools_win::Font::UNKNOWN |
||
) |
constructor
LotusParser::~LotusParser | ( | ) |
destructor
bool LotusParser::checkHeader | ( | WPSHeader * | header, |
bool | strict = false |
||
) |
checks if the document header is correct (or not)
Referenced by parse(), and parseFormatStream().
|
protected |
checks if the document header is correct (or not)
|
protected |
creates the main listener
Referenced by parse().
|
protected |
try to parse the different zones
Referenced by parse().
|
protected |
returns the default font type, ie.
the encoding given by the constructor if given or the encoding deduiced from the version.
Referenced by createZones(), LotusStyleManager::readCellStyleD2(), LotusStyleManager::readCellStyleE6(), LotusStyleManager::readFontStyleA0(), LotusStyleManager::readFontStyleF0(), LotusSpreadsheet::readRowFormats(), LotusSpreadsheet::readSheetName(), LotusSpreadsheet::readSheetName1B(), LotusSpreadsheet::sendRowContent(), LotusGraph::sendTextBox(), and LotusGraph::sendTextBoxWK4().
|
protected |
returns the font corresponding to an id
Referenced by LotusGraph::sendTextBox(), and LotusStyleManager::updateState().
|
protected |
returns the left top position of a cell
Referenced by LotusGraph::sendGraphics(), and LotusSpreadsheet::setListener().
|
protected |
return true if the sheet sheetId has some graphic
|
virtual |
called by WPSDocument to parse the file
Implements WKSParser.
|
protected |
check for the existence of a format stream, if it exists, parse it
Referenced by createZones().
|
protected |
reads a chart definitions
Referenced by readZone().
|
protected |
reads the chart name or title
Referenced by readZone().
|
protected |
parse the different zones 1B
Referenced by readZone().
|
protected |
reads a mac document info zone: zone 1b, then 2af8
Referenced by readDataZone().
|
protected |
reads a format style name: b6
Referenced by readZone().
|
protected |
reads a link
Referenced by readZone().
|
protected |
reads a mac font name
Referenced by readDataZone().
|
protected |
reads a zone
Referenced by checkHeader(), and readZones().
|
protected |
finds the different zones (spreadsheet, chart, print, ...)
Referenced by createZones(), and parseFormatStream().
|
protected |
parse a wk123 zone
Referenced by readZone().
|
protected |
send the graphics corresponding to a sheetId
Referenced by LotusSpreadsheet::sendSpreadsheet().
|
protected |
try to retrieve the content of a graphic, knowing it local id
Referenced by LotusGraph::sendGraphics().
|
protected |
return the file version
Referenced by createZones(), readDataZone(), readMacFontName(), readZone(), LotusSpreadsheet::setListener(), LotusGraph::version(), LotusSpreadsheet::version(), and LotusStyleManager::version().
|
friend |
Referenced by LotusParser().
|
friend |
|
friend |
Referenced by LotusParser(), and LotusSpreadsheet::setListener().
|
friend |
Referenced by LotusParser().
|
protected |
the graph manager
Referenced by createZones(), hasGraphics(), LotusParser(), parse(), readDataZone(), readZone(), and sendGraphics().
|
protected |
Referenced by createListener(), parse(), and LotusSpreadsheet::setListener().
|
protected |
the ole1 parser
Referenced by createZones(), and updateEmbeddedObject().
|
protected |
the spreadsheet manager
Referenced by createZones(), getLeftTopPosition(), LotusParser(), parse(), readDataZone(), readZone(), and readZones().
|
protected |
the listener (if set)
the internal state
Referenced by checkHeader(), createListener(), createZones(), getDefaultFontType(), getFont(), LotusParser(), parse(), readDocumentInfoMac(), readMacFontName(), readZone(), readZones(), readZoneV3(), and version().
|
protected |
the style manager
Referenced by createZones(), LotusParser(), parse(), readDataZone(), and readZone().