WriteNowParser Class Reference documentation

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
WriteNowParser Class Reference

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

`#include <WriteNowParser.hxx>`

Inheritance diagram for WriteNowParser:

## 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...
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...
MWAWHeader * | getHeader ()
| returns the header More...
MWAWInputStreamPtr & | getInput ()
| returns the actual input More...
MWAWListenerPtr | getMainListener ()
| returns the main listener More...
MWAWGraphicListenerPtr & | getGraphicListener ()
| returns the graphic listener More...
MWAWPresentationListenerPtr & | getPresentationListener ()
| returns the presentation listener More...
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener ()
| returns the spreadsheet listener More...
MWAWTextListenerPtr & | getTextListener ()
| returns the text listener More...
MWAWFontConverterPtr & | getFontConverter ()
| returns the font converter More...
MWAWPageSpan const & | getPageSpan () const
| returns the actual page dimension More...
MWAWPageSpan & | getPageSpan ()
| 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...
MWAWRSRCParserPtr & | getRSRCParser ()
| returns the rsrc parser More...
libmwaw::DebugFile & | ascii ()
| 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, Box2i 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, Box2i 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< WriteNowEntryManager > | m_entryManager
| the list of entry More...
shared_ptr< WriteNowText > | m_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

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

try to send a footnote entry

Referenced by WriteNowText::send().

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

try to send the graphic zone

Referenced by WriteNowText::send().

bool WriteNowParser::sendPicture | ( | WriteNowEntry const & | entry,
|  | Box2i 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<WriteNowEntryManager> WriteNowParser::m_entryManager
| protected

the list of entry

Referenced by checkHeader(), createZones(), init(), parse(), parseGraphicZone(), readDocEntries(), and readDocEntriesV2().

shared_ptr<WriteNowParserInternal::State> WriteNowParser::m_state
| protected

the state

Referenced by checkHeader(), checkIfPositionValid(), createDocument(), getColor(), getColumnInfo(), init(), newPage(), parse(), parseGraphicZone(), readColorMap(), readDocEntries(), readDocEntriesV2(), and sendGraphic().

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:

- WriteNowParser.hxx
- WriteNowParser.cxx