the main class to read a WriteNow file More...
#include <WNParser.hxx>
Public Member Functions | |
WNParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor More... | |
virtual | ~WNParser () |
destructor More... | |
bool | checkHeader (MWAWHeader *header, bool strict=false) |
checks if the document header is correct (or not) More... | |
void | parse (WPXDocumentInterface *documentInterface) |
virtual function used to parse the input More... | |
![]() | |
virtual | ~MWAWParser () |
virtual destructor More... | |
int | version () const |
returns the works version More... | |
void | setVersion (int vers) |
sets the works version More... | |
Protected Member Functions | |
void | init () |
inits all internal variables More... | |
void | createDocument (WPXDocumentInterface *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 (WNEntry 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 (WNEntry 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 (WNEntry const &entry) |
try to read the graphic zone (unknown + list of entries ) and to create the graphic data zone More... | |
bool | readColorMap (WNEntry const &entry) |
try to read the colormap zone More... | |
bool | readPrintInfo (WNEntry const &entry) |
try to read the print info zone More... | |
bool | readGenericUnkn (WNEntry const &entry) |
try to read the last generic zones More... | |
bool | sendPicture (WNEntry const &entry, Box2i const &bdbox) |
try to send a picture to the listener More... | |
WNEntry | readEntry () |
read a file entry More... | |
bool | checkIfPositionValid (long pos) |
check if a position is inside the file More... | |
![]() | |
MWAWParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor (protected) More... | |
MWAWParser (MWAWParserStatePtr state) | |
constructor using a state More... | |
MWAWParserStatePtr | getParserState () |
returns the parser state More... | |
MWAWHeader * | getHeader () |
returns the header More... | |
MWAWInputStreamPtr & | getInput () |
returns the actual input More... | |
MWAWGraphicListenerPtr & | getGraphicListener () |
returns the graphic listener More... | |
MWAWContentListenerPtr & | getListener () |
returns the listener 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... | |
void | setListener (MWAWContentListenerPtr &listener) |
sets the listener More... | |
void | resetListener () |
resets the listener More... | |
MWAWFontConverterPtr & | getFontConverter () |
returns the font converter More... | |
void | setFontConverter (MWAWFontConverterPtr fontConverter) |
sets the font convertor More... | |
libmwaw::DebugFile & | ascii () |
a DebugFile used to write what we recognize when we parse the document 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 < WNParserInternal::State > | m_state |
the state More... | |
shared_ptr< WNEntryManager > | m_entryManager |
the list of entry More... | |
shared_ptr< WNText > | m_textParser |
the text parser More... | |
Friends | |
class | WNText |
class | WNParserInternal::SubDocument |
the main class to read a WriteNow file
WNParser::WNParser | ( | MWAWInputStreamPtr | input, |
MWAWRSRCParserPtr | rsrcParser, | ||
MWAWHeader * | header | ||
) |
constructor
|
virtual |
destructor
|
virtual |
|
protected |
check if a position is inside the file
Referenced by checkHeader(), WNText::parseZone(), readDocEntriesV2(), and readEntry().
|
protected |
creates the listener which will be associated to the document
Referenced by parse().
|
protected |
finds the different objects zones
Referenced by parse().
|
protected |
returns the color which corresponds to colId
Referenced by WNText::readFont(), and WNText::readTable().
|
protected |
returns the columns information
Referenced by WNText::createZones(), WNText::numPages(), and WNText::sendZone().
|
protected |
inits all internal variables
Referenced by WNParser().
|
protected |
adds a new page
Referenced by WNText::send().
|
virtual |
virtual function used to parse the input
Implements MWAWParser.
|
protected |
try to read the graphic zone (unknown + list of entries ) and to create the graphic data zone
Referenced by createZones().
|
protected |
try to read the colormap zone
Referenced by createZones().
|
protected |
try to read the document entries zone v3-v4
Referenced by createZones().
|
protected |
try to read the document entries zone v2
Referenced by createZones().
|
protected |
read a file entry
Referenced by parseGraphicZone(), and readDocEntries().
|
protected |
try to read the last generic zones
Referenced by createZones().
|
protected |
try to read the print info zone
Referenced by createZones().
|
protected |
try to send an entry
|
protected |
try to send a footnote entry
Referenced by WNText::send().
|
protected |
try to send the graphic zone
Referenced by WNText::send().
try to send a picture to the listener
Referenced by parse(), and sendGraphic().
|
friend |
|
protected |
the list of entry
Referenced by checkHeader(), createZones(), init(), parse(), parseGraphicZone(), readDocEntries(), and readDocEntriesV2().
|
protected |
the state
Referenced by checkHeader(), checkIfPositionValid(), createDocument(), getColor(), getColumnInfo(), init(), newPage(), parse(), parseGraphicZone(), readColorMap(), readDocEntries(), readDocEntriesV2(), and sendGraphic().
|
protected |
the text parser
Referenced by createDocument(), createZones(), init(), parse(), and send().