the main class to read a Microsoft Word file More...
#include <MsWrdParser.hxx>
Public Member Functions | |
| MsWrdParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
| constructor | |
| ~MsWrdParser () final | |
| destructor | |
| bool | checkHeader (MWAWHeader *header, bool strict=false) final |
| checks if the document header is correct (or not) | |
| void | parse (librevenge::RVNGTextInterface *documentInterface) final |
| the main parse function | |
Public Member Functions inherited from MWAWTextParser | |
| ~MWAWTextParser () override | |
| destructor | |
Public Member Functions inherited from MWAWParser | |
| virtual | ~MWAWParser () |
| virtual destructor | |
| int | version () const |
| returns the works version | |
| MWAWParserStatePtr | getParserState () |
| returns the parser state | |
| MWAWHeader * | getHeader () |
| returns the header | |
| MWAWInputStreamPtr & | getInput () |
| returns the actual input | |
| MWAWListenerPtr | getMainListener () |
| returns the main listener | |
| MWAWGraphicListenerPtr & | getGraphicListener () |
| returns the graphic listener | |
| MWAWPresentationListenerPtr & | getPresentationListener () |
| returns the presentation listener | |
| MWAWSpreadsheetListenerPtr & | getSpreadsheetListener () |
| returns the spreadsheet listener | |
| MWAWTextListenerPtr & | getTextListener () |
| returns the text listener | |
| MWAWFontConverterPtr & | getFontConverter () |
| returns the font converter | |
| MWAWFontManagerPtr & | getFontManager () |
| returns the font manager | |
| MWAWPageSpan const & | getPageSpan () const |
| returns the actual page dimension | |
| MWAWPageSpan & | getPageSpan () |
| returns the actual page dimension | |
| double | getFormLength () const |
| returns the form length | |
| double | getFormWidth () const |
| returns the form width | |
| double | getPageLength () const |
| returns the page length (form length without margin ) | |
| double | getPageWidth () const |
| returns the page width (form width without margin ) | |
| MWAWRSRCParserPtr & | getRSRCParser () |
| returns the rsrc parser | |
| libmwaw::DebugFile & | ascii () |
| a DebugFile used to write what we recognize when we parse the document | |
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 | |
| void | sendSimpleTextZone (MWAWListenerPtr &listener, MWAWEntry const &entry) |
| try to send a simple text zone(ie. a comment) | |
| MsWrdEntry | readEntry (std::string type, int id=-1) |
| read a file entry | |
Protected Member Functions inherited from MWAWTextParser | |
| MWAWTextParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
| constructor (protected) | |
| MWAWTextParser (MWAWParserStatePtr const &state) | |
| constructor using a state | |
Protected Member Functions inherited from MWAWParser | |
| MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
| constructor (protected) | |
| MWAWParser (MWAWParserStatePtr const &state) | |
| constructor using a state | |
| void | setVersion (int vers) |
| sets the document's version | |
| void | setGraphicListener (MWAWGraphicListenerPtr &listener) |
| sets the graphic listener | |
| void | resetGraphicListener () |
| resets the listener | |
| void | setPresentationListener (MWAWPresentationListenerPtr &listener) |
| sets the presentation listener | |
| void | resetPresentationListener () |
| resets the listener | |
| void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener) |
| sets the spreadsheet listener | |
| void | resetSpreadsheetListener () |
| resets the listener | |
| void | setTextListener (MWAWTextListenerPtr &listener) |
| sets the text listener | |
| void | resetTextListener () |
| resets the listener | |
| void | setAsciiName (char const *name) |
| Debugging: change the default ascii file. | |
| std::string const & | asciiName () const |
| return the ascii file name | |
Protected Attributes | |
| std::shared_ptr< MsWrdParserInternal::State > | m_state |
| the state | |
| std::multimap< std::string, MsWrdEntry > | m_entryMap |
| the list of entries | |
| std::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 const & | input, |
| MWAWRSRCParserPtr const & | rsrcParser, | ||
| MWAWHeader * | header ) |
constructor
|
final |
destructor
|
finalvirtual |
checks if the document header is correct (or not)
Implements MWAWParser.
Referenced by MsWrdParserInternal::SubDocument, and parse().
|
protected |
check if a position corresponds or not to a picture entry
Referenced by MsWrdParserInternal::SubDocument.
|
protected |
creates the listener which will be associated to the document
Referenced by MsWrdParserInternal::SubDocument, and parse().
|
protected |
finds the different zones
Referenced by MsWrdParserInternal::SubDocument, and parse().
|
protected |
returns the color corresponding to an id
Referenced by MsWrdParserInternal::SubDocument.
|
protected |
inits all internal variables
Referenced by MsWrdParser(), and MsWrdParserInternal::SubDocument.
|
protected |
adds a new page
Referenced by MsWrdParserInternal::SubDocument.
|
finalvirtual |
|
protected |
read the document sumary
Referenced by createZones(), and MsWrdParserInternal::SubDocument.
|
protected |
read the page dimensions + ?
Referenced by createZones(), and MsWrdParserInternal::SubDocument.
|
protected |
read a file entry
Referenced by MsWrdParserInternal::SubDocument, and readZoneList().
|
protected |
finish reading the header (v3)
Referenced by checkHeader(), and MsWrdParserInternal::SubDocument.
|
protected |
read an object
Referenced by MsWrdParserInternal::SubDocument, and readObjects().
|
protected |
read the object flags
Referenced by MsWrdParserInternal::SubDocument, and readObjects().
|
protected |
read the object list
Referenced by MsWrdParserInternal::SubDocument, and readObjects().
|
protected |
read the objects
Referenced by createZones(), and MsWrdParserInternal::SubDocument.
|
protected |
read a picture data
Referenced by createZones(), and MsWrdParserInternal::SubDocument.
|
protected |
read the printer name
Referenced by createZones(), and MsWrdParserInternal::SubDocument.
|
protected |
read the print info zone
Referenced by createZones(), and MsWrdParserInternal::SubDocument.
|
protected |
read a zone which consists in a list of string
Referenced by MsWrdParserInternal::SubDocument, and readObjects().
|
protected |
read the zone 17( some bdbox + text position ?)
Referenced by createZones(), and MsWrdParserInternal::SubDocument.
|
protected |
read the list of zones
Referenced by createZones(), and MsWrdParserInternal::SubDocument.
|
protected |
try to send a footnote, a field to the textParser
Referenced by MsWrdParserInternal::SubDocument.
|
protected |
try to send a text to the textParser
|
protected |
try to send a bookmark field id
Referenced by MsWrdParserInternal::SubDocument.
|
protected |
try to send a footnote id
Referenced by MsWrdParserInternal::SubDocument.
|
protected |
send a picture
Referenced by MsWrdParserInternal::SubDocument.
|
protected |
try to send a simple text zone(ie. a comment)
Referenced by MsWrdParserInternal::SubDocument.
|
friend |
|
friend |
Referenced by MsWrdTextStyles.
|
protected |
the list of entries
Referenced by checkPicturePos(), createZones(), MsWrdParser(), readEntry(), readObject(), and readObjects().
|
protected |
the state
Referenced by checkHeader(), createDocument(), createZones(), init(), MsWrdParser(), newPage(), readDocSum(), readHeaderEndV3(), readObjectFlags(), readObjectList(), readObjects(), readPicture(), sendFootnote(), and sendPicture().
|
protected |
the text parser
Referenced by checkHeader(), createDocument(), createZones(), init(), MsWrdParser(), parse(), readHeaderEndV3(), readObjectList(), send(), and send().