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 | |
| ~LotusParser () | |
| destructor | |
| void | parse (librevenge::RVNGSpreadsheetInterface *documentInterface) |
| called by WPSDocument to parse the file | |
| bool | checkHeader (WPSHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
Protected Member Functions | |
| bool | checkFilePosition (long pos) |
| return true if the pos is in the file, update the file size if need | |
| int | version () const |
| return the file version | |
| bool | getFont (int id, WPSFont &font, libwps_tools_win::Font::Type &type) const |
| returns the font corresponding to an id | |
| libwps_tools_win::Font::Type | getDefaultFontType () const |
| returns the default font type, ie. | |
| bool | hasGraphics (int sheetId) const |
| return true if the sheet sheetId has some graphic | |
| void | sendGraphics (int sheetId) |
| send the graphics corresponding to a sheetId | |
| shared_ptr< WKSContentListener > | createListener (librevenge::RVNGSpreadsheetInterface *interface) |
| creates the main listener | |
| bool | readZones () |
| finds the different zones (spreadsheet, chart, print, ...) | |
| bool | readDataZone () |
| parse the different zones 1B | |
| bool | readZone () |
| reads a zone | |
| bool | readMacFontName (long endPos) |
| reads a mac font name | |
| bool | readFMTFontName () |
| reads a format font name | |
| bool | readLinkZone () |
| reads a link | |
| bool | readDocumentInfoMac (long endPos) |
| reads a mac document info zone: zone 1b, then 2af8 | |
| bool | readChartDefinition () |
| reads a chart definitions | |
| bool | readChartName () |
| reads the chart name or title | |
Protected Attributes | |
| shared_ptr< WKSContentListener > | m_listener |
| shared_ptr < LotusParserInternal::State > | m_state |
| the listener (if set) | |
| shared_ptr< LotusStyleManager > | m_styleManager |
| the style manager | |
| shared_ptr< LotusGraph > | m_graphParser |
| the graph manager | |
| shared_ptr< LotusSpreadsheet > | m_spreadsheetParser |
| the spreadsheet manager | |
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
destructor
| bool LotusParser::checkFilePosition | ( | long | pos | ) | [protected] |
return true if the pos is in the file, update the file size if need
Referenced by checkHeader(), readZone(), and readZones().
| bool LotusParser::checkHeader | ( | WPSHeader * | header, |
| bool | strict = false |
||
| ) |
checks if the document header is correct (or not)
Referenced by parse().
| shared_ptr< WKSContentListener > LotusParser::createListener | ( | librevenge::RVNGSpreadsheetInterface * | interface | ) | [protected] |
creates the main listener
Referenced by parse().
| libwps_tools_win::Font::Type LotusParser::getDefaultFontType | ( | ) | const [protected] |
returns the default font type, ie.
the encoding given by the constructor if given or the encoding deduiced from the version.
Referenced by LotusStyleManager::readFontStyle(), LotusSpreadsheet::readRowFormats(), LotusSpreadsheet::readSheetName(), LotusSpreadsheet::sendSpreadsheet(), and LotusGraph::sendTextBox().
| bool LotusParser::getFont | ( | int | id, |
| WPSFont & | font, | ||
| libwps_tools_win::Font::Type & | type | ||
| ) | const [protected] |
returns the font corresponding to an id
Referenced by LotusGraph::sendTextBox(), and LotusStyleManager::updateState().
| bool LotusParser::hasGraphics | ( | int | sheetId | ) | const [protected] |
return true if the sheet sheetId has some graphic
| void LotusParser::parse | ( | librevenge::RVNGSpreadsheetInterface * | documentInterface | ) | [virtual] |
called by WPSDocument to parse the file
Implements WKSParser.
| bool LotusParser::readChartDefinition | ( | ) | [protected] |
reads a chart definitions
Referenced by readZone().
| bool LotusParser::readChartName | ( | ) | [protected] |
reads the chart name or title
Referenced by readZone().
| bool LotusParser::readDataZone | ( | ) | [protected] |
parse the different zones 1B
Referenced by readZone().
| bool LotusParser::readDocumentInfoMac | ( | long | endPos | ) | [protected] |
reads a mac document info zone: zone 1b, then 2af8
Referenced by readDataZone().
| bool LotusParser::readFMTFontName | ( | ) | [protected] |
reads a format font name
Referenced by readZone().
| bool LotusParser::readLinkZone | ( | ) | [protected] |
reads a link
Referenced by readZone().
| bool LotusParser::readMacFontName | ( | long | endPos | ) | [protected] |
reads a mac font name
Referenced by readDataZone().
| bool LotusParser::readZone | ( | ) | [protected] |
reads a zone
Referenced by checkHeader(), and readZones().
| bool LotusParser::readZones | ( | ) | [protected] |
finds the different zones (spreadsheet, chart, print, ...)
Referenced by parse().
| void LotusParser::sendGraphics | ( | int | sheetId | ) | [protected] |
send the graphics corresponding to a sheetId
Referenced by LotusSpreadsheet::sendSpreadsheet().
| int LotusParser::version | ( | ) | const [protected] |
return the file version
Reimplemented from WKSParser.
Referenced by readMacFontName(), readZone(), LotusGraph::version(), LotusSpreadsheet::version(), and LotusStyleManager::version().
friend class LotusGraph [friend] |
Referenced by LotusParser().
friend class LotusParserInternal::SubDocument [friend] |
friend class LotusSpreadsheet [friend] |
Referenced by LotusParser().
friend class LotusStyleManager [friend] |
Referenced by LotusParser().
shared_ptr<LotusGraph> LotusParser::m_graphParser [protected] |
the graph manager
Referenced by hasGraphics(), LotusParser(), parse(), readDataZone(), readZones(), and sendGraphics().
shared_ptr<WKSContentListener> LotusParser::m_listener [protected] |
Referenced by parse().
shared_ptr<LotusSpreadsheet> LotusParser::m_spreadsheetParser [protected] |
the spreadsheet manager
Referenced by LotusParser(), parse(), readDataZone(), readZone(), and readZones().
shared_ptr<LotusParserInternal::State> LotusParser::m_state [protected] |
the listener (if set)
the internal state
Referenced by checkFilePosition(), checkHeader(), createListener(), getDefaultFontType(), getFont(), LotusParser(), parse(), readDocumentInfoMac(), readMacFontName(), readZone(), readZones(), and version().
shared_ptr<LotusStyleManager> LotusParser::m_styleManager [protected] |
the style manager
Referenced by LotusParser(), parse(), readDataZone(), and readZones().