WriteNowParser Class Referencefinal

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

#include <WriteNowParser.hxx>

Inheritance diagram for WriteNowParser:
MWAWTextParser MWAWParser

Public Member Functions

 WriteNowParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor More...
 
 ~WriteNowParser () final
 destructor More...
 
bool checkHeader (MWAWHeader *header, bool strict=false) final
 checks if the document header is correct (or not) More...
 
void parse (librevenge::RVNGTextInterface *documentInterface) final
 virtual function used to parse the input More...
 
- Public Member Functions inherited from MWAWTextParser
 ~MWAWTextParser () override
 destructor More...
 
- Public Member Functions inherited from MWAWParser
virtual ~MWAWParser ()
 virtual destructor More...
 
int version () const
 returns the works version More...
 
MWAWParserStatePtr getParserState ()
 returns the parser state More...
 
MWAWHeadergetHeader ()
 returns the header More...
 
MWAWInputStreamPtrgetInput ()
 returns the actual input More...
 
MWAWListenerPtr getMainListener ()
 returns the main listener More...
 
MWAWGraphicListenerPtrgetGraphicListener ()
 returns the graphic listener More...
 
MWAWPresentationListenerPtrgetPresentationListener ()
 returns the presentation listener More...
 
MWAWSpreadsheetListenerPtrgetSpreadsheetListener ()
 returns the spreadsheet listener More...
 
MWAWTextListenerPtrgetTextListener ()
 returns the text listener More...
 
MWAWFontConverterPtrgetFontConverter ()
 returns the font converter More...
 
MWAWFontManagerPtrgetFontManager ()
 returns the font manager More...
 
MWAWPageSpan const & getPageSpan () const
 returns the actual page dimension More...
 
MWAWPageSpangetPageSpan ()
 returns the actual page dimension More...
 
double getFormLength () const
 returns the form length More...
 
double getFormWidth () const
 returns the form width More...
 
double getPageLength () const
 returns the page length (form length without margin ) More...
 
double getPageWidth () const
 returns the page width (form width without margin ) More...
 
MWAWRSRCParserPtrgetRSRCParser ()
 returns the rsrc parser More...
 
libmwaw::DebugFileascii ()
 a DebugFile used to write what we recognize when we parse the document 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 const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor (protected) More...
 
 MWAWTextParser (MWAWParserStatePtr const &state)
 constructor using a state More...
 
- Protected Member Functions inherited from MWAWParser
 MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor (protected) More...
 
 MWAWParser (MWAWParserStatePtr const &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 setAsciiName (char const *name)
 Debugging: change the default ascii file. More...
 
std::string const & asciiName () const
 return the ascii file name More...
 

Protected Attributes

std::shared_ptr< WriteNowParserInternal::Statem_state
 the state More...
 
std::shared_ptr< WriteNowEntryManagerm_entryManager
 the list of entry More...
 
std::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::WriteNowParser ( MWAWInputStreamPtr const &  input,
MWAWRSRCParserPtr const &  rsrcParser,
MWAWHeader header 
)

constructor

◆ ~WriteNowParser()

WriteNowParser::~WriteNowParser ( )
final

destructor

Member Function Documentation

◆ checkHeader()

bool WriteNowParser::checkHeader ( MWAWHeader header,
bool  strict = false 
)
finalvirtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

◆ checkIfPositionValid()

bool WriteNowParser::checkIfPositionValid ( long  pos)
protected

check if a position is inside the file

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

◆ createDocument()

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

creates the listener which will be associated to the document

Referenced by parse().

◆ createZones()

bool WriteNowParser::createZones ( )
protected

finds the different objects zones

Referenced by parse().

◆ getColor()

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

returns the color which corresponds to colId

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

◆ getColumnInfo()

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

returns the columns information

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

◆ init()

void WriteNowParser::init ( )
protected

inits all internal variables

Referenced by WriteNowParser().

◆ newPage()

void WriteNowParser::newPage ( int  number)
protected

adds a new page

Referenced by WriteNowText::send().

◆ parse()

void WriteNowParser::parse ( librevenge::RVNGTextInterface *  documentInterface)
finalvirtual

virtual function used to parse the input

Implements MWAWTextParser.

◆ parseGraphicZone()

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

◆ readColorMap()

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

try to read the colormap zone

Referenced by createZones().

◆ readDocEntries()

bool WriteNowParser::readDocEntries ( )
protected

try to read the document entries zone v3-v4

Referenced by createZones().

◆ readDocEntriesV2()

bool WriteNowParser::readDocEntriesV2 ( )
protected

try to read the document entries zone v2

Referenced by createZones().

◆ readEntry()

WriteNowEntry WriteNowParser::readEntry ( )
protected

read a file entry

Referenced by parseGraphicZone(), and readDocEntries().

◆ readGenericUnkn()

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

try to read the last generic zones

Referenced by createZones().

◆ readPrintInfo()

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

try to read the print info zone

Referenced by createZones().

◆ send()

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

try to send an entry

◆ sendFootnote()

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

try to send a footnote entry

Referenced by WriteNowText::send().

◆ sendGraphic()

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

try to send the graphic zone

Referenced by WriteNowText::send().

◆ sendPicture()

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

◆ WriteNowParserInternal::SubDocument

◆ WriteNowText

friend class WriteNowText
friend

Referenced by init().

Member Data Documentation

◆ m_entryManager

std::shared_ptr<WriteNowEntryManager> WriteNowParser::m_entryManager
protected

◆ m_state

◆ m_textParser

std::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 Fri Sep 18 2020 18:14:52 for libmwaw by doxygen 1.8.20