This class parses Microsoft Multiplan DOS spreadsheet v1. More...
#include <Multiplan.h>
Public Member Functions | |
MultiplanParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN, char const *password=nullptr) | |
constructor | |
~MultiplanParser () override | |
destructor | |
void | parse (librevenge::RVNGSpreadsheetInterface *documentInterface) final |
called by WPSDocument to parse the file | |
bool | checkHeader (WPSHeader *header, bool strict=false) |
checks if the document header is correct (or not) | |
Public Member Functions inherited from WKSParser | |
WKSParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header) | |
virtual | ~WKSParser () |
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 | |
libwps_tools_win::Font::Type | getDefaultFontType () const |
returns the default font type, ie. | |
bool | sendSpreadsheet () |
try to send the main spreadsheet | |
bool | sendCell (Vec2i const &cellPos, int pos) |
try to send a cell | |
bool | readZones () |
finds the different zones (spreadsheet, chart, print, ...) | |
bool | readColumnsWidth () |
read the columns width | |
bool | readZonesList () |
read the spreadsheet zone list | |
bool | readZonesListV2 () |
read the spreadsheet zone list v2 | |
bool | readCellDataPosition (WPSEntry const &entry) |
read the cell data position | |
bool | readLink (int pos, WKSContentListener::FormulaInstruction &instruction) |
read a link | |
bool | readFilename (int pos, librevenge::RVNGString &filename) |
read a link filename | |
bool | readSharedData (int pos, int cellType, Vec2i const &cellPos, WKSContentListener::CellContent &content) |
read a shared data | |
bool | readName (int pos, WKSContentListener::FormulaInstruction &instruction) |
reads a name and returns the cell's instruction | |
bool | readFunctionNamesList () |
try to read the function names: v2 | |
bool | checkPassword (char const *password) const |
check if the password corresponds to a ket | |
RVNGInputStreamPtr | decodeStream (RVNGInputStreamPtr input) |
try to decode a stream, if successful, replace the stream'input by the new one | |
bool | retrievePasswordKeys () |
try to guess a password supposing that the Zone0 content is default | |
bool | readZoneB () |
read an unknown zone | |
bool | readDouble (double &value) |
try to read a double value | |
bool | readFormula (Vec2i const &cellPos, std::vector< WKSContentListener::FormulaInstruction > &formula, long endPos, std::string &extra) |
try to read a formula | |
bool | readFormulaV2 (Vec2i const &cellPos, std::vector< WKSContentListener::FormulaInstruction > &formula, long endPos, std::string &extra) |
try to read a formula V2 | |
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 |
Static Protected Member Functions | |
static std::shared_ptr< WKSContentListener > | createListener (librevenge::RVNGSpreadsheetInterface *interface) |
creates the main listener |
Protected Attributes | |
std::shared_ptr< WKSContentListener > | m_listener |
std::shared_ptr< MultiplanParserInternal::State > | m_state |
the listener (if set) |
This class parses Microsoft Multiplan DOS spreadsheet v1.
libwps::MultiplanParser::MultiplanParser | ( | RVNGInputStreamPtr & | input, |
WPSHeaderPtr & | header, | ||
libwps_tools_win::Font::Type | encoding = libwps_tools_win::Font::UNKNOWN, | ||
char const * | password = nullptr ) |
constructor
|
override |
destructor
|
protected |
return true if the pos is in the file, update the file size if need
Referenced by checkHeader(), decodeStream(), readColumnsWidth(), readDouble(), readFunctionNamesList(), readZoneB(), readZones(), readZonesList(), readZonesListV2(), and retrievePasswordKeys().
bool libwps::MultiplanParser::checkHeader | ( | WPSHeader * | header, |
bool | strict = false ) |
checks if the document header is correct (or not)
Referenced by libwps::WPSDocument::isFileFormatSupported(), and parse().
|
protected |
check if the password corresponds to a ket
Referenced by readZonesListV2(), and retrievePasswordKeys().
|
staticprotected |
creates the main listener
Referenced by parse().
|
protected |
try to decode a stream, if successful, replace the stream'input by the new one
Referenced by readZonesListV2().
|
protected |
returns the default font type, ie.
the encoding given by the constructor if given or the encoding deduiced from the version.
|
finalvirtual |
called by WPSDocument to parse the file
Implements WKSParser.
|
protected |
read the cell data position
Referenced by readZonesList().
|
protected |
read the columns width
Referenced by readZones().
|
protected |
try to read a double value
Referenced by readFormula(), readSharedData(), and sendCell().
|
protected |
read a link filename
Referenced by readLink().
|
protected |
try to read a formula
Referenced by readSharedData(), and sendCell().
|
protected |
try to read a formula V2
Referenced by readSharedData(), and sendCell().
|
protected |
try to read the function names: v2
Referenced by readZones().
|
protected |
read a link
Referenced by readFormula(), and readFormulaV2().
|
protected |
reads a name and returns the cell's instruction
Referenced by readFormula(), and readFormulaV2().
|
protected |
read a shared data
Referenced by sendCell().
|
protected |
read an unknown zone
Referenced by readZones().
|
protected |
finds the different zones (spreadsheet, chart, print, ...)
Referenced by parse().
|
protected |
read the spreadsheet zone list
Referenced by readZones().
|
protected |
read the spreadsheet zone list v2
Referenced by readZones().
|
protected |
try to guess a password supposing that the Zone0 content is default
Referenced by readZonesListV2().
|
protected |
try to send a cell
Referenced by sendSpreadsheet().
|
protected |
try to send the main spreadsheet
Referenced by parse().
|
protected |
return the file version
Referenced by readColumnsWidth(), readDouble(), readLink(), readName(), readSharedData(), readZoneB(), readZones(), and sendCell().
|
protected |
Referenced by MultiplanParser(), parse(), sendCell(), and sendSpreadsheet().
|
protected |
the listener (if set)
the internal state
Referenced by checkFilePosition(), checkHeader(), checkPassword(), decodeStream(), getDefaultFontType(), MultiplanParser(), readCellDataPosition(), readColumnsWidth(), readFilename(), readFormula(), readFormulaV2(), readLink(), readName(), readSharedData(), readZoneB(), readZones(), readZonesList(), readZonesListV2(), retrievePasswordKeys(), sendCell(), sendSpreadsheet(), and version().