WPS4Parser Class Reference

#include <WPS4.h>

Inheritance diagram for WPS4Parser:

WPSParser

List of all members.

Public Member Functions

 WPS4Parser (WPSInputStream *input, WPSHeader *header)
 This class parses Works version 2 through 4.
 ~WPS4Parser ()
void parse (WPXHLListenerImpl *listenerImpl)

Properties

uint32_t oldTextAttributeBits
uint32_t offset_eot
uint32_t offset_eos
std::vector< FODCHFODs
std::vector< FODPAFODs
std::map< uint8_t,
std::string > 
fonts
const uint8_t m_worksVersion

Private Member Functions

void parsePages (std::list< WPSPageSpan > &pageList, WPSInputStream *input)
 Read the page format from the file.
void parse (WPSInputStream *stream, WPS4Listener *listener)
void readFontsTable (WPSInputStream *input)
 Reads fonts table into memory.
bool readFODPage (WPSInputStream *input, std::vector< FOD > *FODs)
 Read a single "page" (128 bytes) that contains formatting descriptors (FODs) for either characters OR paragraphs.
void ChangeTextAttribute (const uint32_t newTextAttributeBits, const uint8_t attribute, const uint32_t bit, WPS4Listener *listener)
void ChangeDelta (uint32_t newTextAttributeBits, WPS4Listener *listener)
void Change (std::string rgchProp, WPS4Listener *listener)
void appendCP850 (const uint8_t readVal, WPS4Listener *listener)
 Take a character in CP850 encoding, convert it and append it to the text buffer as UTF8.
void appendCP1252 (const uint8_t readVal, WPS4Listener *listener)
 Take a character in CP1252 encoding, convert it and append it to the text buffer as UTF8.
void readText (WPSInputStream *input, WPS4Listener *listener)
 Read the text of the document using previously-read formatting information.


Constructor & Destructor Documentation

WPS4Parser::WPS4Parser ( WPSInputStream input,
WPSHeader header 
)

This class parses Works version 2 through 4.

WPS4Parser::~WPS4Parser (  ) 


Member Function Documentation

void WPS4Parser::parse ( WPXHLListenerImpl *  listenerImpl  )  [virtual]

Implements WPSParser.

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

Read the page format from the file.

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

void WPS4Parser::parse ( WPSInputStream stream,
WPS4Listener listener 
) [private]

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

Reads fonts table into memory.

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

Read a single "page" (128 bytes) that contains formatting descriptors (FODs) for either characters OR paragraphs.

Starts reading at current position in stream.

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

void WPS4Parser::ChangeTextAttribute ( const uint32_t  newTextAttributeBits,
const uint8_t  attribute,
const uint32_t  bit,
WPS4Listener listener 
) [private]

void WPS4Parser::ChangeDelta ( uint32_t  newTextAttributeBits,
WPS4Listener listener 
) [private]

void WPS4Parser::Change ( std::string  rgchProp,
WPS4Listener listener 
) [private]

void WPS4Parser::appendCP850 ( const uint8_t  readVal,
WPS4Listener listener 
) [private]

Take a character in CP850 encoding, convert it and append it to the text buffer as UTF8.

Courtesy of glib2 and iconv

void WPS4Parser::appendCP1252 ( const uint8_t  readVal,
WPS4Listener listener 
) [private]

Take a character in CP1252 encoding, convert it and append it to the text buffer as UTF8.

Courtesy of glib2 and iconv

void WPS4Parser::readText ( WPSInputStream input,
WPS4Listener listener 
) [private]

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


Property Documentation

uint32_t WPS4Parser::oldTextAttributeBits [private]

uint32_t WPS4Parser::offset_eot [private]

uint32_t WPS4Parser::offset_eos [private]

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

std::vector<FOD> WPS4Parser::PAFODs [private]

std::map<uint8_t, std::string> WPS4Parser::fonts [private]

const uint8_t WPS4Parser::m_worksVersion [private]


The documentation for this class was generated from the following files:
Generated on Mon Sep 10 13:52:18 2007 for libwps by doxygen 1.5.3