ClarisWksDocument Class Reference

main document information used to create a ClarisWorks file More...

#include <ClarisWksDocument.hxx>

List of all members.

Public Member Functions

 ClarisWksDocument (MWAWParser &parser)
 constructor
 ~ClarisWksDocument ()
 virtual destructor
bool checkHeader (MWAWHeader *header, bool strict=false)
 checks if the document header is correct (or not)
bool createZones ()
 finds the different objects zones
int numPages () const
 returns the document number of page
MWAWVec2i getDocumentPages ()
 returns the number of expected pages ( accross pages x down page)
double getTextHeight () const
 returns the page height, ie. paper size less margin (in inches) less header/footer size
MWAWVec2f getPageLeftTop () const
 returns the page left top point ( in inches)
void updatePageSpanList (std::vector< MWAWPageSpan > &spanList)
 updates the page span list
void updatePageSpanList (std::vector< MWAWPageSpan > &spanList, MWAWPageSpan &master)
 updates the page span list (and returns a master page)
MWAWSection getMainSection () const
 returns the main document section
shared_ptr< ClarisWksStruct::DSETgetZone (int zId) const
 return the zone corresponding to an id ( low level)
void updateChildPositions ()
 try to update the child page of each zone
void newPage (int page, bool softBreak=false)
 send a page break
std::vector< int > const & getMainZonesList () const
 returns the list of the main zones
void forceParsed (int zoneId)
 indicates that a zone is parser
bool canSendZoneAsGraphic (int number) const
 check if we can send a zone as a graphic
bool sendZone (int zoneId, MWAWListenerPtr listener=MWAWListenerPtr(), MWAWPosition pos=MWAWPosition())
 try to send a zone
void sendFootnote (int zoneId)
 ask the main parser to create a document to send a footnote
MWAWParsergetMainParser ()
 returns the main parser
shared_ptr< ClarisWksStyleManagergetStyleManager ()
 returns the style manager
shared_ptr< ClarisWksDatabasegetDatabaseParser ()
 returns the database parser
shared_ptr< ClarisWksGraphgetGraphParser ()
 returns the graph parser
shared_ptr< ClarisWksPresentationgetPresentationParser ()
 returns the presentation parser
shared_ptr< ClarisWksSpreadsheetgetSpreadsheetParser ()
 returns the spreadsheet parser
shared_ptr< ClarisWksTablegetTableParser ()
 returns the table parser
shared_ptr< ClarisWksTextgetTextParser ()
 returns the text parser
bool readZone ()
 read a zone
bool readDocHeader ()
 reads the document header
bool readDocInfo ()
 reads the document info part ( end of the header)
bool readPrintInfo ()
 read the print info zone
bool readEndTable (long &eof)
 reads the end table ( appears in v3.0 : file version ? )
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::DSETreadDSET (bool &complete)
 reads the zone DSET
void typeMainZones ()
 try to type the main zones
int typeMainZonesRec (int zId, ClarisWksStruct::DSET::Position type, int maxHeight)
 try to type the main zones recursif, returns the father id
bool exploreZonesGraph ()
 try to find the zone dags structure...
bool exploreZonesGraphRec (int zId, std::set< int > &notDoneList)
 try to find the zone tree graph ( DSF) function
void cleanZonesGraph ()
 remove uneeded edge (mainly header/footer edges in main graph)
bool readStructCellZone (char const *zoneName, bool hasEntete, std::vector< MWAWVec2i > &res)
 try to read a structured zone list of cells
bool readStringList (char const *zoneName, bool hasEntete, std::vector< std::string > &res)
bool readZoneA ()
 try to read a unknown zone which appear to be filled at least in some v2 database file
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

Public Attributes

shared_ptr< MWAWParserStatem_parserState
 the parser state

Protected Types

typedef void(MWAWParser::* NewPage )(int page, bool softBreak)
 callback used to send a page break
typedef void(MWAWParser::* SendFootnote )(int zoneId)
 callback used to send a footnote

Protected Member Functions

MWAWPageSpan getFinalPageSpan () const
 returns the final page span to use for the document

Protected Attributes

shared_ptr
< ClarisWksDocumentInternal::State
m_state
 the state
MWAWParserm_parser
 the main parser
shared_ptr< ClarisWksStyleManagerm_styleManager
 the style manager
shared_ptr< ClarisWksDatabasem_databaseParser
 the database parser
shared_ptr< ClarisWksGraphm_graphParser
 the graph parser
shared_ptr< ClarisWksPresentationm_presentationParser
 the spreadsheet parser
shared_ptr< ClarisWksSpreadsheetm_spreadsheetParser
 the spreadsheet parser
shared_ptr< ClarisWksTablem_tableParser
 the table parser
shared_ptr< ClarisWksTextm_textParser
 the text parser
NewPage m_newPage
 the new page callback
SendFootnote m_sendFootnote
 the send footnote callback

