This class parses a wk3,wk4,123 Lotus spreadsheet. More...
#include <Lotus.h>
 
  
| Classes | |
| struct | Link | 
| basic struct used to store link  More... | |
| Public Member Functions | |
| LotusParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN, char const *password=nullptr) | |
| constructor  More... | |
| ~LotusParser () final | |
| destructor  More... | |
| void | parse (librevenge::RVNGSpreadsheetInterface *documentInterface) final | 
| 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... | |
|  Public Member Functions inherited from WKSParser | |
| 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... | |
| std::vector< Link > | getLinksList (int lId) const | 
| returns a list of links corresponding to an id  More... | |
| bool | sendChart (int cId, WPSPosition const &pos, WPSGraphicStyle const &style) | 
| try to send a chart  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... | |
| librevenge::RVNGString | getSheetName (int id) const | 
| returns the name of the id's spreadsheet  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 (std::shared_ptr< WPSStream > stream, bool mainStream, bool strict) | 
| checks if the document header is correct (or not)  More... | |
| bool | readZones (std::shared_ptr< WPSStream > stream) | 
| finds the different zones (spreadsheet, chart, print, ...)  More... | |
| bool | readDataZone (std::shared_ptr< WPSStream > stream) | 
| parse the different zones 1B  More... | |
| bool | readZone (std::shared_ptr< WPSStream > &stream) | 
| reads a zone  More... | |
| bool | readZone1 (std::shared_ptr< WPSStream > stream) | 
| reads a zone of type 1: 123 files  More... | |
| bool | readSheetZone (std::shared_ptr< WPSStream > stream) | 
| reads a zone of type 2: 123 files  More... | |
| bool | readZone8 (std::shared_ptr< WPSStream > stream) | 
| reads a zone of type 8: 123 files  More... | |
| bool | readMacFontName (std::shared_ptr< WPSStream > stream, long endPos) | 
| reads a mac font name  More... | |
| bool | readLinkZone (std::shared_ptr< WPSStream > stream) | 
| reads a link  More... | |
| bool | readDocumentInfoMac (std::shared_ptr< WPSStream > stream, long endPos) | 
| reads a mac document info zone: zone 1b, then 2af8  More... | |
|  Protected Member Functions inherited from WKSParser | |
| RVNGInputStreamPtr & | getInput () | 
| void | resetInput (RVNGInputStreamPtr const &newInput) | 
| 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... | |
| Static Protected Member Functions | |
| static bool | readZone4 (std::shared_ptr< WPSStream > stream) | 
| reads a zone of type 4: 123 files  More... | |
| static bool | readChartZone (std::shared_ptr< WPSStream > stream) | 
| reads a zone of type 5: 123 files  More... | |
| static bool | readRefZone (std::shared_ptr< WPSStream > stream) | 
| reads a zone of type 6: 123 files  More... | |
| static bool | readZone7 (std::shared_ptr< WPSStream > stream) | 
| reads a zone of type 7: 123 files  More... | |
| static bool | readVersionZone (std::shared_ptr< WPSStream > stream) | 
| reads a zone of type a: 123 files  More... | |
| static bool | readZoneV3 (std::shared_ptr< WPSStream > stream) | 
| parse a wk123 zone  More... | |
| static bool | readFMTStyleName (std::shared_ptr< WPSStream > stream) | 
| reads a format style name: b6  More... | |
| static RVNGInputStreamPtr | decodeStream (RVNGInputStreamPtr input, long endPos, std::vector< uint8_t > const &key) | 
| try to decode a stream, if successful, replace the stream'input by the new one  More... | |
| static std::vector< uint8_t > | retrievePasswordKeys (std::vector< uint8_t > const &fileKeys) | 
| try to guess a password knowing its file keys. Returns the keys if it founds a valid password  More... | |
| Protected Attributes | |
| std::shared_ptr< WKSContentListener > | m_listener | 
| std::shared_ptr< LotusParserInternal::State > | m_state | 
| the listener (if set)  More... | |
| std::shared_ptr< LotusStyleManager > | m_styleManager | 
| the style manager  More... | |
| std::shared_ptr< LotusChart > | m_chartParser | 
| the chart manager  More... | |
| std::shared_ptr< LotusGraph > | m_graphParser | 
| the graph manager  More... | |
| std::shared_ptr< LotusSpreadsheet > | m_spreadsheetParser | 
| the spreadsheet manager  More... | |
| std::shared_ptr< WPSOLE1Parser > | m_ole1Parser | 
| the ole1 parser  More... | |
| Friends | |
| class | LotusParserInternal::SubDocument | 
| class | LotusChart | 
| class | LotusGraph | 
| class | LotusSpreadsheet | 
| class | LotusStyleManager | 
This class parses a wk3,wk4,123 Lotus spreadsheet.
| LotusParser::LotusParser | ( | RVNGInputStreamPtr & | input, | 
| WPSHeaderPtr & | header, | ||
| libwps_tools_win::Font::Type | encoding = libwps_tools_win::Font::UNKNOWN, | ||
| char const * | password = nullptr | ||
| ) | 
constructor
| 
 | final | 
