WriteNowParser Class Reference

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

#include <WriteNowParser.hxx>

Inheritance diagram for WriteNowParser:
MWAWTextParser MWAWParser

Public Member Functions

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

Protected Member Functions

void init ()
 inits all internal variables More...
 
void createDocument (librevenge::RVNGTextInterface *documentInterface)
 creates the listener which will be associated to the document More...
 
bool createZones ()
 finds the different objects zones More...
 
void getColumnInfo (int &numColumns, int &width) const
 returns the columns information More...
 
void newPage (int number)
 adds a new page More...
 
bool getColor (int colId, MWAWColor &col) const
 returns the color which corresponds to colId More...
 
void sendFootnote (WriteNowEntry const &entry)
 try to send a footnote entry More...
 
bool sendGraphic (int gId, MWAWBox2i const &bdbox)
 try to send the graphic zone More...
 
void send (WriteNowEntry const &entry)
 try to send an entry More...
 
bool readDocEntries ()
 try to read the document entries zone v3-v4 More...
 
bool readDocEntriesV2 ()
 try to read the document entries zone v2 More...
 
bool parseGraphicZone (WriteNowEntry const &entry)
 try to read the graphic zone (unknown + list of entries ) and to create the graphic data zone More...
 
bool readColorMap (WriteNowEntry const &entry)
 try to read the colormap zone More...
 
bool readPrintInfo (WriteNowEntry const &entry)
 try to read the print info zone More...
 
bool readGenericUnkn (WriteNowEntry const &entry)
 try to read the last generic zones More...
 
bool sendPicture (WriteNowEntry const &entry, MWAWBox2i const &bdbox)
 try to send a picture to the listener More...
 
WriteNowEntry readEntry ()
 read a file entry More...
 
bool checkIfPositionValid (long pos)
 check if a position is inside the file More...
 
- Protected Member Functions inherited from MWAWTextParser
 MWAWTextParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
 constructor (protected) More...
 
 MWAWTextParser (MWAWParserStatePtr state)
 constructor using a state More...
 
- Protected Member Functions inherited from MWAWParser
 MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
 constructor (protected) More...
 
 MWAWParser (MWAWParserStatePtr state)
 constructor using a state More...
 
void setVersion (int vers)
 sets the document's version More...
 
void setGraphicListener (MWAWGraphicListenerPtr &listener)
 sets the graphic listener More...
 
void resetGraphicListener ()
 resets the listener More...
 
void setPresentationListener (MWAWPresentationListenerPtr &listener)
 sets the presentation listener More...
 
void resetPresentationListener ()
 resets the listener More...
 
void setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener)
 sets the spreadsheet listener More...
 
void resetSpreadsheetListener ()
 resets the listener More...
 
void setTextListener (MWAWTextListenerPtr &listener)
 sets the text listener More...
 
void resetTextListener ()
 resets the listener More...
 
void setFontConverter (MWAWFontConverterPtr fontConverter)
 sets the font convertor More...
 
void setAsciiName (char const *name)
 Debugging: change the default ascii file. More...
 
std::string const & asciiName () const
 return the ascii file name More...
 

Protected Attributes

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

Friends

class WriteNowText
 
class WriteNowParserInternal::SubDocument
 

Detailed Description

the main class to read a WriteNow file

Constructor & Destructor Documentation

WriteNowParser::WriteNowParser ( MWAWInputStreamPtr  input,
MWAWRSRCParserPtr  rsrcParser,
MWAWHeader header 
)

constructor

WriteNowParser::~WriteNowParser ( )
virtual

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().

WriteNowEntry WriteNowParser::readEntry ( )
protected

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 WriteNowText
friend

Referenced by init().

Member Data Documentation

shared_ptr<WriteNowEntryManager> WriteNowParser::m_entryManager
protected
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:

Generated on Tue Mar 1 2016 23:42:57 for libmwaw by doxygen 1.8.4