Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
GreatWksDBParser Class Referencefinal

the main class to read a GreatWorks database file More...

`#include <GreatWksDBParser.hxx>`

Inheritance diagram for GreatWksDBParser:

## Public Member Functions
| GreatWksDBParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor More...
| ~GreatWksDBParser () final
| destructor More...
bool | checkHeader (MWAWHeader *header, bool strict=false) final
| checks if the document header is correct (or not) More...
void | parse (librevenge::RVNGSpreadsheetInterface *documentInterface) final
| virtual function used to parse the input More...
Public Member Functions inherited from MWAWSpreadsheetParser
| ~MWAWSpreadsheetParser () override
| destructor More...
Public Member Functions inherited from MWAWParser
virtual | ~MWAWParser ()
| virtual destructor More...
int | version () const
| returns the works version More...
MWAWParserStatePtr | getParserState ()
| returns the parser state More...
MWAWHeader * | getHeader ()
| returns the header More...
MWAWInputStreamPtr & | getInput ()
| returns the actual input More...
MWAWListenerPtr | getMainListener ()
| returns the main listener More...
MWAWGraphicListenerPtr & | getGraphicListener ()
| returns the graphic listener More...
MWAWPresentationListenerPtr & | getPresentationListener ()
| returns the presentation listener More...
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener ()
| returns the spreadsheet listener More...
MWAWTextListenerPtr & | getTextListener ()
| returns the text listener More...
MWAWFontConverterPtr & | getFontConverter ()
| returns the font converter More...
MWAWFontManagerPtr & | getFontManager ()
| returns the font manager More...
MWAWPageSpan const & | getPageSpan () const
| returns the actual page dimension More...
MWAWPageSpan & | getPageSpan ()
| returns the actual page dimension More...
double | getFormLength () const
| returns the form length More...
double | getFormWidth () const
| returns the form width More...
double | getPageLength () const
| returns the page length (form length without margin ) More...
double | getPageWidth () const
| returns the page width (form width without margin ) More...
MWAWRSRCParserPtr & | getRSRCParser ()
| returns the rsrc parser More...
libmwaw::DebugFile & | ascii ()
| a DebugFile used to write what we recognize when we parse the document More...

## Protected Member Functions
void | init ()
| inits all internal variables More...
void | createDocument (librevenge::RVNGSpreadsheetInterface *documentInterface)
| creates the listener which will be associated to the document More...
bool | sendDatabase ()
| try to send the main database More...
bool | sendHF (int id)
| try to send the i^th header/footer More...
bool | createZones ()
| finds the different objects zones More...
bool | readDatabase ()
| read the database block More...
bool | readHeader ()
| try to read the database header: list of zones, ... More...
bool | readFields (MWAWEntry const &zone)
| try to read the fields' zone More...
bool | readField (GreatWksDBParserInternal::Field &field)
| try to read a field More...
bool | readFieldAuxis (MWAWEntry const &zon)
| try to read a field extra v2 zone ( small zone 13) More...
bool | readFieldLinks (GreatWksDBParserInternal::Field &field)
| try to read a zone which links a field to zone record More...
bool | readFieldRecords (GreatWksDBParserInternal::Field &field)
| try to read a list of records corresponding to field More...
bool | readFormLinks (MWAWEntry const &zone)
| try to read the list of form More...
bool | readForm (MWAWEntry const &zone)
| try to read a form zone More...
bool | readRowLinks (GreatWksDBParserInternal::Block &block)
| try to read row record to small zone link (the 1th big zone) More...
bool | readRowRecords (MWAWEntry const &zone)
| try to read a list of records corresponding to a row More...
bool | readRecordList (GreatWksDBParserInternal::Block &block)
| try to read the record list (the 3th big zone) More...
bool | readFreeList (GreatWksDBParserInternal::Block &block)
| try to read the free zone list: 0th big zone More...
bool | readFormula (long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula)
| try to read a formula result in field definition More...
bool | readFormulaResult (long endPos, GreatWksDBParserInternal::Cell &cell, std::string &extra)
| try to read a formula result in a row content zone More...
bool | readIntList (MWAWEntry const &zone, std::vector< int > &list)
| try to read a int's zone More...
bool | readSmallZone (MWAWEntry const &zone)
| try to read an unknown small zone, ie. a default reader: type, 0, size, N, dSz More...
bool | checkSmallZone (MWAWEntry &zone)
| check if a pointer correspond or not to a small zone entry, if so update the entry More...
std::shared_ptr< GreatWksDBParserInternal::Block > | createBlock (GreatWksDBParserInternal::BlockHeader &entry)
| try to create a block corresponding to an entry More...
bool | readBlock (GreatWksDBParserInternal::Block &block, int fieldSize)
| try to read a unknown block, knowing the field size More...
bool | readZone12 (MWAWEntry const &zone)
| try to read the small zone 12(unknown format, maybe some preferences) More...
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 ) More...
bool | readBlockHeader (GreatWksDBParserInternal::BlockHeader &entry)
| try to read a big block entry More...
Protected Member Functions inherited from MWAWSpreadsheetParser
| MWAWSpreadsheetParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor (protected) More...
| MWAWSpreadsheetParser (MWAWParserStatePtr const &state)
| constructor using a state More...
Protected Member Functions inherited from MWAWParser
| MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor (protected) More...
| MWAWParser (MWAWParserStatePtr const &state)
| constructor using a state More...
void | setVersion (int vers)
| sets the document's version More...
void | setGraphicListener (MWAWGraphicListenerPtr &listener)
| sets the graphic listener More...
void | resetGraphicListener ()
| resets the listener More...
void | setPresentationListener (MWAWPresentationListenerPtr &listener)
| sets the presentation listener More...
void | resetPresentationListener ()
| resets the listener More...
void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener)
| sets the spreadsheet listener More...
void | resetSpreadsheetListener ()
| resets the listener More...
void | setTextListener (MWAWTextListenerPtr &listener)
| sets the text listener More...
void | resetTextListener ()
| resets the listener More...
void | setAsciiName (char const *name)
| Debugging: change the default ascii file. More...
std::string const & | asciiName () const
| return the ascii file name More...

