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, WPS8Listener *listener)
void readText (WPSInputStream *input, WPS8Listener *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, WPS8Listener *listener)
void propertyChangeTextAttribute (const uint32_t newTextAttributeBits, const uint8_t attribute, const uint32_t bit, WPS8Listener *listener)
void propertyChangeDelta (uint32_t newTextAttributeBits, WPS8Listener *listener)
 
Parameters:
newTextAttributeBits,: all the new, current bits (will be compared against old, and old will be discarded).

void propertyChange (std::string rgchProp, WPS8Listener *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::parse ( WPXHLListenerImpl *  listenerImpl  )  [virtual]

Implements WPSParser.

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

Reads fonts table into memory.

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

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

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

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

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.

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

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

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.

void WPS8Parser::parse ( WPSInputStream stream,
WPS8Listener listener 
) [private]

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

void WPS8Parser::propertyChangeDelta ( uint32_t  newTextAttributeBits,
WPS8Listener listener 
) [private]

Parameters:
newTextAttributeBits,: all the new, current bits (will be compared against old, and old will be discarded).

void WPS8Parser::propertyChange ( std::string  rgchProp,
WPS8Listener 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.


Member Data Documentation

uint32_t WPS8Parser::offset_eot [private]

uint32_t WPS8Parser::oldTextAttributeBits [private]

HeaderIndexMultiMap WPS8Parser::headerIndexTable [private]

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

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


The documentation for this class was generated from the following files:
Generated on Tue Oct 23 14:47:56 2007 for libwps by doxygen 1.5.1