WriteNowParser Class Reference

the main class to read a WriteNow file More...

#include <WriteNowParser.hxx>

Inheritance diagram for WriteNowParser:
MWAWTextParser MWAWParser

List of all members.

Public Member Functions

 WriteNowParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
 constructor
virtual ~WriteNowParser ()
 destructor
bool checkHeader (MWAWHeader *header, bool strict=false)
 checks if the document header is correct (or not)
void parse (librevenge::RVNGTextInterface *documentInterface)
 virtual function used to parse the input

Protected Member Functions

void init ()
 inits all internal variables
void createDocument (librevenge::RVNGTextInterface *documentInterface)
 creates the listener which will be associated to the document
bool createZones ()
 finds the different objects zones
void getColumnInfo (int &numColumns, int &width) const
 returns the columns information
void newPage (int number)
 adds a new page
bool getColor (int colId, MWAWColor &col) const
 returns the color which corresponds to colId
void sendFootnote (WriteNowEntry const &entry)
 try to send a footnote entry
bool sendGraphic (int gId, MWAWBox2i const &bdbox)
 try to send the graphic zone
void send (WriteNowEntry const &entry)
 try to send an entry
bool readDocEntries ()
 try to read the document entries zone v3-v4
bool readDocEntriesV2 ()
 try to read the document entries zone v2
bool parseGraphicZone (WriteNowEntry const &entry)
 try to read the graphic zone (unknown + list of entries ) and to create the graphic data zone
bool readColorMap (WriteNowEntry const &entry)
 try to read the colormap zone
bool readPrintInfo (WriteNowEntry const &entry)
 try to read the print info zone
bool readGenericUnkn (WriteNowEntry const &entry)
 try to read the last generic zones
bool sendPicture (WriteNowEntry const &entry, MWAWBox2i const &bdbox)
 try to send a picture to the listener
WriteNowEntry readEntry ()
 read a file entry
bool checkIfPositionValid (long pos)
 check if a position is inside the file

Protected Attributes

shared_ptr
< WriteNowParserInternal::State
m_state
 the state
shared_ptr< WriteNowEntryManagerm_entryManager
 the list of entry
shared_ptr< WriteNowTextm_textParser
 the text parser

Friends

class WriteNowText
class WriteNowParserInternal::SubDocument

Detailed Description

the main class to read a WriteNow file


Constructor & Destructor Documentation

constructor

destructor


Member Function Documentation

bool WriteNowParser::checkHeader ( MWAWHeader header,
bool  strict = false 
) [virtual]

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

bool WriteNowParser::checkIfPositionValid ( long  pos) [protected]

check if a position is inside the file

Referenced by checkHeader(), WriteNowText::parseZone(), readDocEntriesV2(), and readEntry().

void WriteNowParser::createDocument ( librevenge::RVNGTextInterface *  documentInterface) [protected]

creates the listener which will be associated to the document

Referenced by parse().

bool WriteNowParser::createZones ( ) [protected]

finds the different objects zones

Referenced by parse().

bool WriteNowParser::getColor ( int  colId,
MWAWColor col 
) const [protected]

returns the color which corresponds to colId

Referenced by WriteNowText::readFont(), and WriteNowText::readTable().

void WriteNowParser::getColumnInfo ( int &  numColumns,
int &  width 
) const [protected]

returns the columns information

Referenced by WriteNowText::createZones(), WriteNowText::numPages(), and WriteNowText::sendZone().

void WriteNowParser::init ( ) [protected]

inits all internal variables

Referenced by WriteNowParser().

void WriteNowParser::newPage ( int  number) [protected]

adds a new page

Referenced by WriteNowText::send().

void WriteNowParser::parse ( librevenge::RVNGTextInterface *  documentInterface) [virtual]

virtual function used to parse the input

Implements MWAWTextParser.

bool WriteNowParser::parseGraphicZone ( WriteNowEntry const &  entry) [protected]

try to read the graphic zone (unknown + list of entries ) and to create the graphic data zone

Referenced by createZones().

bool WriteNowParser::readColorMap ( WriteNowEntry const &  entry) [protected]

try to read the colormap zone

Referenced by createZones().

bool WriteNowParser::readDocEntries ( ) [protected]

try to read the document entries zone v3-v4

Referenced by createZones().

bool WriteNowParser::readDocEntriesV2 ( ) [protected]

try to read the document entries zone v2

Referenced by createZones().

read a file entry

Referenced by parseGraphicZone(), and readDocEntries().

bool WriteNowParser::readGenericUnkn ( WriteNowEntry const &  entry) [protected]

try to read the last generic zones

Referenced by createZones().

bool WriteNowParser::readPrintInfo ( WriteNowEntry const &  entry) [protected]

try to read the print info zone

Referenced by createZones().

void WriteNowParser::send ( WriteNowEntry const &  entry) [protected]

try to send an entry

Referenced by WriteNowParserInternal::SubDocument::parse().

void WriteNowParser::sendFootnote ( WriteNowEntry const &  entry) [protected]

try to send a footnote entry

Referenced by WriteNowText::send().

bool WriteNowParser::sendGraphic ( int  gId,
MWAWBox2i const &  bdbox 
) [protected]

try to send the graphic zone

Referenced by WriteNowText::send().

bool WriteNowParser::sendPicture ( WriteNowEntry const &  entry,
MWAWBox2i const &  bdbox 
) [protected]

try to send a picture to the listener

Referenced by parse(), and sendGraphic().


Friends And Related Function Documentation

friend class WriteNowParserInternal::SubDocument [friend]
friend class WriteNowText [friend]

Referenced by init().


Member Data Documentation

shared_ptr<WriteNowText> WriteNowParser::m_textParser [protected]

the text parser

Referenced by createDocument(), createZones(), init(), parse(), and send().


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