Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
GreatWksDocument Class Reference

the main class to read/store generic data of a GreatWorks document More...

`#include <GreatWksDocument.hxx>`

## Public Member Functions
| GreatWksDocument (MWAWParser &parser)
| constructor More...
virtual | ~GreatWksDocument ()
| destructor More...
bool | checkHeader (MWAWHeader *header, bool strict=false)
| checks if the document header is correct (or not) More...
MWAWParser & | getMainParser ()
| returns the main parser More...
std::shared_ptr< GreatWksGraph > | getGraphParser ()
| returns the graph parser More...
std::shared_ptr< GreatWksText > | getTextParser ()
| returns the text parser More...
MWAWSection | getMainSection () const
| return the main section More...
void | newPage (int page)
| send a page break More...
bool | sendPicture (MWAWEntry const &entry, MWAWPosition pos)
| send a picture More...
bool | canSendTextboxAsGraphic (MWAWEntry const &entry)
| check if a textbox can be send in a graphic zone, ie. does not contains any graphic More...
bool | sendTextbox (MWAWEntry const &entry, MWAWListenerPtr listener)
| try to send textbox More...

## Public Attributes
std::shared_ptr< MWAWParserState > | m_parserState
| the parser state More...

## Protected Types
typedef MWAWSection(MWAWParser::* | GetMainSection) () const
| callback used to return the main section More...
typedef void(MWAWParser::* | NewPage) (int page)
| callback used to send a page break More...

## Protected Member Functions
bool | readRSRCZones ()
| read the resource fork zone More...
bool | readCellInFormula (MWAWVec2i const &pos, MWAWCellContent::FormulaInstruction &instr)
| reads a cell More...
bool | readString (long endPos, std::string &res)
| try to read a string More...
bool | readNumber (long endPos, double &res, bool &isNan)
| try to read a number More...
bool | readFormula (MWAWVec2i const &cPos, long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula, std::string &error)
| read to read a formula More...
bool | readPrintInfo (MWAWEntry const &entry)
| read a PrintInfo block ( PRNT resource block ) More...
bool | readWPSN (MWAWEntry const &entry)
| read the windows positions ( WPSN resource block ) More...
bool | readARRs (MWAWEntry const &entry)
| read a unknown zone ( ARRs resource block: v2 ) More...
bool | readDaHS (MWAWEntry const &entry)
| read a unknown zone ( DaHS resource block: v2 ) More...
bool | readGrDS (MWAWEntry const &entry)
| read a unknown zone ( GrDS resource block: v2 ) More...
bool | readNxEd (MWAWEntry const &entry)
| read a unknown zone ( NxED resource block: v2 ) More...
MWAWInputStreamPtr | rsrcInput ()
| return the input input More...
libmwaw::DebugFile & | rsrcAscii ()
| a DebugFile used to write what we recognize when we parse the document in rsrc More...

## Protected Attributes
std::shared_ptr< GreatWksDocumentInternal::State > | m_state
| the state More...
MWAWParser * | m_parser
| the main parser More...
std::shared_ptr< GreatWksGraph > | m_graphParser
| the graph document More...
std::shared_ptr< GreatWksText > | m_textParser
| the text document More...
GetMainSection | m_getMainSection
| the getMainSection callback More...
NewPage | m_newPage
| the new page callback More...

## Private Member Functions
| GreatWksDocument (GreatWksDocument const &orig)=delete
GreatWksDocument & | operator= (GreatWksDocument const &orig)=delete

## Friends
class | GreatWksParser
class | GreatWksDBParser
class | GreatWksDRParser
class | GreatWksSSParser

## Detailed Description

the main class to read/store generic data of a GreatWorks document

## Member Typedef Documentation

## ◆ GetMainSection

typedef MWAWSection(MWAWParser::* GreatWksDocument::GetMainSection) () const
| protected

callback used to return the main section

## ◆ NewPage

typedef void(MWAWParser::* GreatWksDocument::NewPage) (int page)
| protected

callback used to send a page break

## Constructor & Destructor Documentation

## ◆ GreatWksDocument() [1/2]

GreatWksDocument::GreatWksDocument | ( | MWAWParser & | parser | ) |
| explicit

constructor

## ◆ ~GreatWksDocument()

GreatWksDocument::~GreatWksDocument | ( |  | ) |
| virtual

destructor

## ◆ GreatWksDocument() [2/2]

GreatWksDocument::GreatWksDocument | ( | GreatWksDocument const & | orig | ) |
| private delete

## Member Function Documentation

## ◆ canSendTextboxAsGraphic()

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().

## ◆ checkHeader()

bool GreatWksDocument::checkHeader | ( | MWAWHeader * | header,
|  | bool | strict = `false`
| ) |  |

checks if the document header is correct (or not)

## ◆ getGraphParser()

std::shared_ptr<GreatWksGraph> GreatWksDocument::getGraphParser | ( |  | ) |
| inline

returns the graph parser

Referenced by sendPicture().

## ◆ getMainParser()

MWAWParser& GreatWksDocument::getMainParser | ( |  | ) |
| inline

returns the main parser

## ◆ getMainSection()

MWAWSection GreatWksDocument::getMainSection | ( |  | ) | const

return the main section

Referenced by GreatWksText::sendZone().

## ◆ getTextParser()

std::shared_ptr<GreatWksText> GreatWksDocument::getTextParser | ( |  | ) |
| inline

returns the text parser

Referenced by canSendTextboxAsGraphic(), and sendTextbox().

