NSParser Class Reference

the main class to read a Nisus Writer file More...

#include <NSParser.hxx>

Inheritance diagram for NSParser:
MWAWParser

List of all members.

Public Member Functions

 NSParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
 constructor
virtual ~NSParser ()
 destructor
bool checkHeader (MWAWHeader *header, bool strict=false)
 checks if the document header is correct (or not)
void parse (WPXDocumentInterface *documentInterface)
 virtual function used to parse the input

Protected Member Functions

void init ()
 inits all internal variables
void createDocument (WPXDocumentInterface *documentInterface)
 creates the listener which will be associated to the document
Vec2f getPageLeftTop () const
 returns the page left top point ( in inches)
void getColumnInfo (int &numColumns, float &colSep) const
 returns the columns information
void getFootnoteInfo (NSStruct::FootnoteInfo &fInfo) const
 returns the footnote information
void newPage (int number)
 adds a new page
std::string getDateFormat (NSStruct::ZoneType zoneId, int vId) const
 returns the date format corresponding to a variable id or ""
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
bool sendPicture (int pictId, MWAWPosition const &pictPos, WPXPropertyList extras=WPXPropertyList())
 try to send a picture
bool createZones ()
 finds the different objects zones
bool readPrintInfo (MWAWEntry const &entry)
 read the print info zone ( id=128 )
bool readCPRC (MWAWEntry const &entry)
 read the CPRC info zone ( id=128 ), an unknown zone
bool readPageLimit (MWAWEntry const &entry)
 read the PGLY info zone ( id=128 )
bool readStringsList (MWAWEntry const &entry, std::vector< std::string > &list, bool simpleList)
 read a list of strings
bool readINFO (MWAWEntry const &entry)
 read the INFO info zone, an unknown zone of size 0x23a: to doo
bool readReference (NSStruct::RecursifData const &data)
 parse the MRK7 resource
bool readVariable (NSStruct::RecursifData const &data)
 parse the DSPL/VARI/VRS resource: numbering definition, variable or variable ?
bool readCNTR (MWAWEntry const &entry, int zoneId)
 read the CNTR resource: a list of version controler ?
bool readNumberingReset (MWAWEntry const &entry, int zoneId)
 parse the DPND resource: numbering reset ( one by zone ) : related to CNTR and VRS ?
bool readSGP1 (NSStruct::RecursifData const &data)
 parse the SGP1 resource: a unknown resource
bool readABBR (MWAWEntry const &entry)
 parse the ABBR resource: a list of abreviation?
bool readFTA2 (MWAWEntry const &entry)
 parse the FTA2 resource: a list of ? find in v6 document
bool readFnSc (MWAWEntry const &entry)
 parse the FnSc resource: a unknown resource, find in v6 document
MWAWInputStreamPtr rsrcInput ()
 return the input input
libmwaw::DebugFilersrcAscii ()
 a DebugFile used to write what we recognize when we parse the document in rsrc

Protected Attributes

shared_ptr
< NSParserInternal::State
m_state
 the state
shared_ptr< NSGraphm_graphParser
 the graph parser
shared_ptr< NSTextm_textParser
 the text parser

Friends

struct NSStruct::RecursifData
class NSGraph
class NSText

Detailed Description

the main class to read a Nisus Writer file


Constructor & Destructor Documentation

NSParser::NSParser ( MWAWInputStreamPtr  input,
MWAWRSRCParserPtr  rsrcParser,
MWAWHeader header 
)

constructor

NSParser::~NSParser ( ) [virtual]

destructor


Member Function Documentation

