MSWriteParser Class Reference

This class parses Microsoft Write 3.0 and 3.1. More...

#include <MSWrite.h>

Inheritance diagram for MSWriteParser:
WPSParser

List of all members.

Public Member Functions

 MSWriteParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::WIN3_WEUROPE)
 ~MSWriteParser ()
void parse (librevenge::RVNGTextInterface *const documentInterface)

Private Member Functions

 MSWriteParser (const MSWriteParser &)
MSWriteParseroperator= (const MSWriteParser &)
shared_ptr< WPSContentListenercreateListener (librevenge::RVNGTextInterface *interface)
void readFIB ()
void readFFNTB ()
void readSECT ()
void readPAP ()
void readCHP ()
void findZones ()
void readText (WPSEntry e)
void processObject (WPSPosition &pos, unsigned long lastPos)
bool processDDB (librevenge::RVNGBinaryData &bmpdata, WPSPosition &pos, unsigned width, unsigned height, unsigned byte_width, unsigned planes, unsigned bits_pixel, unsigned size)
bool processDIB (librevenge::RVNGBinaryData &bmpdata, unsigned size)
bool processWMF (librevenge::RVNGBinaryData &wmfdata, unsigned size)
void processEmbeddedOLE (WPSPosition &pos, unsigned long lastPos)
bool processStaticOLE (librevenge::RVNGBinaryData &, std::string &mimetype, WPSPosition &pos, unsigned long lastPos)
bool readString (std::string &res, unsigned long lastPos)
unsigned insertString (const unsigned char *str, unsigned size, libwps_tools_win::Font::Type type)
bool checkFilePosition (uint32_t pos) const
 check if the file position is correct or not

Private Attributes

uint32_t m_fileLength
 the last file position
uint32_t m_fcMac
std::vector
< MSWriteParserInternal::Paragraph
m_paragraphList
std::vector
< MSWriteParserInternal::Font
m_fontList
std::vector
< librevenge::RVNGString > 
m_fonts
WPSPageSpan m_pageSpan
libwps_tools_win::Font::Type m_fontType
shared_ptr< WPSContentListenerm_listener
WPSEntry m_Main
WPSEntry m_Header
WPSEntry m_Footer
bool m_HeaderPage1
bool m_FooterPage1

Friends

class MSWriteParserInternal::SubDocument
struct MSWriteParserInternal::Paragraph
struct MSWriteParserInternal::Font

Detailed Description

This class parses Microsoft Write 3.0 and 3.1.


Constructor & Destructor Documentation


Member Function Documentation

bool MSWriteParser::checkFilePosition ( uint32_t  pos) const [inline, private]

check if the file position is correct or not

Referenced by processEmbeddedOLE(), processObject(), readCHP(), readFFNTB(), readFIB(), readPAP(), readSECT(), and readString().

shared_ptr< WPSContentListener > MSWriteParser::createListener ( librevenge::RVNGTextInterface *  interface) [private]

Referenced by parse().

void MSWriteParser::findZones ( ) [private]

Referenced by parse().

unsigned MSWriteParser::insertString ( const unsigned char *  str,
unsigned  size,
libwps_tools_win::Font::Type  type 
) [private]

Referenced by readText().

MSWriteParser& MSWriteParser::operator= ( const MSWriteParser ) [private]
void MSWriteParser::parse ( librevenge::RVNGTextInterface *const  documentInterface) [virtual]

Implements WPSParser.

bool MSWriteParser::processDDB ( librevenge::RVNGBinaryData &  bmpdata,
WPSPosition pos,
unsigned  width,
unsigned  height,
unsigned  byte_width,
unsigned  planes,
unsigned  bits_pixel,
unsigned  size 
) [private]

Referenced by processObject(), and processStaticOLE().

bool MSWriteParser::processDIB ( librevenge::RVNGBinaryData &  bmpdata,
unsigned  size 
) [private]

Referenced by processStaticOLE().

void MSWriteParser::processEmbeddedOLE ( WPSPosition pos,
unsigned long  lastPos 
) [private]

Referenced by processObject().

void MSWriteParser::processObject ( WPSPosition pos,
unsigned long  lastPos 
) [private]

Referenced by readText().

bool MSWriteParser::processStaticOLE ( librevenge::RVNGBinaryData &  b,
std::string &  mimetype,
WPSPosition pos,
unsigned long  lastPos 
) [private]
bool MSWriteParser::processWMF ( librevenge::RVNGBinaryData &  wmfdata,
unsigned  size 
) [private]

Referenced by processObject(), and processStaticOLE().

void MSWriteParser::readCHP ( ) [private]

Referenced by parse().

void MSWriteParser::readFFNTB ( ) [private]

Referenced by parse().

void MSWriteParser::readFIB ( ) [private]

Referenced by parse().

void MSWriteParser::readPAP ( ) [private]

Referenced by parse().

void MSWriteParser::readSECT ( ) [private]

Referenced by parse().

bool MSWriteParser::readString ( std::string &  res,
unsigned long  lastPos 
) [private]

Friends And Related Function Documentation

friend struct MSWriteParserInternal::Font [friend]
friend struct MSWriteParserInternal::Paragraph [friend]
friend class MSWriteParserInternal::SubDocument [friend]

Member Data Documentation

uint32_t MSWriteParser::m_fcMac [private]
uint32_t MSWriteParser::m_fileLength [private]

the last file position

Referenced by checkFilePosition(), and MSWriteParser().

Referenced by readCHP(), and readText().

std::vector<librevenge::RVNGString> MSWriteParser::m_fonts [private]

Referenced by readCHP(), and readFFNTB().

Referenced by createListener(), and findZones().

Referenced by createListener(), and findZones().

Referenced by findZones(), and parse().


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