WriteNowParser Class Referencefinal

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

`#include <WriteNowParser.hxx>`

Inheritance diagram for WriteNowParser:

## Public Member Functions

| WriteNowParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor
| ~WriteNowParser () final
| destructor
bool | checkHeader (MWAWHeader *header, bool strict=false) final
| checks if the document header is correct (or not)
void | parse (librevenge::RVNGTextInterface *documentInterface) final
| virtual function used to parse the input
Public Member Functions inherited from MWAWTextParser
| ~MWAWTextParser () override
| destructor
Public Member Functions inherited from MWAWParser
virtual | ~MWAWParser ()
| virtual destructor
int | version () const
| returns the works version
MWAWParserStatePtr | getParserState ()
| returns the parser state
MWAWHeader * | getHeader ()
| returns the header
MWAWInputStreamPtr & | getInput ()
| returns the actual input
MWAWListenerPtr | getMainListener ()
| returns the main listener
MWAWGraphicListenerPtr & | getGraphicListener ()
| returns the graphic listener
MWAWPresentationListenerPtr & | getPresentationListener ()
| returns the presentation listener
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener ()
| returns the spreadsheet listener
MWAWTextListenerPtr & | getTextListener ()
| returns the text listener
MWAWFontConverterPtr & | getFontConverter ()
| returns the font converter
MWAWFontManagerPtr & | getFontManager ()
| returns the font manager
MWAWPageSpan const & | getPageSpan () const
| returns the actual page dimension
MWAWPageSpan & | getPageSpan ()
| returns the actual page dimension
double | getFormLength () const
| returns the form length
double | getFormWidth () const
| returns the form width
double | getPageLength () const
| returns the page length (form length without margin )
double | getPageWidth () const
| returns the page width (form width without margin )
MWAWRSRCParserPtr & | getRSRCParser ()
| returns the rsrc parser
libmwaw::DebugFile & | ascii ()
| a DebugFile used to write what we recognize when we parse the document

## 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 Member Functions inherited from MWAWTextParser
| MWAWTextParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor (protected)
| MWAWTextParser (MWAWParserStatePtr const &state)
| constructor using a state
Protected Member Functions inherited from MWAWParser
| MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor (protected)
| MWAWParser (MWAWParserStatePtr const &state)
| constructor using a state
void | setVersion (int vers)
| sets the document's version
void | setGraphicListener (MWAWGraphicListenerPtr &listener)
| sets the graphic listener
void | resetGraphicListener ()
| resets the listener
void | setPresentationListener (MWAWPresentationListenerPtr &listener)
| sets the presentation listener
void | resetPresentationListener ()
| resets the listener
void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener)
| sets the spreadsheet listener
void | resetSpreadsheetListener ()
| resets the listener
void | setTextListener (MWAWTextListenerPtr &listener)
| sets the text listener
void | resetTextListener ()
| resets the listener
void | setAsciiName (char const *name)
| Debugging: change the default ascii file.
std::string const & | asciiName () const
| return the ascii file name

## Protected Attributes

std::shared_ptr< WriteNowParserInternal::State > | m_state
| the state
std::shared_ptr< WriteNowEntryManager > | m_entryManager
| the list of entry
std::shared_ptr< WriteNowText > | m_textParser
| the text parser

## 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 )

final virtual

checks if the document header is correct (or not)

Implements MWAWParser.

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

## checkIfPositionValid()

bool WriteNowParser::checkIfPositionValid | ( | long | pos | ) |

protected

check if a position is inside the file

Referenced by checkHeader(), readDocEntriesV2(), readEntry(), and WriteNowParserInternal::SubDocument.

## createDocument()

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

protected

creates the listener which will be associated to the document

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

## createZones()

bool WriteNowParser::createZones | ( |  | ) |

protected

finds the different objects zones

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

## getColor()

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

protected

returns the color which corresponds to colId

Referenced by WriteNowParserInternal::SubDocument.

## getColumnInfo()

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

protected

returns the columns information

Referenced by WriteNowParserInternal::SubDocument.

## init()

void WriteNowParser::init | ( |  | ) |

protected

inits all internal variables

Referenced by WriteNowParser(), and WriteNowParserInternal::SubDocument.

## newPage()

void WriteNowParser::newPage | ( | int | number | ) |

protected

adds a new page

Referenced by WriteNowParserInternal::SubDocument.

## parse()

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

final virtual

virtual function used to parse the input

Implements MWAWTextParser.

Referenced by WriteNowParserInternal::SubDocument.

## 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(), and WriteNowParserInternal::SubDocument.

## readColorMap()

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

protected

try to read the colormap zone

Referenced by createZones(), and WriteNowParserInternal::SubDocument.

## readDocEntries()

bool WriteNowParser::readDocEntries | ( |  | ) |

protected

try to read the document entries zone v3-v4

Referenced by createZones(), and WriteNowParserInternal::SubDocument.

## readDocEntriesV2()

bool WriteNowParser::readDocEntriesV2 | ( |  | ) |

protected

try to read the document entries zone v2

Referenced by createZones(), and WriteNowParserInternal::SubDocument.

## readEntry()

WriteNowEntry WriteNowParser::readEntry | ( |  | ) |

protected

read a file entry

Referenced by parseGraphicZone(), readDocEntries(), and WriteNowParserInternal::SubDocument.

## readGenericUnkn()

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

protected

try to read the last generic zones

Referenced by createZones(), and WriteNowParserInternal::SubDocument.

## readPrintInfo()

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

protected

try to read the print info zone

Referenced by createZones(), and WriteNowParserInternal::SubDocument.

## send()

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

protected

try to send an entry

Referenced by WriteNowParserInternal::SubDocument.

## sendFootnote()

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

protected

try to send a footnote entry

Referenced by WriteNowParserInternal::SubDocument.

## sendGraphic()

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

protected

try to send the graphic zone

Referenced by WriteNowParserInternal::SubDocument.

## sendPicture()

bool WriteNowParser::sendPicture | ( | WriteNowEntry const & | entry,
|  | MWAWBox2i const & | bdbox )

protected

try to send a picture to the listener

Referenced by parse(), sendGraphic(), and WriteNowParserInternal::SubDocument.

## Friends And Related Symbol Documentation

## WriteNowParserInternal::SubDocument

friend class WriteNowParserInternal::SubDocument

friend

## WriteNowText

friend class WriteNowText

friend

Referenced by init(), and WriteNowText.

## Member Data Documentation

## m_entryManager

std::shared_ptr<WriteNowEntryManager> WriteNowParser::m_entryManager

protected

the list of entry

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

## m_state

std::shared_ptr<WriteNowParserInternal::State> WriteNowParser::m_state

protected

the state

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

## m_textParser

std::shared_ptr<WriteNowText> WriteNowParser::m_textParser

protected

the text parser

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

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

- WriteNowParser.hxx
- WriteNowParser.cxx