bool NSParser::checkHeader ( MWAWHeader header,
bool  strict = false 
) [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().

void NSParser::createDocument ( WPXDocumentInterface *  documentInterface) [protected]

creates the listener which will be associated to the document

Referenced by parse().

bool NSParser::createZones ( ) [protected]

finds the different objects zones

find also the resources :

  • alis: seems to contains data and some strings
  • OPEN: seems to contains one string: author? (size 0x20)
  • INF2: seems to contain some colors and some data (size 0x222)
  • sect: in two files: 010[1|a]0000acc0015f0000000[1|6]000... (size 0x24)

Referenced by parse().

void NSParser::getColumnInfo ( int &  numColumns,
float &  colSep 
) const [protected]

returns the columns information

Referenced by NSText::sendText().

std::string NSParser::getDateFormat ( NSStruct::ZoneType  zoneId,
int  vId 
) const [protected]

returns the date format corresponding to a variable id or ""

Referenced by NSText::sendText().

void NSParser::getFootnoteInfo ( NSStruct::FootnoteInfo fInfo) const [protected]

returns the footnote information

Referenced by NSText::sendText().

Vec2f NSParser::getPageLeftTop ( ) const [protected]

returns the page left top point ( in inches)

Referenced by NSGraph::sendPageGraphics().

bool NSParser::getReferenceData ( NSStruct::ZoneType  zoneId,
int  vId,
MWAWField::Type fType,
std::string &  content,
std::vector< int > &  number 
) const [protected]

returns the fieldtype or a string corresponding to a variable

Referenced by NSText::sendText().

void NSParser::init ( ) [protected]

inits all internal variables

Referenced by NSParser().

void NSParser::newPage ( int  number) [protected]

adds a new page

Referenced by NSText::sendText().

void NSParser::parse ( WPXDocumentInterface *  documentInterface) [virtual]

virtual function used to parse the input

Implements MWAWParser.

bool NSParser::readABBR ( MWAWEntry const &  entry) [protected]

parse the ABBR resource: a list of abreviation?

read the ABBR resource: a list of abreviation ?

Referenced by createZones().

bool NSParser::readCNTR ( MWAWEntry const &  entry,
int  zoneId 
) [protected]

read the CNTR resource: a list of version controler ?

Referenced by createZones().

bool NSParser::readCPRC ( MWAWEntry const &  entry) [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().

bool NSParser::readFnSc ( MWAWEntry const &  entry) [protected]

parse the FnSc resource: a unknown resource, find in v6 document

read the FnSc resource: a list of ?

Referenced by createZones().

bool NSParser::readFTA2 ( MWAWEntry const &  entry) [protected]

parse the FTA2 resource: a list of ? find in v6 document

read the FTA2 resource: a list of ?

Referenced by createZones().

bool NSParser::readINFO ( MWAWEntry const &  entry) [protected]

read the INFO info zone, an unknown zone of size 0x23a: to doo

read the INFO resource: a unknown zone

Referenced by createZones().

bool NSParser::readNumberingReset ( MWAWEntry const &  entry,
int  zoneId 
) [protected]

parse the DPND resource: numbering reset ( one by zone ) : related to CNTR and VRS ?

Referenced by createZones().

bool NSParser::readPageLimit ( MWAWEntry const &  entry) [protected]

read the PGLY info zone ( id=128 )

Referenced by createZones().

bool NSParser::readPrintInfo ( MWAWEntry const &  entry) [protected]

read the print info zone ( id=128 )

Referenced by createZones().

bool NSParser::readReference ( NSStruct::RecursifData const &  data) [protected]

parse the MRK7 resource

Referenced by createZones().

bool NSParser::readSGP1 ( NSStruct::RecursifData const &  data) [protected]

parse the SGP1 resource: a unknown resource

Referenced by createZones().

bool NSParser::readStringsList ( MWAWEntry const &  entry,
std::vector< std::string > &  list,
bool  simpleList 
) [protected]

read a list of strings

Referenced by NSText::createZones(), and createZones().

bool NSParser::readVariable ( NSStruct::RecursifData const &  data) [protected]

parse the DSPL/VARI/VRS resource: numbering definition, variable or variable ?

Referenced by createZones().

bool NSParser::sendPicture ( int  pictId,
MWAWPosition const &  pictPos,
WPXPropertyList  extras = WPXPropertyList() 
) [protected]

try to send a picture

Referenced by NSText::sendText().


Friends And Related Function Documentation

friend class NSGraph [friend]

Referenced by init().

friend struct NSStruct::RecursifData [friend]
friend class NSText [friend]

Referenced by init().


Member Data Documentation

shared_ptr<NSGraph> NSParser::m_graphParser [protected]

the graph parser

Referenced by createDocument(), createZones(), init(), parse(), and sendPicture().

shared_ptr<NSText> NSParser::m_textParser [protected]

the text parser

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


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