Private Member Functions

 ClarisWksDocument (ClarisWksDocument const &orig)
ClarisWksDocument operator= (ClarisWksDocument const &orig)

Friends

class ClarisWksParser
class ClarisWksBMParser
class ClarisWksPRParser
class ClarisWksSSParser
class ClarisWksDocumentInternal::SubDocument

Detailed Description

main document information used to create a ClarisWorks file


Member Typedef Documentation

typedef void(MWAWParser::* ClarisWksDocument::NewPage)(int page, bool softBreak) [protected]

callback used to send a page break

typedef void(MWAWParser::* ClarisWksDocument::SendFootnote)(int zoneId) [protected]

callback used to send a footnote


Constructor & Destructor Documentation

virtual destructor


Member Function Documentation

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

remove uneeded edge (mainly header/footer edges in main graph)

Referenced by createZones().

finds the different objects zones

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 ClarisWksTable::sendZone(), and ClarisWksPresentation::sendZone().

returns the database parser

Referenced by readDSET(), and sendZone().

returns the number of expected pages ( accross pages x down page)

Referenced by updateChildPositions().

returns the final page span to use for the document

Referenced by updatePageSpanList().

returns the graph parser

Referenced by readDSET(), and sendZone().

returns the main parser

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

returns the page left top point ( in inches)

Referenced by ClarisWksGraph::sendGroup(), and ClarisWksGraph::sendPageChild().

returns the presentation parser

Referenced by readDSET(), sendZone(), and typeMainZones().

returns the spreadsheet parser

Referenced by readDSET(), and sendZone().

returns the table parser

Referenced by readDSET(), and sendZone().

returns the page height, ie. paper size less margin (in inches) less header/footer size

Referenced by updateChildPositions().

returns the text parser

Referenced by readDocHeader(), readDSET(), ClarisWksStyleManager::readGenStyle(), and sendZone().

void ClarisWksDocument::newPage ( int  page,
bool  softBreak = false 
)

send a page break

Referenced by ClarisWksText::sendText().

returns the document number of page

Referenced by ClarisWksText::updatePageSpanList(), and updatePageSpanList().

ClarisWksDocument ClarisWksDocument::operator= ( ClarisWksDocument const &  orig) [private]
bool ClarisWksDocument::readBookmark ( long  endPos)

Referenced by readMARKList().

bool ClarisWksDocument::readCPRT ( MWAWEntry const &  entry)

Referenced by readEndTable().

reads the document header

Referenced by createZones().

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)

reads the zone DSET

Note:
set complete to true if we read all the zone

Referenced by readZone().

bool ClarisWksDocument::readDSUM ( MWAWEntry const &  entry,
bool  inHeader 
)

Referenced by readDocHeader(), and readEndTable().

bool ClarisWksDocument::readEndMark ( long  endPos)
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().

read the print info zone

Referenced by readDocHeader().

bool ClarisWksDocument::readSNAP ( MWAWEntry const &  entry)

Referenced by readEndTable().

bool ClarisWksDocument::readStringList ( char const *  zoneName,
bool  hasEntete,
std::vector< std::string > &  res 
)
bool ClarisWksDocument::readStructCellZone ( char const *  zoneName,
bool  hasEntete,
std::vector< MWAWVec2i > &  res 
)

try to read a structured zone list of cells

bool ClarisWksDocument::readTNAM ( MWAWEntry const &  entry)

Referenced by readEndTable().

bool ClarisWksDocument::readURL ( long  endPos)

Referenced by readMARKList().

read a zone

Referenced by createZones().

try to read a unknown zone which appear to be filled at least in some v2 database file

Referenced by readDocHeader().

void ClarisWksDocument::sendFootnote ( int  zoneId)

ask the main parser to create a document to send a footnote

Referenced by ClarisWksText::sendText().

try to type the main zones

Referenced by createZones().

int ClarisWksDocument::typeMainZonesRec ( int  zId,
ClarisWksStruct::DSET::Position  type,
int  maxHeight 
)

try to type the main zones recursif, returns the father id

Referenced by typeMainZones().

try to update the child page of each zone

Referenced by createZones().

void ClarisWksDocument::updatePageSpanList ( std::vector< MWAWPageSpan > &  spanList)

updates the page span list

void ClarisWksDocument::updatePageSpanList ( std::vector< MWAWPageSpan > &  spanList,
MWAWPageSpan master 
)

updates the page span list (and returns a master page)


Friends And Related Function Documentation

friend class ClarisWksBMParser [friend]
friend class ClarisWksParser [friend]
friend class ClarisWksPRParser [friend]
friend class ClarisWksSSParser [friend]

Member Data Documentation

the new page callback

Referenced by newPage().

the send footnote callback

Referenced by sendFootnote().

the table parser

Referenced by ClarisWksDocument(), getTableParser(), and numPages().


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