the main class to read a FullWrite file More...
#include <FullWrtParser.hxx>
Public Member Functions | |
| FullWrtParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
| constructor | |
| virtual | ~FullWrtParser () |
| destructor | |
| bool | checkHeader (MWAWHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
| void | parse (librevenge::RVNGTextInterface *documentInterface) |
| virtual function used to parse the input | |
Protected Member Functions | |
| void | init () |
| inits all internal variables | |
| void | createDocument (librevenge::RVNGTextInterface *documentInterface) |
| creates the listener which will be associated to the document | |
| bool | createZones () |
| finds the different objects zones | |
| bool | createFileZones () |
| create the file zone ( first step of create zones) | |
| void | newPage (int number) |
| adds a new page | |
| bool | readDocPosition () |
| find the last position of the document and read data | |
| bool | readFileZoneFlags (FullWrtStruct::EntryPtr zone) |
| try to read the file zones main flags | |
| bool | readFileZonePos (FullWrtStruct::EntryPtr zone) |
| try to read the file zones position | |
| bool | readDocZoneData (FullWrtStruct::EntryPtr zone) |
| try to read the zone containing the data of each doc zone (ie. Zone0) | |
| bool | readDocZoneStruct (FullWrtStruct::EntryPtr zone) |
| try to read the zone which stores the structure of zone0, ... (ie. Zone1) | |
| bool | readDocInfo (FullWrtStruct::EntryPtr zone) |
| try to read zone2, a zone which stores the document information zone, ... | |
| bool | readEndDocInfo (FullWrtStruct::EntryPtr zone) |
| try to read the end of zone2 (only v2) ? | |
| bool | readCitationDocInfo (FullWrtStruct::EntryPtr zone) |
| try to read the list of citation (at the end of doc info) | |
| bool | readPrintInfo (FullWrtStruct::EntryPtr zone) |
| try read the print info zone | |
| MWAWVec2f | getPageLeftTop () const |
| returns the page left top point ( in inches) | |
| bool | getBorder (int bId, FullWrtStruct::Border &border) const |
| try to return a border corresponding to an id | |
| void | sendText (int docId, libmwaw::SubDocumentType type, MWAWNote::Type which=MWAWNote::FootNote) |
| try to send a footnote/endnote entry | |
| void | sendGraphic (int docId) |
| try to send a graphic | |
| void | sendVariable (int docId) |
| try to send a variable, in pratice do nothing | |
| void | sendReference (int docId) |
| try to send a reference, in pratice do nothing | |
| bool | send (int fileId, MWAWColor fontColor=MWAWColor::black()) |
| ask the text parser to send a zone | |
| int | getNumDocZoneStruct () const |
| returns the number of zone struct | |
| std::string | getDocumentTypeName (int zId) const |
| returns a the type of a document zone ( mainly used for debugging) | |
| bool | readReferenceData (FullWrtStruct::EntryPtr zone) |
| try to read the reference data | |
| bool | readGenericDocData (FullWrtStruct::EntryPtr zone, FullWrtStruct::ZoneHeader &doc) |
| try to read the data of a zone which begins with a generic header | |
Protected Attributes | |
| shared_ptr < FullWrtParserInternal::State > | m_state |
| the state | |
| shared_ptr< FullWrtGraph > | m_graphParser |
| the graph parser | |
| shared_ptr< FullWrtText > | m_textParser |
| the text parser | |
Friends | |
| class | FullWrtGraph |
| class | FullWrtText |
| class | FullWrtParserInternal::SubDocument |
the main class to read a FullWrite file
| FullWrtParser::FullWrtParser | ( | MWAWInputStreamPtr | input, |
| MWAWRSRCParserPtr | rsrcParser, | ||
| MWAWHeader * | header | ||
| ) |
constructor
| FullWrtParser::~FullWrtParser | ( | ) | [virtual] |
destructor
| bool FullWrtParser::checkHeader | ( | MWAWHeader * | header, |
| bool | strict = false |
||
| ) | [virtual] |
| void FullWrtParser::createDocument | ( | librevenge::RVNGTextInterface * | documentInterface | ) | [protected] |
creates the listener which will be associated to the document
Referenced by parse().
| bool FullWrtParser::createFileZones | ( | ) | [protected] |
create the file zone ( first step of create zones)
Referenced by createZones().
| bool FullWrtParser::createZones | ( | ) | [protected] |
finds the different objects zones
Referenced by parse().
| bool FullWrtParser::getBorder | ( | int | bId, |
| FullWrtStruct::Border & | border | ||
| ) | const [protected] |
try to return a border corresponding to an id
Referenced by FullWrtText::send(), and FullWrtText::sendTable().
| std::string FullWrtParser::getDocumentTypeName | ( | int | zId | ) | const [protected] |
returns a the type of a document zone ( mainly used for debugging)
Referenced by FullWrtGraph::readGraphicData().
| int FullWrtParser::getNumDocZoneStruct | ( | ) | const [protected] |
returns the number of zone struct
Referenced by FullWrtText::readItem().
| MWAWVec2f FullWrtParser::getPageLeftTop | ( | ) | const [protected] |
returns the page left top point ( in inches)
Referenced by FullWrtGraph::sendSideBar().
| void FullWrtParser::init | ( | ) | [protected] |
inits all internal variables
Referenced by FullWrtParser().
| void FullWrtParser::newPage | ( | int | number | ) | [protected] |
adds a new page
Referenced by FullWrtText::send(), and FullWrtText::sendMainText().
| void FullWrtParser::parse | ( | librevenge::RVNGTextInterface * | documentInterface | ) | [virtual] |
virtual function used to parse the input
Implements MWAWTextParser.
| bool FullWrtParser::readCitationDocInfo | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try to read the list of citation (at the end of doc info)
Referenced by readEndDocInfo().
| bool FullWrtParser::readDocInfo | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try to read zone2, a zone which stores the document information zone, ...
Referenced by createZones().
| bool FullWrtParser::readDocPosition | ( | ) | [protected] |
find the last position of the document and read data
Referenced by checkHeader().
| bool FullWrtParser::readDocZoneData | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try to read the zone containing the data of each doc zone (ie. Zone0)
Referenced by createZones().
| bool FullWrtParser::readDocZoneStruct | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try to read the zone which stores the structure of zone0, ... (ie. Zone1)
Referenced by createZones().
| bool FullWrtParser::readEndDocInfo | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try to read the end of zone2 (only v2) ?
Referenced by readDocInfo().
| bool FullWrtParser::readFileZoneFlags | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try to read the file zones main flags
-1: generic, -2: null, other fId
Referenced by createFileZones().
| bool FullWrtParser::readFileZonePos | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try to read the file zones position
Referenced by createFileZones().
| bool FullWrtParser::readGenericDocData | ( | FullWrtStruct::EntryPtr | zone, |
| FullWrtStruct::ZoneHeader & | doc | ||
| ) | [protected] |
try to read the data of a zone which begins with a generic header
Referenced by readDocZoneData().
| bool FullWrtParser::readPrintInfo | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try read the print info zone
Referenced by readDocInfo().
| bool FullWrtParser::readReferenceData | ( | FullWrtStruct::EntryPtr | zone | ) | [protected] |
try to read the reference data
Referenced by readDocZoneData().
| bool FullWrtParser::send | ( | int | fileId, |
| MWAWColor | fontColor = MWAWColor::black() |
||
| ) | [protected] |
ask the text parser to send a zone
Referenced by FullWrtParserInternal::SubDocument::parse(), and FullWrtGraph::send().
| void FullWrtParser::sendGraphic | ( | int | docId | ) | [protected] |
try to send a graphic
Referenced by FullWrtText::send(), and sendVariable().
| void FullWrtParser::sendReference | ( | int | docId | ) | [protected] |
try to send a reference, in pratice do nothing
Referenced by FullWrtText::send().
| void FullWrtParser::sendText | ( | int | docId, |
| libmwaw::SubDocumentType | type, | ||
| MWAWNote::Type | which = MWAWNote::FootNote |
||
| ) | [protected] |
try to send a footnote/endnote entry
Referenced by FullWrtText::send().
| void FullWrtParser::sendVariable | ( | int | docId | ) | [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 FullWrtText::send().
friend class FullWrtGraph [friend] |
Referenced by init().
friend class FullWrtParserInternal::SubDocument [friend] |
friend class FullWrtText [friend] |
Referenced by init().
shared_ptr<FullWrtGraph> FullWrtParser::m_graphParser [protected] |
the graph parser
Referenced by createDocument(), createZones(), getBorder(), init(), parse(), readDocZoneData(), readEndDocInfo(), and sendGraphic().
shared_ptr<FullWrtParserInternal::State> FullWrtParser::m_state [protected] |
the state
Referenced by checkHeader(), createDocument(), createFileZones(), createZones(), getDocumentTypeName(), getNumDocZoneStruct(), getPageLeftTop(), init(), newPage(), parse(), readDocInfo(), readDocPosition(), readDocZoneData(), readDocZoneStruct(), readFileZoneFlags(), readFileZonePos(), readGenericDocData(), readPrintInfo(), readReferenceData(), sendGraphic(), sendReference(), sendText(), sendVariable(), and ~FullWrtParser().
shared_ptr<FullWrtText> FullWrtParser::m_textParser [protected] |
the text parser
Referenced by createDocument(), createZones(), init(), parse(), readDocZoneData(), readEndDocInfo(), and send().