the main class to read a Nisus Writer file More...
#include <NSParser.hxx>
Public Member Functions | |
NSParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor More... | |
virtual | ~NSParser () |
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... | |
Vec2f | getPageLeftTop () const |
returns the page left top point ( in inches) More... | |
void | getColumnInfo (int &numColumns, float &colSep) const |
returns the columns information More... | |
void | getFootnoteInfo (NSStruct::FootnoteInfo &fInfo) const |
returns the footnote information More... | |
void | newPage (int number) |
adds a new page More... | |
std::string | getDateFormat (NSStruct::ZoneType zoneId, int vId) const |
returns the date format corresponding to a variable id or "" More... | |
bool | getReferenceData (NSStruct::ZoneType zoneId, int vId, MWAWField::Type &fType, std::string &content, std::vector< int > &number) const |
returns the fieldtype or a string corresponding to a variable More... | |
bool | sendPicture (int pictId, MWAWPosition const &pictPos, WPXPropertyList extras=WPXPropertyList()) |
try to send a picture More... | |
bool | createZones () |
finds the different objects zones More... | |
bool | readPrintInfo (MWAWEntry const &entry) |
read the print info zone ( id=128 ) More... | |
bool | readCPRC (MWAWEntry const &entry) |
read the CPRC info zone ( id=128 ), an unknown zone More... | |
bool | readPageLimit (MWAWEntry const &entry) |
read the PGLY info zone ( id=128 ) More... | |
bool | readStringsList (MWAWEntry const &entry, std::vector< std::string > &list, bool simpleList) |
read a list of strings More... | |
bool | readINFO (MWAWEntry const &entry) |
read the INFO info zone, an unknown zone of size 0x23a: to doo More... | |
bool | readReference (NSStruct::RecursifData const &data) |
parse the MRK7 resource More... | |
bool | readVariable (NSStruct::RecursifData const &data) |
parse the DSPL/VARI/VRS resource: numbering definition, variable or variable ? More... | |
bool | readCNTR (MWAWEntry const &entry, int zoneId) |
read the CNTR resource: a list of version controler ? More... | |
bool | readNumberingReset (MWAWEntry const &entry, int zoneId) |
parse the DPND resource: numbering reset ( one by zone ) : related to CNTR and VRS ? More... | |
bool | readSGP1 (NSStruct::RecursifData const &data) |
parse the SGP1 resource: a unknown resource More... | |
bool | readABBR (MWAWEntry const &entry) |
parse the ABBR resource: a list of abreviation? More... | |
bool | readFTA2 (MWAWEntry const &entry) |
parse the FTA2 resource: a list of ? find in v6 document More... | |
bool | readFnSc (MWAWEntry const &entry) |
parse the FnSc resource: a unknown resource, find in v6 document More... | |
MWAWInputStreamPtr | rsrcInput () |
return the input input More... | |
libmwaw::DebugFile & | rsrcAscii () |
a DebugFile used to write what we recognize when we parse the document in rsrc 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 < NSParserInternal::State > | m_state |
the state More... | |
shared_ptr< NSGraph > | m_graphParser |
the graph parser More... | |
shared_ptr< NSText > | m_textParser |
the text parser More... | |
Friends | |
struct | NSStruct::RecursifData |
class | NSGraph |
class | NSText |
the main class to read a Nisus Writer file
NSParser::NSParser | ( | MWAWInputStreamPtr | input, |
MWAWRSRCParserPtr | rsrcParser, | ||
MWAWHeader * | header | ||
) |
constructor
|
virtual |
destructor
|
virtual |
checks if the document header is correct (or not)
no data fork, may be ok, but this means that the file contains no text and no picture, so...
Implements MWAWParser.
Referenced by parse().
|
protected |
creates the listener which will be associated to the document
Referenced by parse().
|
protected |
finds the different objects zones
find also the resources :
Referenced by parse().
|
protected |
returns the columns information
Referenced by NSText::sendText().
|
protected |
returns the date format corresponding to a variable id or ""
Referenced by NSText::sendText().
|
protected |
returns the footnote information
Referenced by NSText::sendText().
|
protected |
returns the page left top point ( in inches)
Referenced by NSGraph::sendPageGraphics().
|
protected |
returns the fieldtype or a string corresponding to a variable
Referenced by NSText::sendText().
|
protected |
inits all internal variables
Referenced by NSParser().
|
protected |
adds a new page
Referenced by NSText::sendText().
|
virtual |
virtual function used to parse the input
Implements MWAWParser.
|
protected |
parse the ABBR resource: a list of abreviation?
read the ABBR resource: a list of abreviation ?
Referenced by createZones().
|
protected |
read the CNTR resource: a list of version controler ?
Referenced by createZones().
|
protected |
read the CPRC info zone ( id=128 ), an unknown zone
find only 0... except one time f0=1[id?], f4=1900 f6=206c [2pos?]
Referenced by createZones().
|
protected |
parse the FnSc resource: a unknown resource, find in v6 document
read the FnSc resource: a list of ?
Referenced by createZones().
|
protected |
parse the FTA2 resource: a list of ? find in v6 document
read the FTA2 resource: a list of ?
Referenced by createZones().
|
protected |
read the INFO info zone, an unknown zone of size 0x23a: to doo
read the INFO resource: a unknown zone
Referenced by createZones().
|
protected |
parse the DPND resource: numbering reset ( one by zone ) : related to CNTR and VRS ?
Referenced by createZones().
|
protected |
read the PGLY info zone ( id=128 )
Referenced by createZones().
|
protected |
read the print info zone ( id=128 )
Referenced by createZones().
|
protected |
parse the MRK7 resource
Referenced by createZones().
|
protected |
parse the SGP1 resource: a unknown resource
Referenced by createZones().
|
protected |
read a list of strings
Referenced by NSText::createZones(), and createZones().
|
protected |
parse the DSPL/VARI/VRS resource: numbering definition, variable or variable ?
Referenced by createZones().
|
protected |
a DebugFile used to write what we recognize when we parse the document in rsrc
Referenced by NSStruct::RecursifData::read(), readABBR(), readCNTR(), readCPRC(), readFnSc(), NSText::readFonts(), NSText::readFontsList(), NSText::readFootnotes(), readFTA2(), NSText::readHeaderFooter(), readINFO(), readNumberingReset(), readPageLimit(), NSText::readParagraphs(), NSGraph::readPGRA(), NSText::readPICD(), NSGraph::readPLAC(), NSGraph::readPLDT(), NSText::readPosToFont(), readPrintInfo(), readReference(), readSGP1(), readStringsList(), readVariable(), and NSText::sendText().
|
protected |
return the input input
Referenced by NSText::findFilePos(), NSText::getFooter(), NSText::getHeader(), NSStruct::RecursifData::read(), readABBR(), readCNTR(), readCPRC(), readFnSc(), NSText::readFonts(), NSText::readFontsList(), NSText::readFootnotes(), readFTA2(), NSText::readHeaderFooter(), readINFO(), readNumberingReset(), readPageLimit(), NSText::readParagraphs(), NSGraph::readPGRA(), NSText::readPICD(), NSGraph::readPLAC(), NSGraph::readPLDT(), NSText::readPosToFont(), readPrintInfo(), readReference(), readSGP1(), readStringsList(), readVariable(), NSGraph::sendPicture(), sendPicture(), and NSText::sendText().
|
protected |
try to send a picture
Referenced by NSText::sendText().
|
friend |
|
protected |
the graph parser
Referenced by createDocument(), createZones(), init(), parse(), and sendPicture().
|
protected |
the state
Referenced by checkHeader(), createDocument(), createZones(), getColumnInfo(), getDateFormat(), getFootnoteInfo(), getPageLeftTop(), init(), newPage(), readINFO(), readNumberingReset(), readPageLimit(), readReference(), and readVariable().
|
protected |
the text parser
Referenced by createDocument(), createZones(), init(), and parse().