PocketWordParser Class Reference

This class parses some Pocket Word. More...

`#include <PocketWord.h>`

Inheritance diagram for PocketWordParser:

## 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 > &paraId)
| 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

## Detailed Description

This class parses some Pocket Word.

## Constructor & Destructor Documentation

## ◆ PocketWordParser() [1/2]

PocketWordParser::PocketWordParser | ( | RVNGInputStreamPtr & | input,
|  | WPSHeaderPtr & | header,
|  | libwps_tools_win::Font::Type | encoding = libwps_tools_win::Font::UNKNOWN )

constructor

Referenced by checkFilePosition(), operator=(), and PocketWordParser().

## ◆ ~PocketWordParser()

PocketWordParser::~PocketWordParser | ( |  | ) |
| override

destructor

## ◆ PocketWordParser() [2/2]

PocketWordParser::PocketWordParser | ( | const PocketWordParser & |  | ) |
| private delete

## Member Function Documentation

## ◆ checkFilePosition()

bool PocketWordParser::checkFilePosition | ( | long | pos | ) | const
| protected

check if the file position is correct or not

Referenced by checkHeader(), and createZones().

## ◆ checkHeader()

bool PocketWordParser::checkHeader | ( | WPSHeader * | header,
|  | bool | strict = false )

checks if the document header is correct (or not)

Referenced by libwps::WPSDocument::isFileFormatSupported(), and parse().

## ◆ checkUnparsed()

void PocketWordParser::checkUnparsed | ( |  | ) |
| protected

try to parse the unparsed zones

Referenced by parse().

## ◆ createListener()

std::shared_ptr< WPSContentListener > PocketWordParser::createListener | ( | librevenge::RVNGTextInterface * | interface | ) |
| private

creates the main listener

Referenced by parse().

## ◆ createZones()

bool PocketWordParser::createZones | ( |  | ) |
| protected

try to read the different zones

Referenced by parse().

## ◆ operator=()

PocketWordParser & PocketWordParser::operator= | ( | const PocketWordParser & |  | ) |
| private delete

## ◆ parse()

void PocketWordParser::parse | ( | librevenge::RVNGTextInterface * | documentInterface | ) |
| override virtual

called by WPSDocument to parse the file

Implements WPSParser.

## ◆ readFontNames()

bool PocketWordParser::readFontNames | ( | WPSEntry const & | entry | ) |
| protected

try to read the font names

Referenced by checkUnparsed(), and sendData().

## ◆ readPageDims()

bool PocketWordParser::readPageDims | ( | WPSEntry const & | entry | ) |
| protected

try to read the page dimension

Referenced by checkUnparsed(), and createListener().

## ◆ readParagraphDims()

bool PocketWordParser::readParagraphDims | ( | WPSEntry const & | entry | ) |
| protected

try to read a paragraph dimensions' zone which follows the paragraph zone

Referenced by checkUnparsed().

## ◆ readParagraphList()

bool PocketWordParser::readParagraphList | ( | WPSEntry const & | entry,
|  | std::vector< int > & | paraId )
| protected

try to read a paragraph list

Referenced by checkUnparsed(), and sendData().

## ◆ readParagraphUnkn()

bool PocketWordParser::readParagraphUnkn | ( | WPSEntry const & | entry | ) |
| protected

try to read a paragraph unknown zone: tabs, link?

Referenced by checkUnparsed().

## ◆ readSound()

bool PocketWordParser::readSound | ( | WPSEntry const & | entry,
|  | WPSEmbeddedObject & | object )
| protected

try to read a sound definition (maybe a picture)

Referenced by checkUnparsed(), and sendParagraph().

## ◆ readSoundData()

bool PocketWordParser::readSoundData | ( | WPSEntry const & | entry,
|  | long | pictSize,
|  | WPSEmbeddedObject & | object )
| protected

try to read a sound data (maybe a picture)

Referenced by readSound().

## ◆ readUnkn2021()

bool PocketWordParser::readUnkn2021 | ( | WPSEntry const & | entry,
|  | int | type )
| protected

try to read the unknown zone 20 and 21: one by file, find always no data, maybe style

Referenced by checkUnparsed().

## ◆ readUnkn8()

bool PocketWordParser::readUnkn8 | ( | WPSEntry const & | entry | ) |
| protected

try to read the unknown zone 8: one by file, maybe prefs

Referenced by checkUnparsed().

## ◆ sendData()

void PocketWordParser::sendData | ( |  | ) |
| protected

try to send all the data

Referenced by parse().

## ◆ sendParagraph()

bool PocketWordParser::sendParagraph | ( | size_t | paraId | ) |
| protected

try to read and send a paragraph

Referenced by checkUnparsed(), and sendData().

## Friends And Related Symbol Documentation

## ◆ PocketWordParserInternal::SubDocument

friend class PocketWordParserInternal::SubDocument
| friend

Referenced by PocketWordParserInternal::SubDocument.

## Member Data Documentation

## ◆ m_listener

std::shared_ptr<WPSContentListener> PocketWordParser::m_listener
| protected

the listener (if set)

Referenced by checkUnparsed(), parse(), PocketWordParser(), sendData(), and sendParagraph().

## ◆ m_state

std::shared_ptr<PocketWordParserInternal::State> PocketWordParser::m_state
| protected

the main state

Referenced by checkFilePosition(), checkHeader(), checkUnparsed(), createListener(), createZones(), PocketWordParser(), readFontNames(), readPageDims(), readSound(), sendData(), and sendParagraph().

The documentation for this class was generated from the following files:

- PocketWord.h
- PocketWord.cpp