## Protected Attributes
std::shared_ptr< GreatWksDBParserInternal::State > | m_state
| the state More...
std::shared_ptr< GreatWksDocument > | m_document
| the document More...

## Friends
class | GreatWksDBParserInternal::SubDocument

## Detailed Description

the main class to read a GreatWorks database file

## Constructor & Destructor Documentation

## ◆ GreatWksDBParser()

GreatWksDBParser::GreatWksDBParser | ( | MWAWInputStreamPtr const & | input,
|  | MWAWRSRCParserPtr const & | rsrcParser,
|  | MWAWHeader * | header
| ) |  |

constructor

## ◆ ~GreatWksDBParser()

GreatWksDBParser::~GreatWksDBParser | ( |  | ) |
| final

destructor

## Member Function Documentation

## ◆ checkHeader()

bool GreatWksDBParser::checkHeader | ( | MWAWHeader * | header,
|  | bool | strict = `false`
| ) |  |
| final virtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

## ◆ checkSmallZone()

bool GreatWksDBParser::checkSmallZone | ( | MWAWEntry & | zone | ) |
| protected

check if a pointer correspond or not to a small zone entry, if so update the entry

Referenced by readFormLinks(), and readHeader().

## ◆ createBlock()

std::shared_ptr< GreatWksDBParserInternal::Block > GreatWksDBParser::createBlock | ( | GreatWksDBParserInternal::BlockHeader & | entry | ) |
| protected

try to create a block corresponding to an entry

Referenced by createZones(), and readFieldRecords().

## ◆ createDocument()

void GreatWksDBParser::createDocument | ( | librevenge::RVNGSpreadsheetInterface * | documentInterface | ) |
| protected

creates the listener which will be associated to the document

Referenced by parse().

## ◆ createZones()

bool GreatWksDBParser::createZones | ( |  | ) |
| protected

finds the different objects zones

Referenced by parse().

## ◆ init()

void GreatWksDBParser::init | ( |  | ) |
| protected

inits all internal variables

Referenced by GreatWksDBParser().

## ◆ parse()

void GreatWksDBParser::parse | ( | librevenge::RVNGSpreadsheetInterface * | documentInterface | ) |
| final virtual

virtual function used to parse the input

Implements MWAWSpreadsheetParser.

## ◆ readBlock()

bool GreatWksDBParser::readBlock | ( | GreatWksDBParserInternal::Block & | block,
|  | int | fieldSize
| ) |  |
| protected

try to read a unknown block, knowing the field size

## ◆ readBlockHeader()

bool GreatWksDBParser::readBlockHeader | ( | GreatWksDBParserInternal::BlockHeader & | entry | ) |
| protected

try to read a big block entry

Referenced by checkHeader(), readFieldLinks(), and readHeader().

## ◆ readBlockHeader2()

bool GreatWksDBParser::readBlockHeader2 | ( | GreatWksDBParserInternal::Block & | block | ) |
| 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().

## ◆ readDatabase()

bool GreatWksDBParser::readDatabase | ( |  | ) |
| protected

read the database block

Referenced by createZones().

## ◆ readField()

bool GreatWksDBParser::readField | ( | GreatWksDBParserInternal::Field & | field | ) |
| protected

try to read a field

Referenced by readFields().

## ◆ readFieldAuxis()

