the main class to read a Microsoft Word file More...
#include <MsWrdParser.hxx>
Public Member Functions | |
| MsWrdParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
| constructor | |
| virtual | ~MsWrdParser () |
| destructor | |
| bool | checkHeader (MWAWHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
| void | parse (librevenge::RVNGTextInterface *documentInterface) |
| the main parse function | |
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 zones | |
| bool | readHeaderEndV3 () |
| finish reading the header (v3) | |
| bool | readZoneList () |
| read the list of zones | |
| bool | readPrintInfo (MsWrdEntry &entry) |
| read the print info zone | |
| bool | readPrinter (MsWrdEntry &entry) |
| read the printer name | |
| bool | readDocSum (MsWrdEntry &entry) |
| read the document sumary | |
| bool | readStringsZone (MsWrdEntry &entry, std::vector< std::string > &list) |
| read a zone which consists in a list of string | |
| bool | readObjects () |
| read the objects | |
| bool | readObjectList (MsWrdEntry &entry) |
| read the object list | |
| bool | readObjectFlags (MsWrdEntry &entry) |
| read the object flags | |
| bool | readObject (MsWrdParserInternal::Object &obj) |
| read an object | |
| bool | readDocumentInfo (MsWrdEntry &entry) |
| read the page dimensions + ? | |
| bool | readZone17 (MsWrdEntry &entry) |
| read the zone 17( some bdbox + text position ?) | |
| bool | checkPicturePos (long pos, int type) |
| check if a position corresponds or not to a picture entry | |
| bool | readPicture (MsWrdEntry &entry) |
| read a picture data | |
| void | sendPicture (long fPos, int cPos, MWAWPosition::AnchorTo anchor=MWAWPosition::Char) |
| send a picture | |
| bool | getColor (int id, MWAWColor &col) const |
| returns the color corresponding to an id | |
| void | newPage (int number) |
| adds a new page | |
| void | sendFootnote (int id) |
| try to send a footnote id | |
| void | sendFieldComment (int id) |
| try to send a bookmark field id | |
| void | send (int id, libmwaw::SubDocumentType type) |
| try to send a footnote, a field to the textParser | |
| void | send (MWAWEntry const &entry) |
| try to send a text to the textParser | |
| MsWrdEntry | readEntry (std::string type, int id=-1) |
| read a file entry | |
Protected Attributes | |
| shared_ptr < MsWrdParserInternal::State > | m_state |
| the state | |
| std::multimap< std::string, MsWrdEntry > | m_entryMap |
| the list of entries | |
| shared_ptr< MsWrdText > | m_textParser |
| the text parser | |
Friends | |
| class | MsWrdText |
| class | MsWrdTextStyles |
| class | MsWrdParserInternal::SubDocument |
the main class to read a Microsoft Word file
| MsWrdParser::MsWrdParser | ( | MWAWInputStreamPtr | input, |
| MWAWRSRCParserPtr | rsrcParser, | ||
| MWAWHeader * | header | ||
| ) |
constructor
| MsWrdParser::~MsWrdParser | ( | ) | [virtual] |
destructor
| bool MsWrdParser::checkHeader | ( | MWAWHeader * | header, |
| bool | strict = false |
||
| ) | [virtual] |
| bool MsWrdParser::checkPicturePos | ( | long | pos, |
| int | type | ||
| ) | [protected] |
check if a position corresponds or not to a picture entry
Referenced by MsWrdTextStyles::readFont().
| void MsWrdParser::createDocument | ( | librevenge::RVNGTextInterface * | documentInterface | ) | [protected] |
creates the listener which will be associated to the document
Referenced by parse().
| bool MsWrdParser::createZones | ( | ) | [protected] |
finds the different zones
Referenced by parse().
| bool MsWrdParser::getColor | ( | int | id, |
| MWAWColor & | col | ||
| ) | const [protected] |
returns the color corresponding to an id
Referenced by MsWrdTextStyles::readFont().
| void MsWrdParser::init | ( | ) | [protected] |
inits all internal variables
Referenced by MsWrdParser().
| void MsWrdParser::newPage | ( | int | number | ) | [protected] |
adds a new page
Referenced by MsWrdText::sendText().
| void MsWrdParser::parse | ( | librevenge::RVNGTextInterface * | documentInterface | ) | [virtual] |
the main parse function
Implements MWAWTextParser.
| bool MsWrdParser::readDocSum | ( | MsWrdEntry & | entry | ) | [protected] |
read the document sumary
Referenced by createZones().
| bool MsWrdParser::readDocumentInfo | ( | MsWrdEntry & | entry | ) | [protected] |
read the page dimensions + ?
Referenced by createZones().
| MsWrdEntry MsWrdParser::readEntry | ( | std::string | type, |
| int | id = -1 |
||
| ) | [protected] |
read a file entry
Referenced by readZoneList().
| bool MsWrdParser::readHeaderEndV3 | ( | ) | [protected] |
finish reading the header (v3)
Referenced by checkHeader().
| bool MsWrdParser::readObject | ( | MsWrdParserInternal::Object & | obj | ) | [protected] |
read an object
Referenced by readObjects().
| bool MsWrdParser::readObjectFlags | ( | MsWrdEntry & | entry | ) | [protected] |
read the object flags
Referenced by readObjects().
| bool MsWrdParser::readObjectList | ( | MsWrdEntry & | entry | ) | [protected] |
read the object list
Referenced by readObjects().
| bool MsWrdParser::readObjects | ( | ) | [protected] |
read the objects
Referenced by createZones().
| bool MsWrdParser::readPicture | ( | MsWrdEntry & | entry | ) | [protected] |
read a picture data
Referenced by createZones().
| bool MsWrdParser::readPrinter | ( | MsWrdEntry & | entry | ) | [protected] |
read the printer name
Referenced by createZones().
| bool MsWrdParser::readPrintInfo | ( | MsWrdEntry & | entry | ) | [protected] |
read the print info zone
Referenced by createZones().
| bool MsWrdParser::readStringsZone | ( | MsWrdEntry & | entry, |
| std::vector< std::string > & | list | ||
| ) | [protected] |
read a zone which consists in a list of string
Referenced by readObjects().
| bool MsWrdParser::readZone17 | ( | MsWrdEntry & | entry | ) | [protected] |
read the zone 17( some bdbox + text position ?)
Referenced by createZones().
| bool MsWrdParser::readZoneList | ( | ) | [protected] |
read the list of zones
Referenced by createZones().
| void MsWrdParser::send | ( | int | id, |
| libmwaw::SubDocumentType | type | ||
| ) | [protected] |
try to send a footnote, a field to the textParser
Referenced by MsWrdParserInternal::SubDocument::parse().
| void MsWrdParser::send | ( | MWAWEntry const & | entry | ) | [protected] |
try to send a text to the textParser
| void MsWrdParser::sendFieldComment | ( | int | id | ) | [protected] |
try to send a bookmark field id
Referenced by MsWrdText::sendText().
| void MsWrdParser::sendFootnote | ( | int | id | ) | [protected] |
try to send a footnote id
Referenced by MsWrdText::sendText().
| void MsWrdParser::sendPicture | ( | long | fPos, |
| int | cPos, | ||
| MWAWPosition::AnchorTo | anchor = MWAWPosition::Char |
||
| ) | [protected] |
send a picture
Referenced by MsWrdParserInternal::SubDocument::parse(), and MsWrdText::sendText().
friend class MsWrdParserInternal::SubDocument [friend] |
friend class MsWrdTextStyles [friend] |
std::multimap<std::string, MsWrdEntry> MsWrdParser::m_entryMap [protected] |
the list of entries
Referenced by checkPicturePos(), createZones(), MsWrdText::createZones(), readEntry(), readObject(), and readObjects().
shared_ptr<MsWrdParserInternal::State> MsWrdParser::m_state [protected] |
the state
Referenced by checkHeader(), createDocument(), createZones(), init(), newPage(), readHeaderEndV3(), readObjectFlags(), readObjectList(), readObjects(), readPicture(), sendFootnote(), and sendPicture().
shared_ptr<MsWrdText> MsWrdParser::m_textParser [protected] |
the text parser
Referenced by checkHeader(), createDocument(), createZones(), init(), parse(), readHeaderEndV3(), readObjectList(), and send().