main document information used to create a ClarisWorks file More...
#include <ClarisWksDocument.hxx>
Public Member Functions | |
ClarisWksDocument (MWAWParser &parser) | |
constructor More... | |
~ClarisWksDocument () | |
virtual destructor More... | |
bool | checkHeader (MWAWHeader *header, bool strict=false) |
checks if the document header is correct (or not) More... | |
bool | createZones () |
finds the different objects zones More... | |
Vec2i | getDocumentPages () const |
returns the number of expected pages ( accross pages x down page) More... | |
double | getTextHeight () const |
returns the page height, ie. paper size less margin (in inches) less header/footer size More... | |
Vec2f | getPageLeftTop () const |
returns the page left top point ( in inches) More... | |
void | getHeaderFooterId (int &headerId, int &footerId) const |
returns the header/footer id More... | |
MWAWSection | getMainSection () const |
returns the main document section More... | |
shared_ptr< ClarisWksStruct::DSET > | getZone (int zId) const |
return the zone corresponding to an id ( low level) More... | |
void | newPage (int page) |
send a page break More... | |
std::vector< int > const & | getMainZonesList () const |
returns the list of the main zones More... | |
void | forceParsed (int zoneId) |
indicates that a zone is parser More... | |
bool | canSendZoneAsGraphic (int number) const |
check if we can send a zone as a graphic More... | |
bool | sendZone (int zoneId, MWAWListenerPtr listener=MWAWListenerPtr(), MWAWPosition pos=MWAWPosition()) |
try to send a zone More... | |
void | sendFootnote (int zoneId) |
ask the main parser to create a document to send a footnote More... | |
MWAWParser & | getMainParser () |
returns the main parser More... | |
shared_ptr< ClarisWksStyleManager > | getStyleManager () |
returns the style manager More... | |
shared_ptr< ClarisWksDatabase > | getDatabaseParser () |
returns the database parser More... | |
shared_ptr< ClarisWksGraph > | getGraphParser () |
returns the graph parser More... | |
shared_ptr< ClarisWksPresentation > | getPresentationParser () |
returns the presentation parser More... | |
shared_ptr< ClarisWksSpreadsheet > | getSpreadsheetParser () |
returns the spreadsheet parser More... | |
shared_ptr< ClarisWksTable > | getTableParser () |
returns the table parser More... | |
shared_ptr< ClarisWksText > | getTextParser () |
returns the text parser More... | |
bool | readZone () |
read a zone More... | |
bool | readDocHeader () |
reads the document header More... | |
bool | readDocInfo () |
reads the document info part ( end of the header) More... | |
bool | readPrintInfo () |
read the print info zone More... | |
bool | readEndTable (long &eof) |
reads the end table ( appears in v3.0 : file version ? ) More... | |
bool | readCPRT (MWAWEntry const &entry) |
bool | readMARKList (MWAWEntry const &entry) |
bool | readURL (long endPos) |
bool | readBookmark (long endPos) |
bool | readDocumentMark (long endPos) |
bool | readEndMark (long endPos) |
bool | readDSUM (MWAWEntry const &entry, bool inHeader) |
bool | readSNAP (MWAWEntry const &entry) |
bool | readTNAM (MWAWEntry const &entry) |
shared_ptr< ClarisWksStruct::DSET > | readDSET (bool &complete) |
reads the zone DSET More... | |
void | typeMainZones () |
try to type the main zones More... | |
int | typeMainZonesRec (int zId, ClarisWksStruct::DSET::Type type, int maxHeight) |
try to type the main zones recursif, returns the father id More... | |
bool | exploreZonesGraph () |
try to find the zone dags structure... More... | |
bool | exploreZonesGraphRec (int zId, std::set< int > ¬DoneList) |
try to find the zone tree graph ( DSF) function More... | |
bool | readStructZone (char const *zoneName, bool hasEntete) |
try to read a structured zone More... | |
bool | readStructIntZone (char const *zoneName, bool hasEntete, int fSz, std::vector< int > &res) |
try to read a int structured zone where fSz to the int size: 1(int8), 2(int16), 4(int32) More... | |
void | checkOrdering (std::vector< int16_t > &vec16, std::vector< int32_t > &vec32) const |
small fonction used to check unusual endian ordering of a list of int16_t, int32_t More... | |
Public Attributes | |
shared_ptr< MWAWParserState > | m_parserState |
the parser state More... | |
Protected Types | |
typedef void(MWAWParser::* | NewPage )(int page) |
callback used to send a page break More... | |
typedef void(MWAWParser::* | SendFootnote )(int zoneId) |
callback used to send a footnote More... | |
Protected Attributes | |
shared_ptr < ClarisWksDocumentInternal::State > | m_state |
the state More... | |
MWAWParser * | m_parser |
the main parser More... | |
shared_ptr< ClarisWksStyleManager > | m_styleManager |
the style manager More... | |
shared_ptr< ClarisWksDatabase > | m_databaseParser |
the database parser More... | |
shared_ptr< ClarisWksGraph > | m_graphParser |
the graph parser More... | |
shared_ptr< ClarisWksPresentation > | m_presentationParser |
the spreadsheet parser More... | |
shared_ptr< ClarisWksSpreadsheet > | m_spreadsheetParser |
the spreadsheet parser More... | |
shared_ptr< ClarisWksTable > | m_tableParser |
the table parser More... | |
shared_ptr< ClarisWksText > | m_textParser |
the text parser More... | |
NewPage | m_newPage |
the new page callback More... | |
SendFootnote | m_sendFootnote |
the send footnote callback More... | |
Private Member Functions | |
ClarisWksDocument (ClarisWksDocument const &orig) | |
ClarisWksDocument | operator= (ClarisWksDocument const &orig) |
Friends | |
class | ClarisWksParser |
class | ClarisWksBMParser |
class | ClarisWksSSParser |
main document information used to create a ClarisWorks file
|
protected |
callback used to send a page break
|
protected |
callback used to send a footnote
ClarisWksDocument::ClarisWksDocument | ( | MWAWParser & | parser | ) |
constructor
ClarisWksDocument::~ClarisWksDocument | ( | ) |
virtual destructor
|
private |
bool ClarisWksDocument::canSendZoneAsGraphic | ( | int | number | ) | const |
check if we can send a zone as a graphic
Referenced by ClarisWksGraph::canSendAsGraphic(), ClarisWksGraph::sendGroup(), and ClarisWksGraph::sendGroupChild().
bool ClarisWksDocument::checkHeader | ( | MWAWHeader * | header, |
bool | strict = false |
||
) |
checks if the document header is correct (or not)
void ClarisWksDocument::checkOrdering | ( | std::vector< int16_t > & | vec16, |
std::vector< int32_t > & | vec32 | ||
) | const |
small fonction used to check unusual endian ordering of a list of int16_t, int32_t
Referenced by ClarisWksStyleManager::readGraphStyles(), and ClarisWksGraph::readGroupUnknown().
bool ClarisWksDocument::createZones | ( | ) |
finds the different objects zones
bool ClarisWksDocument::exploreZonesGraph | ( | ) |
try to find the zone dags structure...
Referenced by createZones().
bool ClarisWksDocument::exploreZonesGraphRec | ( | int | zId, |
std::set< int > & | notDoneList | ||
) |
try to find the zone tree graph ( DSF) function
Referenced by exploreZonesGraph().
void ClarisWksDocument::forceParsed | ( | int | zoneId | ) |
indicates that a zone is parser
Referenced by ClarisWksPresentation::sendZone(), and ClarisWksTable::sendZone().
|
inline |
returns the database parser
Referenced by readDSET(), and sendZone().
Vec2i ClarisWksDocument::getDocumentPages | ( | ) | const |
returns the number of expected pages ( accross pages x down page)
Referenced by ClarisWksGraph::numPages().
|
inline |
returns the graph parser
Referenced by readDSET(), sendZone(), and typeMainZones().
void ClarisWksDocument::getHeaderFooterId | ( | int & | headerId, |
int & | footerId | ||
) | const |
returns the header/footer id
Referenced by ClarisWksGraph::updateInformation().
|
inline |
returns the main parser
MWAWSection ClarisWksDocument::getMainSection | ( | ) | const |
returns the main document section
Referenced by ClarisWksText::sendText().
std::vector< int > const & ClarisWksDocument::getMainZonesList | ( | ) | const |
returns the list of the main zones
Referenced by createZones().
Vec2f ClarisWksDocument::getPageLeftTop | ( | ) | const |
returns the page left top point ( in inches)
Referenced by ClarisWksGraph::sendGroup().
|
inline |
returns the presentation parser
Referenced by readDSET(), sendZone(), and typeMainZones().
|
inline |
returns the spreadsheet parser
Referenced by readDSET(), and sendZone().
|
inline |
returns the style manager
Referenced by ClarisWksText::readFont(), ClarisWksGraph::readGroupDef(), ClarisWksText::readParagraphs(), ClarisWksDbaseContent::readRecordSS(), ClarisWksDbaseContent::readRecordSSV1(), ClarisWksTable::readTableBorders(), ClarisWksTable::readTableCells(), and ClarisWksText::sendText().
|
inline |
returns the table parser
Referenced by readDSET(), and sendZone().
double ClarisWksDocument::getTextHeight | ( | ) | const |
returns the page height, ie. paper size less margin (in inches) less header/footer size
Referenced by ClarisWksGraph::updateInformation().
|
inline |
returns the text parser
Referenced by readDocHeader(), readDSET(), ClarisWksStyleManager::readGenStyle(), and sendZone().
shared_ptr< ClarisWksStruct::DSET > ClarisWksDocument::getZone | ( | int | zId | ) | const |
return the zone corresponding to an id ( low level)
Referenced by canSendZoneAsGraphic(), forceParsed(), ClarisWksGraph::sendGroup(), ClarisWksGraph::sendGroupChild(), and sendZone().
void ClarisWksDocument::newPage | ( | int | page | ) |
send a page break
Referenced by ClarisWksText::sendText(), and ClarisWksPresentation::sendZone().
|
private |
bool ClarisWksDocument::readBookmark | ( | long | endPos | ) |
Referenced by readMARKList().
bool ClarisWksDocument::readCPRT | ( | MWAWEntry const & | entry | ) |
Referenced by readEndTable().
bool ClarisWksDocument::readDocHeader | ( | ) |
reads the document header
Referenced by createZones().
bool ClarisWksDocument::readDocInfo | ( | ) |
reads the document info part ( end of the header)
Referenced by createZones().
bool ClarisWksDocument::readDocumentMark | ( | long | endPos | ) |
Referenced by readMARKList().
shared_ptr< ClarisWksStruct::DSET > ClarisWksDocument::readDSET | ( | bool & | complete | ) |
bool ClarisWksDocument::readDSUM | ( | MWAWEntry const & | entry, |
bool | inHeader | ||
) |
Referenced by readDocHeader(), and readEndTable().
bool ClarisWksDocument::readEndMark | ( | long | endPos | ) |
Referenced by readBookmark(), readDocumentMark(), and readURL().
bool ClarisWksDocument::readEndTable | ( | long & | eof | ) |
reads the end table ( appears in v3.0 : file version ? )
Referenced by createZones().
bool ClarisWksDocument::readMARKList | ( | MWAWEntry const & | entry | ) |
Referenced by readEndTable().
bool ClarisWksDocument::readPrintInfo | ( | ) |
read the print info zone
Referenced by readDocHeader().
bool ClarisWksDocument::readSNAP | ( | MWAWEntry const & | entry | ) |
Referenced by readEndTable().
bool ClarisWksDocument::readStructIntZone | ( | char const * | zoneName, |
bool | hasEntete, | ||
int | fSz, | ||
std::vector< int > & | res | ||
) |
try to read a int structured zone where fSz to the int size: 1(int8), 2(int16), 4(int32)
Referenced by ClarisWksGraph::readGroupHeader().
bool ClarisWksDocument::readStructZone | ( | char const * | zoneName, |
bool | hasEntete | ||
) |
try to read a structured zone
Referenced by readDocHeader(), and readZone().
bool ClarisWksDocument::readTNAM | ( | MWAWEntry const & | entry | ) |
Referenced by readEndTable().
bool ClarisWksDocument::readURL | ( | long | endPos | ) |
Referenced by readMARKList().
bool ClarisWksDocument::readZone | ( | ) |
read a zone
Referenced by createZones().
void ClarisWksDocument::sendFootnote | ( | int | zoneId | ) |
ask the main parser to create a document to send a footnote
Referenced by ClarisWksText::sendText().
bool ClarisWksDocument::sendZone | ( | int | zoneId, |
MWAWListenerPtr | listener = MWAWListenerPtr() , |
||
MWAWPosition | pos = MWAWPosition() |
||
) |
try to send a zone
Referenced by ClarisWksTable::askMainToSendZone(), ClarisWksGraph::askToSend(), ClarisWksGraph::sendGroup(), ClarisWksGraph::sendGroupChild(), ClarisWksText::sendText(), and ClarisWksPresentation::sendZone().
void ClarisWksDocument::typeMainZones | ( | ) |
try to type the main zones
Referenced by createZones().
int ClarisWksDocument::typeMainZonesRec | ( | int | zId, |
ClarisWksStruct::DSET::Type | type, | ||
int | maxHeight | ||
) |
try to type the main zones recursif, returns the father id
Referenced by typeMainZones().
|
friend |
|
friend |
|
friend |
|
protected |
the database parser
Referenced by canSendZoneAsGraphic(), ClarisWksDocument(), and getDatabaseParser().
|
protected |
the graph parser
Referenced by canSendZoneAsGraphic(), ClarisWksDocument(), and getGraphParser().
|
protected |
the main parser
Referenced by getMainParser(), newPage(), readDocHeader(), readPrintInfo(), and sendFootnote().
shared_ptr<MWAWParserState> ClarisWksDocument::m_parserState |
the parser state
Referenced by checkHeader(), checkOrdering(), createZones(), getMainSection(), getPageLeftTop(), getTextHeight(), readBookmark(), readCPRT(), readDocHeader(), readDocInfo(), readDocumentMark(), readDSET(), readDSUM(), readEndMark(), readEndTable(), readMARKList(), readPrintInfo(), readSNAP(), readStructIntZone(), readStructZone(), readTNAM(), readURL(), readZone(), sendZone(), and typeMainZones().
|
protected |
the spreadsheet parser
Referenced by ClarisWksDocument(), and getPresentationParser().
|
protected |
the send footnote callback
Referenced by sendFootnote().
|
protected |
the spreadsheet parser
Referenced by canSendZoneAsGraphic(), ClarisWksDocument(), and getSpreadsheetParser().
|
protected |
the state
Referenced by checkHeader(), exploreZonesGraph(), exploreZonesGraphRec(), getDocumentPages(), getHeaderFooterId(), getMainSection(), getMainZonesList(), getPageLeftTop(), getTextHeight(), getZone(), readDocHeader(), readDocInfo(), readDSET(), readPrintInfo(), typeMainZones(), and typeMainZonesRec().
|
protected |
the style manager
Referenced by ClarisWksDocument(), getStyleManager(), readDocHeader(), and readEndTable().
|
protected |
the table parser
Referenced by ClarisWksDocument(), and getTableParser().
|
protected |
the text parser
Referenced by canSendZoneAsGraphic(), ClarisWksDocument(), and getTextParser().