the main class to read a GreatWorks database file More...
#include <GreatWksDBParser.hxx>
Public Member Functions | |
| GreatWksDBParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
| constructor | |
| ~GreatWksDBParser () final | |
| destructor | |
| bool | checkHeader (MWAWHeader *header, bool strict=false) final |
| checks if the document header is correct (or not) | |
| void | parse (librevenge::RVNGSpreadsheetInterface *documentInterface) final |
| virtual function used to parse the input | |
Public Member Functions inherited from MWAWSpreadsheetParser | |
| ~MWAWSpreadsheetParser () override | |
| destructor | |
Public Member Functions inherited from MWAWParser | |
| virtual | ~MWAWParser () |
| virtual destructor | |
| int | version () const |
| returns the works version | |
| MWAWParserStatePtr | getParserState () |
| returns the parser state | |
| MWAWHeader * | getHeader () |
| returns the header | |
| MWAWInputStreamPtr & | getInput () |
| returns the actual input | |
| MWAWListenerPtr | getMainListener () |
| returns the main listener | |
| MWAWGraphicListenerPtr & | getGraphicListener () |
| returns the graphic listener | |
| MWAWPresentationListenerPtr & | getPresentationListener () |
| returns the presentation listener | |
| MWAWSpreadsheetListenerPtr & | getSpreadsheetListener () |
| returns the spreadsheet listener | |
| MWAWTextListenerPtr & | getTextListener () |
| returns the text listener | |
| MWAWFontConverterPtr & | getFontConverter () |
| returns the font converter | |
| MWAWFontManagerPtr & | getFontManager () |
| returns the font manager | |
| MWAWPageSpan const & | getPageSpan () const |
| returns the actual page dimension | |
| MWAWPageSpan & | getPageSpan () |
| returns the actual page dimension | |
| double | getFormLength () const |
| returns the form length | |
| double | getFormWidth () const |
| returns the form width | |
| double | getPageLength () const |
| returns the page length (form length without margin ) | |
| double | getPageWidth () const |
| returns the page width (form width without margin ) | |
| MWAWRSRCParserPtr & | getRSRCParser () |
| returns the rsrc parser | |
| libmwaw::DebugFile & | ascii () |
| a DebugFile used to write what we recognize when we parse the document | |
Protected Member Functions | |
| void | init () |
| inits all internal variables | |
| void | createDocument (librevenge::RVNGSpreadsheetInterface *documentInterface) |
| creates the listener which will be associated to the document | |
| bool | sendDatabase () |
| try to send the main database | |
| bool | sendHF (int id) |
| try to send the i^th header/footer | |
| bool | createZones () |
| finds the different objects zones | |
| bool | readDatabase () |
| read the database block | |
| bool | readHeader () |
| try to read the database header: list of zones, ... | |
| bool | readFields (MWAWEntry const &zone) |
| try to read the fields' zone | |
| bool | readField (GreatWksDBParserInternal::Field &field) |
| try to read a field | |
| bool | readFieldAuxis (MWAWEntry const &zon) |
| try to read a field extra v2 zone ( small zone 13) | |
| bool | readFieldLinks (GreatWksDBParserInternal::Field &field) |
| try to read a zone which links a field to zone record | |
| bool | readFieldRecords (GreatWksDBParserInternal::Field &field) |
| try to read a list of records corresponding to field | |
| bool | readFormLinks (MWAWEntry const &zone) |
| try to read the list of form | |
| bool | readForm (MWAWEntry const &zone) |
| try to read a form zone | |
| bool | readRowLinks (GreatWksDBParserInternal::Block &block) |
| try to read row record to small zone link (the 1th big zone) | |
| bool | readRowRecords (MWAWEntry const &zone) |
| try to read a list of records corresponding to a row | |
| bool | readRecordList (GreatWksDBParserInternal::Block &block) |
| try to read the record list (the 3th big zone) | |
| bool | readFreeList (GreatWksDBParserInternal::Block &block) |
| try to read the free zone list: 0th big zone | |
| bool | readFormula (long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula) |
| try to read a formula result in field definition | |
| bool | readFormulaResult (long endPos, GreatWksDBParserInternal::Cell &cell, std::string &extra) |
| try to read a formula result in a row content zone | |
| bool | readIntList (MWAWEntry const &zone, std::vector< int > &list) |
| try to read a int's zone | |
| bool | readSmallZone (MWAWEntry const &zone) |
| try to read an unknown small zone, ie. a default reader: type, 0, size, N, dSz | |
| bool | checkSmallZone (MWAWEntry &zone) |
| check if a pointer correspond or not to a small zone entry, if so update the entry | |
| std::shared_ptr< GreatWksDBParserInternal::Block > | createBlock (GreatWksDBParserInternal::BlockHeader &entry) |
| try to create a block corresponding to an entry | |
| bool | readBlock (GreatWksDBParserInternal::Block &block, int fieldSize) |
| try to read a unknown block, knowing the field size | |
| bool | readZone12 (MWAWEntry const &zone) |
| try to read the small zone 12(unknown format, maybe some preferences) | |
| bool | readBlockHeader2 (GreatWksDBParserInternal::Block &block) |
| try to read the 2th big zone (maybe a list of pointers, but I only see a list of 0:recordId ) | |
| bool | readBlockHeader (GreatWksDBParserInternal::BlockHeader &entry) |
| try to read a big block entry | |
Protected Member Functions inherited from MWAWSpreadsheetParser | |
| MWAWSpreadsheetParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
| constructor (protected) | |
| MWAWSpreadsheetParser (MWAWParserStatePtr const &state) | |
| constructor using a state | |
Protected Member Functions inherited from MWAWParser | |
| MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
| constructor (protected) | |
| MWAWParser (MWAWParserStatePtr const &state) | |
| constructor using a state | |
| void | setVersion (int vers) |
| sets the document's version | |
| void | setGraphicListener (MWAWGraphicListenerPtr &listener) |
| sets the graphic listener | |
| void | resetGraphicListener () |
| resets the listener | |
| void | setPresentationListener (MWAWPresentationListenerPtr &listener) |
| sets the presentation listener | |
| void | resetPresentationListener () |
| resets the listener | |
| void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener) |
| sets the spreadsheet listener | |
| void | resetSpreadsheetListener () |
| resets the listener | |
| void | setTextListener (MWAWTextListenerPtr &listener) |
| sets the text listener | |
| void | resetTextListener () |
| resets the listener | |
| void | setAsciiName (char const *name) |
| Debugging: change the default ascii file. | |
| std::string const & | asciiName () const |
| return the ascii file name | |
Protected Attributes | |
| std::shared_ptr< GreatWksDBParserInternal::State > | m_state |
| the state | |
| std::shared_ptr< GreatWksDocument > | m_document |
| the document | |
Friends | |
| class | GreatWksDBParserInternal::SubDocument |
the main class to read a GreatWorks database file
| GreatWksDBParser::GreatWksDBParser | ( | MWAWInputStreamPtr const & | input, |
| MWAWRSRCParserPtr const & | rsrcParser, | ||
| MWAWHeader * | header ) |
constructor
|
final |
destructor
|
finalvirtual |
checks if the document header is correct (or not)
Implements MWAWParser.
Referenced by GreatWksDBParserInternal::SubDocument, and parse().
|
protected |
check if a pointer correspond or not to a small zone entry, if so update the entry
Referenced by GreatWksDBParserInternal::SubDocument, readFormLinks(), and readHeader().
|
protected |
try to create a block corresponding to an entry
Referenced by createZones(), GreatWksDBParserInternal::SubDocument, and readFieldRecords().
|
protected |
creates the listener which will be associated to the document
Referenced by GreatWksDBParserInternal::SubDocument, and parse().
|
protected |
finds the different objects zones
Referenced by GreatWksDBParserInternal::SubDocument, and parse().
|
protected |
inits all internal variables
Referenced by GreatWksDBParser(), and GreatWksDBParserInternal::SubDocument.
|
finalvirtual |
virtual function used to parse the input
Implements MWAWSpreadsheetParser.
Referenced by GreatWksDBParserInternal::SubDocument.
|
protected |
try to read a unknown block, knowing the field size
Referenced by GreatWksDBParserInternal::SubDocument.
|
protected |
try to read a big block entry
Referenced by checkHeader(), GreatWksDBParserInternal::SubDocument, readFieldLinks(), and readHeader().
|
protected |
try to read the 2th big zone (maybe a list of pointers, but I only see a list of 0:recordId )
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
read the database block
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
try to read a field
Referenced by GreatWksDBParserInternal::SubDocument, and readFields().
|
protected |
try to read a field extra v2 zone ( small zone 13)
Referenced by GreatWksDBParserInternal::SubDocument, and readDatabase().
|
protected |
try to read a zone which links a field to zone record
Referenced by GreatWksDBParserInternal::SubDocument, and readDatabase().
|
protected |
try to read a list of records corresponding to field
Referenced by GreatWksDBParserInternal::SubDocument, and readDatabase().
|
protected |
try to read the fields' zone
Referenced by GreatWksDBParserInternal::SubDocument, and readDatabase().
|
protected |
try to read a form zone
Referenced by GreatWksDBParserInternal::SubDocument, and readFormLinks().
|
protected |
try to read the list of form
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
try to read a formula result in field definition
Referenced by GreatWksDBParserInternal::SubDocument, and readFields().
|
protected |
try to read a formula result in a row content zone
Referenced by GreatWksDBParserInternal::SubDocument, and readRowRecords().
|
protected |
try to read the free zone list: 0th big zone
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
try to read the database header: list of zones, ...
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
try to read a int's zone
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
try to read the record list (the 3th big zone)
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
try to read row record to small zone link (the 1th big zone)
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
try to read a list of records corresponding to a row
Referenced by GreatWksDBParserInternal::SubDocument, and readDatabase().
|
protected |
try to read an unknown small zone, ie. a default reader: type, 0, size, N, dSz
Referenced by createZones(), GreatWksDBParserInternal::SubDocument, and readDatabase().
|
protected |
try to read the small zone 12(unknown format, maybe some preferences)
Referenced by createZones(), and GreatWksDBParserInternal::SubDocument.
|
protected |
try to send the main database
Referenced by GreatWksDBParserInternal::SubDocument, and parse().
|
protected |
try to send the i^th header/footer
Referenced by GreatWksDBParserInternal::SubDocument.
|
friend |
|
protected |
the document
Referenced by checkHeader(), createDocument(), createZones(), GreatWksDBParser(), init(), readForm(), readFormula(), sendDatabase(), and sendHF().
|
protected |
the state
Referenced by checkHeader(), createDocument(), createZones(), GreatWksDBParser(), init(), readDatabase(), readFieldAuxis(), readFieldRecords(), readFields(), readHeader(), readRowLinks(), readRowRecords(), sendDatabase(), and sendHF().