This class parses some Pocket Word. More...
#include <PocketWord.h>
Public Member Functions | |
| PocketWordParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN) | |
| constructor | |
| ~PocketWordParser () override | |
| destructor | |
| void | parse (librevenge::RVNGTextInterface *documentInterface) override |
| called by WPSDocument to parse the file | |
| bool | checkHeader (WPSHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
Public Member Functions inherited from WPSParser | |
| WPSParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header) | |
| virtual | ~WPSParser () |
Protected Member Functions | |
| bool | createZones () |
| try to read the different zones | |
| bool | readFontNames (WPSEntry const &entry) |
| try to read the font names | |
| bool | readPageDims (WPSEntry const &entry) |
| try to read the page dimension | |
| bool | readParagraphList (WPSEntry const &entry, std::vector< int > ¶Id) |
| try to read a paragraph list | |
| bool | readParagraphDims (WPSEntry const &entry) |
| try to read a paragraph dimensions' zone which follows the paragraph zone | |
| bool | readParagraphUnkn (WPSEntry const &entry) |
| try to read a paragraph unknown zone: tabs, link? | |
| bool | readSound (WPSEntry const &entry, WPSEmbeddedObject &object) |
| try to read a sound definition (maybe a picture) | |
| bool | readSoundData (WPSEntry const &entry, long pictSize, WPSEmbeddedObject &object) |
| try to read a sound data (maybe a picture) | |
| bool | readUnkn8 (WPSEntry const &entry) |
| try to read the unknown zone 8: one by file, maybe prefs | |
| bool | readUnkn2021 (WPSEntry const &entry, int type) |
| try to read the unknown zone 20 and 21: one by file, find always no data, maybe style | |
| bool | checkFilePosition (long pos) const |
| check if the file position is correct or not | |
| void | checkUnparsed () |
| try to parse the unparsed zones | |
| void | sendData () |
| try to send all the data | |
| bool | sendParagraph (size_t paraId) |
| try to read and send a paragraph | |
Protected Member Functions inherited from WPSParser | |
| RVNGInputStreamPtr & | getInput () |
| RVNGInputStreamPtr | getFileInput () |
| WPSHeaderPtr & | getHeader () |
| int | version () const |
| void | setVersion (int vers) |
| libwps::DebugFile & | ascii () |
| a DebugFile used to write what we recognize when we parse the document | |
| NameMultiMap & | getNameEntryMap () |
| NameMultiMap const & | getNameEntryMap () const |
Protected Attributes | |
| std::shared_ptr< WPSContentListener > | m_listener |
| the listener (if set) | |
| std::shared_ptr< PocketWordParserInternal::State > | m_state |
| the main state | |
Private Member Functions | |
| PocketWordParser (const PocketWordParser &)=delete | |
| PocketWordParser & | operator= (const PocketWordParser &)=delete |
| std::shared_ptr< WPSContentListener > | createListener (librevenge::RVNGTextInterface *interface) |
| creates the main listener | |
Friends | |
| class | PocketWordParserInternal::SubDocument |
Additional Inherited Members | |
Public Types inherited from WPSParser | |
| typedef std::multimap< std::string, WPSEntry > | NameMultiMap |
| a map to retrieve a file entry by name | |
This class parses some Pocket Word.
| PocketWordParser::PocketWordParser | ( | RVNGInputStreamPtr & | input, |
| WPSHeaderPtr & | header, | ||
| libwps_tools_win::Font::Type | encoding = libwps_tools_win::Font::UNKNOWN ) |
constructor
Referenced by checkFilePosition(), operator=(), and PocketWordParser().
|
override |
destructor
|
privatedelete |
|
protected |
check if the file position is correct or not
Referenced by checkHeader(), and createZones().
| bool PocketWordParser::checkHeader | ( | WPSHeader * | header, |
| bool | strict = false ) |
checks if the document header is correct (or not)
Referenced by libwps::WPSDocument::isFileFormatSupported(), and parse().
|
protected |
try to parse the unparsed zones
Referenced by parse().
|
private |
creates the main listener
Referenced by parse().
|
protected |
try to read the different zones
Referenced by parse().
|
privatedelete |
|
overridevirtual |
called by WPSDocument to parse the file
Implements WPSParser.
|
protected |
try to read the font names
Referenced by checkUnparsed(), and sendData().
|
protected |
try to read the page dimension
Referenced by checkUnparsed(), and createListener().
|
protected |
try to read a paragraph dimensions' zone which follows the paragraph zone
Referenced by checkUnparsed().
|
protected |
try to read a paragraph list
Referenced by checkUnparsed(), and sendData().
|
protected |
try to read a paragraph unknown zone: tabs, link?
Referenced by checkUnparsed().
|
protected |
try to read a sound definition (maybe a picture)
Referenced by checkUnparsed(), and sendParagraph().
|
protected |
try to read a sound data (maybe a picture)
Referenced by readSound().
|
protected |
try to read the unknown zone 20 and 21: one by file, find always no data, maybe style
Referenced by checkUnparsed().
|
protected |
try to read the unknown zone 8: one by file, maybe prefs
Referenced by checkUnparsed().
|
protected |
try to send all the data
Referenced by parse().
|
protected |
try to read and send a paragraph
Referenced by checkUnparsed(), and sendData().
|
friend |
Referenced by PocketWordParserInternal::SubDocument.
|
protected |
the listener (if set)
Referenced by checkUnparsed(), parse(), PocketWordParser(), sendData(), and sendParagraph().
|
protected |
the main state
Referenced by checkFilePosition(), checkHeader(), checkUnparsed(), createListener(), createZones(), PocketWordParser(), readFontNames(), readPageDims(), readSound(), sendData(), and sendParagraph().