the main class to read a FullWrite file More...
#include <FWParser.hxx>
Public Member Functions | |
FWParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor More... | |
virtual | ~FWParser () |
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... | |
bool | createFileZones () |
create the file zone ( first step of create zones) More... | |
void | flushExtra () |
sends the data which have not yet been sent to the listener 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... | |
void | newPage (int number) |
adds a new page More... | |
bool | readDocPosition () |
find the last position of the document and read data More... | |
bool | readFileZoneFlags (shared_ptr< FWEntry > zone) |
try to read the file zones main flags More... | |
bool | readFileZonePos (shared_ptr< FWEntry > zone) |
try to read the file zones position More... | |
bool | readDocZoneData (shared_ptr< FWEntry > zone) |
try to read the zone containing the data of each doc zone (ie. Zone0) More... | |
bool | readDocZoneStruct (shared_ptr< FWEntry > zone) |
try to read the zone which stores the structure of zone0, ... (ie. Zone1) More... | |
int | getNumDocZoneStruct () const |
returns the number of zone struct More... | |
bool | readGraphic (shared_ptr< FWEntry > zone) |
check if a zone is a graphic zone, ... More... | |
bool | sendGraphic (shared_ptr< FWEntry > zone) |
send a graphic to a listener (if it exists) More... | |
bool | readDocInfo (shared_ptr< FWEntry > zone) |
try to read zone2, a zone which stores the document information zone, ... More... | |
bool | readEndDocInfo (shared_ptr< FWEntry > zone) |
try to read the end of zone2 (only v2) ? More... | |
bool | readCitationDocInfo (shared_ptr< FWEntry > zone) |
try to read the list of citation (at the end of doc info) More... | |
bool | readPrintInfo (shared_ptr< FWEntry > zone) |
try read the print info zone More... | |
void | sendText (int docId, libmwaw::SubDocumentType type, int which=0) |
try to send a footnote/endnote entry More... | |
void | sendGraphic (int docId) |
try to send a graphic More... | |
void | sendVariable (int docId) |
try to send a variable, in pratice do nothing More... | |
void | sendReference (int docId) |
try to send a reference, in pratice do nothing More... | |
bool | send (int fileId) |
ask the text parser to send a zone More... | |
bool | readDoc1314Data (shared_ptr< FWEntry > zone, FWParserInternal::DocZoneData &doc) |
try to read the data of zone 13 or 14 (unknown zone) More... | |
bool | readGraphicData (shared_ptr< FWEntry > zone, FWParserInternal::DocZoneData &doc) |
try to read the graphic data More... | |
bool | readReferenceData (shared_ptr< FWEntry > zone) |
try to read the reference data More... | |
bool | readDocDataHeader (shared_ptr< FWEntry > zone, FWParserInternal::DocZoneData &doc) |
try to read the data header of a classical zone More... | |
bool | readGenericDocData (shared_ptr< FWEntry > zone, FWParserInternal::DocZoneData &doc) |
try to read the data of a zone which begins with a generic header 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 < FWParserInternal::State > | m_state |
the state More... | |
MWAWPageSpan | m_pageSpan |
the actual document size More... | |
shared_ptr< FWText > | m_textParser |
the text parser More... | |
Friends | |
class | FWText |
class | FWParserInternal::SubDocument |
the main class to read a FullWrite file
FWParser::FWParser | ( | MWAWInputStreamPtr | input, |
MWAWRSRCParserPtr | rsrcParser, | ||
MWAWHeader * | header | ||
) |
constructor
|
virtual |
destructor
bool FWParser::checkHeader | ( | MWAWHeader * | header, |
bool | strict = false |
||
) |
checks if the document header is correct (or not)
Referenced by MWAWDocumentInternal::checkBasicMacHeader(), and parse().
|
protected |
creates the listener which will be associated to the document
Referenced by parse().
|
protected |
create the file zone ( first step of create zones)
Referenced by createZones().
|
protected |
finds the different objects zones
Referenced by parse().
|
protected |
sends the data which have not yet been sent to the listener
Referenced by parse().
|
protected |
returns the number of zone struct
Referenced by FWText::readItem().
|
protected |
inits all internal variables
Referenced by FWParser().
|
protected |
adds a new page
Referenced by FWText::send(), and FWText::sendMainText().
|
protected |
returns the page height, ie. paper size less margin (in inches)
|
protected |
returns the page width, ie. paper size less margin (in inches)
|
virtual |
virtual function used to parse the input
Implements MWAWParser.
Referenced by MWAWDocument::parse().
|
protected |
try to read the list of citation (at the end of doc info)
Referenced by readEndDocInfo().
|
protected |
try to read the data of zone 13 or 14 (unknown zone)
Referenced by readDocZoneData().
|
protected |
try to read the data header of a classical zone
Referenced by readDoc1314Data(), readDocZoneData(), readGenericDocData(), and readGraphicData().
|
protected |
try to read zone2, a zone which stores the document information zone, ...
Referenced by createZones().
|
protected |
find the last position of the document and read data
Referenced by checkHeader().
|
protected |
try to read the zone containing the data of each doc zone (ie. Zone0)
Referenced by createZones().
|
protected |
try to read the zone which stores the structure of zone0, ... (ie. Zone1)
Referenced by createZones().
|
protected |
try to read the end of zone2 (only v2) ?
Referenced by readDocInfo().
|
protected |
try to read the file zones main flags
-1: generic, -2: null, other fId
Referenced by createFileZones().
|
protected |
try to read the file zones position
Referenced by createFileZones().
|
protected |
try to read the data of a zone which begins with a generic header
Referenced by readDocZoneData().
|
protected |
check if a zone is a graphic zone, ...
Referenced by createZones().
|
protected |
try to read the graphic data
Referenced by readDocZoneData().
|
protected |
try read the print info zone
Referenced by readDocInfo().
|
protected |
try to read the reference data
Referenced by readDocZoneData().
|
protected |
ask the text parser to send a zone
|
protected |
send a graphic to a listener (if it exists)
Referenced by flushExtra(), FWText::send(), sendGraphic(), and sendVariable().
|
protected |
try to send a graphic
|
protected |
try to send a reference, in pratice do nothing
Referenced by FWText::send().
|
protected |
try to send a footnote/endnote entry
Referenced by FWText::send().
|
protected |
try to send a variable, in pratice do nothing
in this case, the content seems to be a textbox which contains the field display, but as in general this zone is not read correctly (ie. the field is not found ) and as sending textbox is not implemented, better to stop here...
Referenced by FWText::send().
|
friend |
|
protected |
the actual document size
Referenced by createDocument(), init(), pageHeight(), pageWidth(), and readPrintInfo().
|
protected |
the state
Referenced by checkHeader(), createDocument(), createFileZones(), createZones(), flushExtra(), getNumDocZoneStruct(), init(), newPage(), pageHeight(), parse(), readDoc1314Data(), readDocPosition(), readDocZoneData(), readDocZoneStruct(), readFileZoneFlags(), readFileZonePos(), readGenericDocData(), readGraphic(), readGraphicData(), readReferenceData(), sendGraphic(), sendReference(), sendText(), sendVariable(), and ~FWParser().
|
protected |
the text parser
Referenced by createDocument(), createZones(), flushExtra(), init(), parse(), readDocZoneData(), readEndDocInfo(), and send().