the main class to read/store generic data of a GreatWorks document More...
#include <GreatWksDocument.hxx>
Public Member Functions | |
GreatWksDocument (MWAWParser &parser) | |
constructor | |
virtual | ~GreatWksDocument () |
destructor | |
bool | checkHeader (MWAWHeader *header, bool strict=false) |
checks if the document header is correct (or not) | |
MWAWParser & | getMainParser () |
returns the main parser | |
std::shared_ptr< GreatWksGraph > | getGraphParser () |
returns the graph parser | |
std::shared_ptr< GreatWksText > | getTextParser () |
returns the text parser | |
MWAWSection | getMainSection () const |
return the main section | |
void | newPage (int page) |
send a page break | |
bool | sendPicture (MWAWEntry const &entry, MWAWPosition pos) |
send a picture | |
bool | canSendTextboxAsGraphic (MWAWEntry const &entry) |
check if a textbox can be send in a graphic zone, ie. does not contains any graphic | |
bool | sendTextbox (MWAWEntry const &entry, MWAWListenerPtr listener) |
try to send textbox | |
Public Attributes | |
std::shared_ptr< MWAWParserState > | m_parserState |
the parser state | |
Protected Types | |
typedef MWAWSection(MWAWParser::* | GetMainSection) () const |
callback used to return the main section | |
typedef void(MWAWParser::* | NewPage) (int page) |
callback used to send a page break | |
Protected Member Functions | |
bool | readRSRCZones () |
read the resource fork zone | |
bool | readCellInFormula (MWAWVec2i const &pos, MWAWCellContent::FormulaInstruction &instr) |
reads a cell | |
bool | readString (long endPos, std::string &res) |
try to read a string | |
bool | readNumber (long endPos, double &res, bool &isNan) |
try to read a number | |
bool | readFormula (MWAWVec2i const &cPos, long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula, std::string &error) |
read to read a formula | |
bool | readPrintInfo (MWAWEntry const &entry) |
read a PrintInfo block ( PRNT resource block ) | |
bool | readWPSN (MWAWEntry const &entry) |
read the windows positions ( WPSN resource block ) | |
bool | readARRs (MWAWEntry const &entry) |
read a unknown zone ( ARRs resource block: v2 ) | |
bool | readDaHS (MWAWEntry const &entry) |
read a unknown zone ( DaHS resource block: v2 ) | |
bool | readGrDS (MWAWEntry const &entry) |
read a unknown zone ( GrDS resource block: v2 ) | |
bool | readNxEd (MWAWEntry const &entry) |
read a unknown zone ( NxED resource block: v2 ) | |
MWAWInputStreamPtr | rsrcInput () |
return the input input | |
libmwaw::DebugFile & | rsrcAscii () |
a DebugFile used to write what we recognize when we parse the document in rsrc | |
Protected Attributes | |
std::shared_ptr< GreatWksDocumentInternal::State > | m_state |
the state | |
MWAWParser * | m_parser |
the main parser | |
std::shared_ptr< GreatWksGraph > | m_graphParser |
the graph document | |
std::shared_ptr< GreatWksText > | m_textParser |
the text document | |
GetMainSection | m_getMainSection |
the getMainSection callback | |
NewPage | m_newPage |
the new page callback | |
Private Member Functions | |
GreatWksDocument (GreatWksDocument const &orig)=delete | |
GreatWksDocument & | operator= (GreatWksDocument const &orig)=delete |
Friends | |
class | GreatWksParser |
class | GreatWksDBParser |
class | GreatWksDRParser |
class | GreatWksSSParser |
the main class to read/store generic data of a GreatWorks document
|
protected |
callback used to return the main section
|
protected |
callback used to send a page break
|
explicit |
constructor
|
virtual |
destructor
|
privatedelete |
bool GreatWksDocument::canSendTextboxAsGraphic | ( | MWAWEntry const & | entry | ) |
check if a textbox can be send in a graphic zone, ie. does not contains any graphic
Referenced by GreatWksGraph::canCreateGraphic(), GreatWksGraph::sendGroupChild(), and GreatWksGraph::sendTextbox().
bool GreatWksDocument::checkHeader | ( | MWAWHeader * | header, |
bool | strict = false |
||
) |
checks if the document header is correct (or not)
|
inline |
returns the graph parser
Referenced by sendPicture().
|
inline |
returns the main parser
MWAWSection GreatWksDocument::getMainSection | ( | ) | const |
return the main section
Referenced by GreatWksText::sendZone().
|
inline |
returns the text parser
Referenced by canSendTextboxAsGraphic(), and sendTextbox().
void GreatWksDocument::newPage | ( | int | page | ) |
send a page break
Referenced by GreatWksText::sendZone().
|
privatedelete |
|
protected |
read a unknown zone ( ARRs resource block: v2 )
Referenced by readRSRCZones().
|
protected |
reads a cell
Referenced by readFormula().
|
protected |
read a unknown zone ( DaHS resource block: v2 )
Referenced by readRSRCZones().
|
protected |
read to read a formula
|
protected |
read a unknown zone ( GrDS resource block: v2 )
Referenced by readRSRCZones().
|
protected |
try to read a number
Referenced by readFormula().
|
protected |
read a unknown zone ( NxED resource block: v2 )
Referenced by readRSRCZones().
|
protected |
read a PrintInfo block ( PRNT resource block )
Referenced by readRSRCZones().
|
protected |
read the resource fork zone
|
protected |
try to read a string
Referenced by readFormula().
|
protected |
read the windows positions ( WPSN resource block )
Referenced by readRSRCZones().
|
protected |
a DebugFile used to write what we recognize when we parse the document in rsrc
Referenced by readARRs(), readDaHS(), readGrDS(), readNxEd(), readPrintInfo(), and readWPSN().
|
protected |
return the input input
Referenced by readARRs(), readDaHS(), readGrDS(), readNxEd(), readPrintInfo(), and readWPSN().
bool GreatWksDocument::sendPicture | ( | MWAWEntry const & | entry, |
MWAWPosition | pos | ||
) |
send a picture
Referenced by GreatWksText::sendZone().
bool GreatWksDocument::sendTextbox | ( | MWAWEntry const & | entry, |
MWAWListenerPtr | listener | ||
) |
try to send textbox
Referenced by GreatWksGraph::sendTextbox().
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
the getMainSection callback
Referenced by getMainSection().
|
protected |
the graph document
Referenced by getGraphParser(), GreatWksDocument(), and readRSRCZones().
|
protected |
the main parser
Referenced by getMainParser(), getMainSection(), newPage(), readPrintInfo(), readRSRCZones(), rsrcAscii(), and rsrcInput().
std::shared_ptr<MWAWParserState> GreatWksDocument::m_parserState |
the parser state
Referenced by canSendTextboxAsGraphic(), checkHeader(), readCellInFormula(), readFormula(), readNumber(), readString(), sendPicture(), and sendTextbox().
|
protected |
the state
Referenced by checkHeader(), and GreatWksDocument().
|
protected |
the text document
Referenced by checkHeader(), getTextParser(), and GreatWksDocument().