destructor
| 
 | protected | 
checks if the document header is correct (or not)
| bool LotusParser::checkHeader | ( | WPSHeader * | header, | 
| bool | strict = false | ||
| ) | 
checks if the document header is correct (or not)
Referenced by libwps::WPSDocument::isFileFormatSupported(), parse(), and parseFormatStream().
| 
 | protected | 
creates the main listener
Referenced by parse().
| 
 | protected | 
try to parse the different zones
Referenced by parse().
| 
 | staticprotected | 
try to decode a stream, if successful, replace the stream'input by the new one
Referenced by readZone().
| 
 | protected | 
returns the default font type, ie.
the encoding given by the constructor if given or the encoding deduced from the version.
Referenced by createZones(), LotusStyleManager::readCellStyleD2(), LotusStyleManager::readCellStyleD2Data(), LotusStyleManager::readCellStyleE6(), LotusChart::readChart(), LotusChart::readChartName(), LotusStyleManager::readFontStyleA0(), LotusStyleManager::readFontStyleF0(), readLinkZone(), readMacFontName(), LotusSpreadsheet::readRowFormats(), LotusChart::readSerieName(), LotusSpreadsheet::readSheetName(), LotusSpreadsheet::readSheetName1B(), LotusSpreadsheet::sendRowContent(), LotusChart::sendText(), LotusGraph::sendTextBox(), LotusGraph::sendTextBoxWK4(), and LotusSpreadsheet::sendTextNote().
| 
 | protected | 
returns the font corresponding to an id
Referenced by LotusStyleManager::readCellStyleD2Data(), LotusGraph::sendTextBox(), and LotusStyleManager::updateState().
| 
 | protected | 
returns the left top position of a cell
Referenced by LotusGraph::sendGraphics().
| 
 | protected | 
returns a list of links corresponding to an id
Referenced by LotusChart::updateChart().
| 
 | protected | 
returns the name of the id's spreadsheet
Referenced by LotusChart::convert().
| 
 | protected | 
return true if the sheet sheetId has some graphic
| 
 | finalvirtual | 
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().
| 
 | staticprotected | 
reads a zone of type 5: 123 files
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().
| 
 | staticprotected | 
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().
| 
 | staticprotected | 
reads a zone of type 6: 123 files
Referenced by readZone().
| 
 | protected | 
reads a zone of type 2: 123 files
Referenced by readZone().
| 
 | staticprotected | 
reads a zone of type a: 123 files
Referenced by readZone().
| 
 | protected | 
reads a zone
Referenced by checkHeader(), and readZones().
| 
 | protected | 
reads a zone of type 1: 123 files
Referenced by readZone().
| 
 | staticprotected | 
reads a zone of type 4: 123 files
Referenced by readZone().
| 
 | staticprotected | 
reads a zone of type 7: 123 files
Referenced by readZone().
| 
 | protected | 
reads a zone of type 8: 123 files
Referenced by readZone().
| 
 | protected | 
finds the different zones (spreadsheet, chart, print, ...)
Referenced by createZones(), and parseFormatStream().
| 
 | staticprotected | 
parse a wk123 zone
Referenced by readZone().
| 
 | staticprotected | 
try to guess a password knowing its file keys. Returns the keys if it founds a valid password
Referenced by readZone().
| 
 | protected | 
try to send a chart
Referenced by LotusGraph::sendGraphics().
| 
 | 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(), parse(), readDataZone(), readMacFontName(), readZone(), readZone8(), LotusChart::version(), LotusSpreadsheet::version(), LotusGraph::version(), and LotusStyleManager::version().
| 
 | friend | 
Referenced by LotusParser().
| 
 | friend | 
Referenced by LotusParser().
| 
 | friend | 
| 
 | friend | 
Referenced by LotusParser().
| 
 | friend | 
Referenced by LotusParser().
| 
 | protected | 
the chart manager
Referenced by createZones(), LotusParser(), parse(), readDataZone(), readZone(), and sendChart().
| 
 | protected | 
the graph manager
Referenced by createZones(), hasGraphics(), LotusParser(), parse(), readDataZone(), readZone(), readZone1(), and sendGraphics().
| 
 | protected | 
Referenced by createListener(), and parse().
| 
 | protected | 
the ole1 parser
Referenced by createZones(), and updateEmbeddedObject().
| 
 | protected | 
the spreadsheet manager
Referenced by createZones(), getLeftTopPosition(), getSheetName(), LotusParser(), parse(), readDataZone(), readZone(), readZone8(), and readZones().
| 
 | protected | 
the listener (if set)
the internal state
Referenced by checkHeader(), createListener(), createZones(), getDefaultFontType(), getFont(), getLinksList(), parse(), readDocumentInfoMac(), readLinkZone(), readMacFontName(), readSheetZone(), readZone(), readZone1(), readZone8(), readZones(), and version().
| 
 | protected | 
the style manager
Referenced by createZones(), LotusParser(), parse(), readDataZone(), and readZone().