bool GreatWksDBParser::readFieldAuxis | ( | MWAWEntry const & | zon | ) |
| protected

try to read a field extra v2 zone ( small zone 13)

Referenced by readDatabase().

## ◆ readFieldLinks()

bool GreatWksDBParser::readFieldLinks | ( | GreatWksDBParserInternal::Field & | field | ) |
| protected

try to read a zone which links a field to zone record

Referenced by readDatabase().

## ◆ readFieldRecords()

bool GreatWksDBParser::readFieldRecords | ( | GreatWksDBParserInternal::Field & | field | ) |
| protected

try to read a list of records corresponding to field

Referenced by readDatabase().

## ◆ readFields()

bool GreatWksDBParser::readFields | ( | MWAWEntry const & | zone | ) |
| protected

try to read the fields' zone

Referenced by readDatabase().

## ◆ readForm()

bool GreatWksDBParser::readForm | ( | MWAWEntry const & | zone | ) |
| protected

try to read a form zone

Referenced by readFormLinks().

## ◆ readFormLinks()

bool GreatWksDBParser::readFormLinks | ( | MWAWEntry const & | zone | ) |
| protected

try to read the list of form

Referenced by createZones().

## ◆ readFormula()

bool GreatWksDBParser::readFormula | ( | long | endPos,
|  | std::vector< MWAWCellContent::FormulaInstruction > & | formula
| ) |  |
| protected

try to read a formula result in field definition

Referenced by readFields().

## ◆ readFormulaResult()

bool GreatWksDBParser::readFormulaResult | ( | long | endPos,
|  | GreatWksDBParserInternal::Cell & | cell,
|  | std::string & | extra
| ) |  |
| protected

try to read a formula result in a row content zone

Note
  : we fill the cell content, which can overidden later if we find a formula to associate with the cell

Referenced by readRowRecords().

## ◆ readFreeList()

bool GreatWksDBParser::readFreeList | ( | GreatWksDBParserInternal::Block & | block | ) |
| protected

try to read the free zone list: 0th big zone

Referenced by createZones().

## ◆ readHeader()

bool GreatWksDBParser::readHeader | ( |  | ) |
| protected

try to read the database header: list of zones, ...

Referenced by createZones().

## ◆ readIntList()

bool GreatWksDBParser::readIntList | ( | MWAWEntry const & | zone,
|  | std::vector< int > & | list
| ) |  |
| protected

try to read a int's zone

Referenced by createZones().

## ◆ readRecordList()

bool GreatWksDBParser::readRecordList | ( | GreatWksDBParserInternal::Block & | block | ) |
| protected

try to read the record list (the 3th big zone)

Referenced by createZones().

## ◆ readRowLinks()

bool GreatWksDBParser::readRowLinks | ( | GreatWksDBParserInternal::Block & | block | ) |
| protected

try to read row record to small zone link (the 1th big zone)

Referenced by createZones().

## ◆ readRowRecords()

bool GreatWksDBParser::readRowRecords | ( | MWAWEntry const & | zone | ) |
| protected

try to read a list of records corresponding to a row

Referenced by readDatabase().

## ◆ readSmallZone()

bool GreatWksDBParser::readSmallZone | ( | MWAWEntry const & | zone | ) |
| protected

try to read an unknown small zone, ie. a default reader: type, 0, size, N, dSz

Referenced by createZones(), and readDatabase().

## ◆ readZone12()

bool GreatWksDBParser::readZone12 | ( | MWAWEntry const & | zone | ) |
| protected

try to read the small zone 12(unknown format, maybe some preferences)

Referenced by createZones().

## ◆ sendDatabase()

bool GreatWksDBParser::sendDatabase | ( |  | ) |
| protected

try to send the main database

Referenced by parse().

## ◆ sendHF()

bool GreatWksDBParser::sendHF | ( | int | id | ) |
| protected

try to send the i^th header/footer

## Friends And Related Function Documentation

## ◆ GreatWksDBParserInternal::SubDocument

friend class GreatWksDBParserInternal::SubDocument
| friend

## Member Data Documentation

## ◆ m_document

std::shared_ptr<GreatWksDocument> GreatWksDBParser::m_document
| protected

the document

Referenced by checkHeader(), createDocument(), createZones(), init(), readForm(), readFormula(), sendDatabase(), and sendHF().

## ◆ m_state

std::shared_ptr<GreatWksDBParserInternal::State> GreatWksDBParser::m_state
| protected

the state

Referenced by checkHeader(), createDocument(), createZones(), init(), readDatabase(), readFieldAuxis(), readFieldRecords(), readFields(), readHeader(), readRowLinks(), readRowRecords(), sendDatabase(), and sendHF().

The documentation for this class was generated from the following files:

- GreatWksDBParser.hxx
- GreatWksDBParser.cxx