WPS8Parser Class Reference

#include <WPS8.h>

Inheritance diagram for WPS8Parser:
WPSParser

List of all members.

Public Member Functions

 WPS8Parser (WPSInputStream *input, WPSHeader *header)
 ~WPS8Parser ()
void parse (WPXHLListenerImpl *listenerImpl)

Private Member Functions

void readFontsTable (WPSInputStream *input)
 Reads fonts table into memory.
void appendUTF16LE (WPSInputStream *input, WPS8ContentListener *listener)
void readText (WPSInputStream *input, WPS8ContentListener *listener)
 Read the text of the document using previously-read formatting information.
bool readFODPage (WPSInputStream *input, std::vector< FOD > *FODs, uint16_t page_size)
 Read a single page (of size page_size bytes) that contains formatting descriptors for either characters OR paragraphs.
void parseHeaderIndexEntry (WPSInputStream *input)
 Parse an index entry in the file format's header.
void parseHeaderIndex (WPSInputStream *input)
 In the header, parse the index to the different sections of the CONTENTS stream.
void parsePages (std::list< WPSPageSpan > &pageList, WPSInputStream *input)
 Read the page format from the file.
void parse (WPSInputStream *stream, WPS8ContentListener *listener)
void propertyChangeTextAttribute (const uint32_t newTextAttributeBits, const uint8_t attribute, const uint32_t bit, WPS8ContentListener *listener)
void propertyChangeDelta (uint32_t newTextAttributeBits, WPS8ContentListener *listener)
void propertyChange (std::string rgchProp, WPS8ContentListener *listener)
 Process a character property change.

Private Attributes

uint32_t offset_eot
uint32_t oldTextAttributeBits
HeaderIndexMultiMap headerIndexTable
std::vector< FODCHFODs
std::vector< std::string > fonts

Constructor & Destructor Documentation

WPS8Parser::WPS8Parser ( WPSInputStream input,
WPSHeader header 
)
WPS8Parser::~WPS8Parser (  ) 

Member Function Documentation

void WPS8Parser::appendUTF16LE ( WPSInputStream input,
WPS8ContentListener listener 
) [private]

Referenced by readText().

void WPS8Parser::parse ( WPSInputStream stream,
WPS8ContentListener listener 
) [private]
void WPS8Parser::parse ( WPXHLListenerImpl *  listenerImpl  )  [virtual]

Implements WPSParser.

Referenced by WPSDocument::parse().

void WPS8Parser::parseHeaderIndex ( WPSInputStream input  )  [private]

In the header, parse the index to the different sections of the CONTENTS stream.

Referenced by parse().

void WPS8Parser::parseHeaderIndexEntry ( WPSInputStream input  )  [private]

Parse an index entry in the file format's header.

For example, this function may be called multiple times to parse several FDPP entries. This functions begins at the current position of the input stream, which will be advanced.

Referenced by parseHeaderIndex().

void WPS8Parser::parsePages ( std::list< WPSPageSpan > &  pageList,
WPSInputStream input 
) [private]

Read the page format from the file.

It seems that WPS8 files can only have one page format throughout the whole document.

Referenced by parse().

void WPS8Parser::propertyChange ( std::string  rgchProp,
WPS8ContentListener listener 
) [private]

Process a character property change.

The Works format supplies all the character formatting each time there is any change (as opposed to HTML, for example). In Works 8, the position in rgchProp is not significant because there are some kind of codes.

Referenced by readText().

void WPS8Parser::propertyChangeDelta ( uint32_t  newTextAttributeBits,
WPS8ContentListener listener 
) [private]
Parameters:
newTextAttributeBits,: all the new, current bits (will be compared against old, and old will be discarded).

Referenced by propertyChange().

void WPS8Parser::propertyChangeTextAttribute ( const uint32_t  newTextAttributeBits,
const uint8_t  attribute,
const uint32_t  bit,
WPS8ContentListener listener 
) [private]

Referenced by propertyChangeDelta().

bool WPS8Parser::readFODPage ( WPSInputStream input,
std::vector< FOD > *  FODs,
uint16_t  page_size 
) [private]

Read a single page (of size page_size bytes) that contains formatting descriptors for either characters OR paragraphs.

Starts reading at current position in stream.

Return: true if more pages of this type exist, otherwise false

Referenced by parse().

void WPS8Parser::readFontsTable ( WPSInputStream input  )  [private]

Reads fonts table into memory.

Referenced by parse().

void WPS8Parser::readText ( WPSInputStream input,
WPS8ContentListener listener 
) [private]

Read the text of the document using previously-read formatting information.

Referenced by parse().


Member Data Documentation

std::vector<FOD> WPS8Parser::CHFODs [private]

Referenced by parse(), and readText().

std::vector<std::string> WPS8Parser::fonts [private]

Referenced by propertyChange(), and readFontsTable().

uint32_t WPS8Parser::offset_eot [private]

Referenced by parse(), and readFODPage().


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

Generated on Sat Jan 30 06:55:24 2010 for libwps by doxygen 1.6.1