the main class to read a Claris Works file More...
#include <CWParser.hxx>
Public Member Functions | |
CWParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor More... | |
virtual | ~CWParser () |
destructor More... | |
bool | checkHeader (MWAWHeader *header, bool strict=false) |
checks if the document header is correct (or not) More... | |
void | parse (WPXDocumentInterface *documentInterface) |
virtual function used to parse the input More... | |
![]() | |
virtual | ~MWAWParser () |
virtual destructor More... | |
int | version () const |
returns the works version More... | |
void | setVersion (int vers) |
sets the works version More... | |
Protected Member Functions | |
void | init () |
inits all internal variables More... | |
void | createDocument (WPXDocumentInterface *documentInterface) |
creates the listener which will be associated to the document More... | |
bool | createZones () |
finds the different objects zones More... | |
CWStruct::DSET::Type | getZoneType (int zId) const |
try to return the type of a zone 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... | |
void | typeMainZones () |
try to type the main zones More... | |
int | typeMainZonesRec (int zId, CWStruct::DSET::Type type, int maxHeight) |
try to type the main zones recursif, returns the father id More... | |
bool | readZone () |
read a zone More... | |
bool | readPrintInfo () |
read the print info zone 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... | |
float | pageHeight () const |
returns the page height, ie. paper size less margin (in inches) More... | |
float | pageWidth () const |
returns the page width, ie. paper size less margin (in inches) More... | |
Vec2f | getPageLeftTop () const |
returns the page left top point ( in inches) More... | |
void | newPage (int number) |
adds a new page More... | |
bool | sendZone (int zoneId, MWAWPosition pos=MWAWPosition()) |
send a zone More... | |
void | sendZoneInFrame (int zoneId, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList(), WPXPropertyList frameExtras=WPXPropertyList()) |
send a zone in a frame More... | |
void | forceParsed (int zoneId) |
indicate that a zone is already parsed More... | |
void | sendFootnote (int zoneId) |
creates a document to send a footnote More... | |
void | getColumnInfo (int &numColumns, std::vector< int > &width, std::vector< int > &sepWidth) const |
returns the columns information More... | |
bool | getColor (int colId, MWAWColor &col) const |
returns the color corresponding to colId (if possible) More... | |
float | getPatternPercent (int id) const |
return the pattern percent which corresponds to an id (or -1) More... | |
void | getHeaderFooterId (int &headerId, int &footerId) const |
returns the header/footer id More... | |
bool | readDocHeader () |
reads the document header More... | |
bool | readEndTable () |
reads the end table ( appears in v3.0 : file version ? ) More... | |
shared_ptr< CWStruct::DSET > | readDSET (bool &complete) |
reads the zone DSET More... | |
bool | readDSUM (MWAWEntry const &entry, bool inHeader) |
bool | readTNAM (MWAWEntry const &entry) |
bool | readSNAP (MWAWEntry const &entry) |
bool | readCPRT (MWAWEntry const &entry) |
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... | |
![]() | |
MWAWParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor (protected) More... | |
MWAWParser (MWAWParserStatePtr state) | |
constructor using a state More... | |
MWAWParserStatePtr | getParserState () |
returns the parser state More... | |
MWAWHeader * | getHeader () |
returns the header More... | |
MWAWInputStreamPtr & | getInput () |
returns the actual input More... | |
MWAWRSRCParserPtr & | getRSRCParser () |
returns the rsrc parser More... | |
MWAWContentListenerPtr & | getListener () |
returns the listener More... | |
void | setListener (MWAWContentListenerPtr &listener) |
sets the listener More... | |
void | resetListener () |
resets the listener More... | |
MWAWFontConverterPtr & | getFontConverter () |
returns the font converter More... | |
void | setFontConverter (MWAWFontConverterPtr fontConverter) |
sets the font convertor More... | |
libmwaw::DebugFile & | ascii () |
a DebugFile used to write what we recognize when we parse the document 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 | |
shared_ptr < CWParserInternal::State > | m_state |
the state More... | |
MWAWPageSpan | m_pageSpan |
the actual document size More... | |
bool | m_pageSpanSet |
a flag to know if pageSpan is filled More... | |
shared_ptr< CWDatabase > | m_databaseParser |
the database parser More... | |
shared_ptr< CWGraph > | m_graphParser |
the graph parser More... | |
shared_ptr< CWPresentation > | m_presentationParser |
the spreadsheet parser More... | |
shared_ptr< CWSpreadsheet > | m_spreadsheetParser |
the spreadsheet parser More... | |
shared_ptr< CWStyleManager > | m_styleManager |
the style manager More... | |
shared_ptr< CWTable > | m_tableParser |
the table parser More... | |
shared_ptr< CWText > | m_textParser |
the text parser More... | |
Friends | |
class | CWParserInternal::SubDocument |
class | CWDatabase |
class | CWGraph |
class | CWPresentation |
class | CWSpreadsheet |
class | CWStyleManager |
class | CWTable |
class | CWText |
the main class to read a Claris Works file
CWParser::CWParser | ( | MWAWInputStreamPtr | input, |
MWAWRSRCParserPtr | rsrcParser, | ||
MWAWHeader * | header | ||
) |
constructor
|
virtual |
destructor
bool CWParser::checkHeader | ( | MWAWHeader * | header, |
bool | strict = false |
||
) |
checks if the document header is correct (or not)
Referenced by MWAWDocumentInternal::checkBasicMacHeader(), and parse().
|
protected |
small fonction used to check unusual endian ordering of a list of int16_t, int32_t
Referenced by CWStyleManager::readGraphStyles(), and CWGraph::readGroupUnknown().
|
protected |
creates the listener which will be associated to the document
Referenced by parse().
|
protected |
finds the different objects zones
Referenced by parse().
|
protected |
try to find the zone dags structure...
Referenced by createZones().
|
protected |
try to find the zone tree graph ( DSF) function
Referenced by exploreZonesGraph().
|
protected |
indicate that a zone is already parsed
Referenced by CWPresentation::sendZone(), and CWTable::sendZone().
|
protected |
returns the color corresponding to colId (if possible)
Referenced by CWText::readFont(), and CWStyleManager::readGraphStyles().
|
protected |
returns the columns information
Referenced by CWText::sendText().
|
protected |
returns the header/footer id
Referenced by CWGraph::updateInformation().
|
protected |
returns the page left top point ( in inches)
Referenced by CWGraph::sendZone().
|
protected |
return the pattern percent which corresponds to an id (or -1)
Referenced by CWStyleManager::readGraphStyles().
|
protected |
try to return the type of a zone
Referenced by CWGraph::sendZone().
|
protected |
inits all internal variables
Referenced by CWParser().
|
protected |
adds a new page
Referenced by CWText::sendText(), and CWPresentation::sendZone().
|
protected |
returns the page height, ie. paper size less margin (in inches)
Referenced by CWGraph::sendZone().
|
protected |
returns the page width, ie. paper size less margin (in inches)
Referenced by CWText::sendText().
|
virtual |
virtual function used to parse the input
Implements MWAWParser.
Referenced by MWAWDocument::parse().
|
protected |
Referenced by readEndTable().
|
protected |
reads the document header
Referenced by createZones().
|
protected |
|
protected |
Referenced by readDocHeader(), and readEndTable().
|
protected |
reads the end table ( appears in v3.0 : file version ? )
Referenced by createZones().
|
protected |
read the print info zone
Referenced by readDocHeader().
|
protected |
Referenced by readEndTable().
|
protected |
try to read a int structured zone where fSz to the int size: 1(int8), 2(int16), 4(int32)
Referenced by CWGraph::readGroupHeader().
|
protected |
try to read a structured zone
Referenced by readDocHeader().
|
protected |
Referenced by readEndTable().
|
protected |
read a zone
Referenced by createZones().
|
protected |
creates a document to send a footnote
Referenced by CWText::sendText().
|
protected |
send a zone
Referenced by CWTable::askMainToSendZone(), parse(), CWText::sendText(), CWPresentation::sendZone(), and CWGraph::sendZone().
|
protected |
send a zone in a frame
Referenced by CWGraph::sendZone().
|
protected |
try to type the main zones
Referenced by createZones().
|
protected |
try to type the main zones recursif, returns the father id
Referenced by typeMainZones().
|
friend |
Referenced by init().
|
friend |
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
protected |
the database parser
Referenced by createDocument(), init(), and readDSET().
|
protected |
the graph parser
Referenced by createDocument(), getColor(), getPatternPercent(), init(), parse(), readDocHeader(), readDSET(), and sendZone().
|
protected |
the actual document size
Referenced by createDocument(), getPageLeftTop(), init(), pageHeight(), pageWidth(), readDocHeader(), and readPrintInfo().
|
protected |
a flag to know if pageSpan is filled
Referenced by readDocHeader(), and readPrintInfo().
|
protected |
the spreadsheet parser
Referenced by createDocument(), init(), parse(), readDSET(), sendZone(), and typeMainZones().
|
protected |
the spreadsheet parser
Referenced by createDocument(), init(), and readDSET().
|
protected |
the state
Referenced by checkHeader(), createDocument(), createZones(), exploreZonesGraph(), exploreZonesGraphRec(), forceParsed(), getColumnInfo(), getHeaderFooterId(), getPageLeftTop(), getZoneType(), init(), newPage(), pageHeight(), parse(), readDocHeader(), readDSET(), readEndTable(), sendZone(), typeMainZones(), and typeMainZonesRec().
|
protected |
the style manager
Referenced by init(), and readEndTable().
|
protected |
the table parser
Referenced by createDocument(), init(), parse(), readDSET(), and sendZone().
|
protected |
the text parser
Referenced by createDocument(), init(), parse(), readDocHeader(), readDSET(), CWStyleManager::readGenStyle(), and sendZone().