## ◆ newPage()

void GreatWksDocument::newPage | ( | int | page | ) |

send a page break

Referenced by GreatWksText::sendZone().

## ◆ operator=()

GreatWksDocument& GreatWksDocument::operator= | ( | GreatWksDocument const & | orig | ) |
| private delete

## ◆ readARRs()

bool GreatWksDocument::readARRs | ( | MWAWEntry const & | entry | ) |
| protected

read a unknown zone ( ARRs resource block: v2 )

Referenced by readRSRCZones().

## ◆ readCellInFormula()

bool GreatWksDocument::readCellInFormula | ( | MWAWVec2i const & | pos,
|  | MWAWCellContent::FormulaInstruction & | instr
| ) |  |
| protected

reads a cell

Referenced by readFormula().

## ◆ readDaHS()

bool GreatWksDocument::readDaHS | ( | MWAWEntry const & | entry | ) |
| protected

read a unknown zone ( DaHS resource block: v2 )

Referenced by readRSRCZones().

## ◆ readFormula()

bool GreatWksDocument::readFormula | ( | MWAWVec2i const & | cPos,
|  | long | endPos,
|  | std::vector< MWAWCellContent::FormulaInstruction > & | formula,
|  | std::string & | error
| ) |  |
| protected

read to read a formula

## ◆ readGrDS()

bool GreatWksDocument::readGrDS | ( | MWAWEntry const & | entry | ) |
| protected

read a unknown zone ( GrDS resource block: v2 )

Referenced by readRSRCZones().

## ◆ readNumber()

bool GreatWksDocument::readNumber | ( | long | endPos,
|  | double & | res,
|  | bool & | isNan
| ) |  |
| protected

try to read a number

Referenced by readFormula().

## ◆ readNxEd()

bool GreatWksDocument::readNxEd | ( | MWAWEntry const & | entry | ) |
| protected

read a unknown zone ( NxED resource block: v2 )

Referenced by readRSRCZones().

## ◆ readPrintInfo()

bool GreatWksDocument::readPrintInfo | ( | MWAWEntry const & | entry | ) |
| protected

read a PrintInfo block ( PRNT resource block )

Referenced by readRSRCZones().

## ◆ readRSRCZones()

bool GreatWksDocument::readRSRCZones | ( |  | ) |
| protected

read the resource fork zone

## ◆ readString()

bool GreatWksDocument::readString | ( | long | endPos,
|  | std::string & | res
| ) |  |
| protected

try to read a string

Referenced by readFormula().

## ◆ readWPSN()

bool GreatWksDocument::readWPSN | ( | MWAWEntry const & | entry | ) |
| protected

read the windows positions ( WPSN resource block )

Referenced by readRSRCZones().

## ◆ rsrcAscii()

libmwaw::DebugFile & GreatWksDocument::rsrcAscii | ( |  | ) |
| 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().

## ◆ rsrcInput()

MWAWInputStreamPtr GreatWksDocument::rsrcInput | ( |  | ) |
| protected

return the input input

Referenced by readARRs(), readDaHS(), readGrDS(), readNxEd(), readPrintInfo(), and readWPSN().

## ◆ sendPicture()

bool GreatWksDocument::sendPicture | ( | MWAWEntry const & | entry,
|  | MWAWPosition | pos
| ) |  |

send a picture

Referenced by GreatWksText::sendZone().

## ◆ sendTextbox()

bool GreatWksDocument::sendTextbox | ( | MWAWEntry const & | entry,
|  | MWAWListenerPtr | listener
| ) |  |

try to send textbox

Referenced by GreatWksGraph::sendTextbox().

## Friends And Related Function Documentation

## ◆ GreatWksDBParser

friend class GreatWksDBParser
| friend

## ◆ GreatWksDRParser

friend class GreatWksDRParser
| friend

## ◆ GreatWksParser

friend class GreatWksParser
| friend

## ◆ GreatWksSSParser

friend class GreatWksSSParser
| friend

## Member Data Documentation

## ◆ m_getMainSection

GetMainSection GreatWksDocument::m_getMainSection
| protected

the getMainSection callback

Referenced by getMainSection().

## ◆ m_graphParser

std::shared_ptr<GreatWksGraph> GreatWksDocument::m_graphParser
| protected

the graph document

Referenced by GreatWksDocument(), and readRSRCZones().

## ◆ m_newPage

NewPage GreatWksDocument::m_newPage
| protected

the new page callback

Referenced by newPage().

## ◆ m_parser

MWAWParser* GreatWksDocument::m_parser
| protected

the main parser

Referenced by getMainSection(), newPage(), readPrintInfo(), readRSRCZones(), rsrcAscii(), and rsrcInput().

## ◆ m_parserState

std::shared_ptr<MWAWParserState> GreatWksDocument::m_parserState

the parser state

Referenced by canSendTextboxAsGraphic(), checkHeader(), readCellInFormula(), readFormula(), readNumber(), readString(), sendPicture(), and sendTextbox().

## ◆ m_state

std::shared_ptr<GreatWksDocumentInternal::State> GreatWksDocument::m_state
| protected

the state

Referenced by checkHeader(), and GreatWksDocument().

## ◆ m_textParser

std::shared_ptr<GreatWksText> GreatWksDocument::m_textParser
| protected

the text document

Referenced by checkHeader(), and GreatWksDocument().

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

- GreatWksDocument.hxx
- GreatWksDocument.cxx