FullWrtParser Class Referencefinal

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

#include <FullWrtParser.hxx>

Inheritance diagram for FullWrtParser:
MWAWTextParser MWAWParser

Public Member Functions

 FullWrtParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor More...
 
 ~FullWrtParser () final
 destructor More...
 
bool checkHeader (MWAWHeader *header, bool strict=false) final
 checks if the document header is correct (or not) More...
 
void parse (librevenge::RVNGTextInterface *documentInterface) final
 virtual function used to parse the input More...
 
- Public Member Functions inherited from MWAWTextParser
 ~MWAWTextParser () override
 destructor 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...
 
MWAWHeadergetHeader ()
 returns the header More...
 
MWAWInputStreamPtrgetInput ()
 returns the actual input More...
 
MWAWListenerPtr getMainListener ()
 returns the main listener More...
 
MWAWGraphicListenerPtrgetGraphicListener ()
 returns the graphic listener More...
 
MWAWPresentationListenerPtrgetPresentationListener ()
 returns the presentation listener More...
 
MWAWSpreadsheetListenerPtrgetSpreadsheetListener ()
 returns the spreadsheet listener More...
 
MWAWTextListenerPtrgetTextListener ()
 returns the text listener More...
 
MWAWFontConverterPtrgetFontConverter ()
 returns the font converter More...
 
MWAWFontManagerPtrgetFontManager ()
 returns the font manager More...
 
MWAWPageSpan const & getPageSpan () const
 returns the actual page dimension More...
 
MWAWPageSpangetPageSpan ()
 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...
 
MWAWRSRCParserPtrgetRSRCParser ()
 returns the rsrc parser More...
 
libmwaw::DebugFileascii ()
 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...
 
bool createFileZones ()
 create the file zone ( first step of create zones) More...
 
void newPage (int number)
 adds a new page More...
 
bool readDocPosition ()
 find the last position of the document and read data More...
 
bool readFileZoneFlags (FullWrtStruct::EntryPtr zone)
 try to read the file zones main flags More...
 
bool readFileZonePos (FullWrtStruct::EntryPtr zone)
 try to read the file zones position More...
 
bool readDocZoneData (FullWrtStruct::EntryPtr zone)
 try to read the zone containing the data of each doc zone (ie. Zone0) More...
 
bool readDocZoneStruct (FullWrtStruct::EntryPtr zone)
 try to read the zone which stores the structure of zone0, ... (ie. Zone1) More...
 
bool readDocInfo (FullWrtStruct::EntryPtr zone)
 try to read zone2, a zone which stores the document information zone, ... More...
 
bool readEndDocInfo (FullWrtStruct::EntryPtr zone)
 try to read the end of zone2 (only v2) ? More...
 
bool readCitationDocInfo (FullWrtStruct::EntryPtr zone)
 try to read the list of citation (at the end of doc info) More...
 
bool readPrintInfo (FullWrtStruct::EntryPtr zone)
 try read the print info zone More...
 
MWAWVec2f getPageLeftTop () const
 returns the page left top point ( in inches) More...
 
bool getBorder (int bId, FullWrtStruct::Border &border) const
 try to return a border corresponding to an id More...
 
void sendText (int docId, libmwaw::SubDocumentType type, MWAWNote::Type which=MWAWNote::FootNote)
 try to send a footnote/endnote entry More...
 
void sendGraphic (int docId)
 try to send a graphic More...
 
void sendVariable (int docId)
 try to send a variable, in pratice do nothing More...
 
void sendReference (int docId)
 try to send a reference, in pratice do nothing More...
 
bool send (int fileId, MWAWColor fontColor=MWAWColor::black())
 ask the text parser to send a zone More...
 
int getNumDocZoneStruct () const
 returns the number of zone struct More...
 
std::string getDocumentTypeName (int zId) const
 returns a the type of a document zone ( mainly used for debugging) More...
 
bool readReferenceData (FullWrtStruct::EntryPtr zone)
 try to read the reference data More...
 
bool readGenericDocData (FullWrtStruct::EntryPtr zone, FullWrtStruct::ZoneHeader &doc)
 try to read the data of a zone which begins with a generic header More...
 
- Protected Member Functions inherited from MWAWTextParser
 MWAWTextParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor (protected) More...
 
 MWAWTextParser (MWAWParserStatePtr const &state)
 constructor using a state More...
 
- Protected Member Functions inherited from MWAWParser
 MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor (protected) More...
 
 MWAWParser (MWAWParserStatePtr const &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 setAsciiName (char const *name)
 Debugging: change the default ascii file. More...
 
std::string const & asciiName () const
 return the ascii file name More...
 

Protected Attributes

std::shared_ptr< FullWrtParserInternal::Statem_state
 the state More...
 
std::shared_ptr< FullWrtGraphm_graphParser
 the graph parser More...
 
std::shared_ptr< FullWrtTextm_textParser
 the text parser More...
 

Friends

class FullWrtGraph
 
class FullWrtText
 
class FullWrtParserInternal::SubDocument
 

Detailed Description

the main class to read a FullWrite file

Constructor & Destructor Documentation

◆ FullWrtParser()

FullWrtParser::FullWrtParser ( MWAWInputStreamPtr const &  input,
MWAWRSRCParserPtr const &  rsrcParser,
MWAWHeader header 
)

constructor

◆ ~FullWrtParser()

FullWrtParser::~FullWrtParser ( )
final

destructor

Member Function Documentation

◆ checkHeader()

bool FullWrtParser::checkHeader ( MWAWHeader header,
bool  strict = false 
)
finalvirtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

◆ createDocument()

void FullWrtParser::createDocument ( librevenge::RVNGTextInterface *  documentInterface)
protected

creates the listener which will be associated to the document

Referenced by parse().

◆ createFileZones()

bool FullWrtParser::createFileZones ( )
protected

create the file zone ( first step of create zones)

Referenced by createZones().

◆ createZones()

bool FullWrtParser::createZones ( )
protected

finds the different objects zones

Referenced by parse().

◆ getBorder()

bool FullWrtParser::getBorder ( int  bId,
FullWrtStruct::Border border 
) const
protected

try to return a border corresponding to an id

Referenced by FullWrtText::send(), and FullWrtText::sendTable().

◆ getDocumentTypeName()

std::string FullWrtParser::getDocumentTypeName ( int  zId) const
protected

returns a the type of a document zone ( mainly used for debugging)

Referenced by FullWrtGraph::readGraphicData().

◆ getNumDocZoneStruct()

int FullWrtParser::getNumDocZoneStruct ( ) const
protected

returns the number of zone struct

Referenced by FullWrtText::readItem().

◆ getPageLeftTop()

MWAWVec2f FullWrtParser::getPageLeftTop ( ) const
protected

returns the page left top point ( in inches)

Referenced by FullWrtGraph::sendSideBar().

◆ init()

void FullWrtParser::init ( )
protected

inits all internal variables

Referenced by FullWrtParser().

◆ newPage()

void FullWrtParser::newPage ( int  number)
protected

adds a new page

Referenced by FullWrtText::send(), and FullWrtText::sendMainText().

◆ parse()

void FullWrtParser::parse ( librevenge::RVNGTextInterface *  documentInterface)
finalvirtual

virtual function used to parse the input

Implements MWAWTextParser.

◆ readCitationDocInfo()

bool FullWrtParser::readCitationDocInfo ( FullWrtStruct::EntryPtr  zone)
protected

try to read the list of citation (at the end of doc info)

Referenced by readEndDocInfo().

◆ readDocInfo()

bool FullWrtParser::readDocInfo ( FullWrtStruct::EntryPtr  zone)
protected

try to read zone2, a zone which stores the document information zone, ...

Referenced by createZones().

◆ readDocPosition()

bool FullWrtParser::readDocPosition ( )
protected

find the last position of the document and read data

Referenced by checkHeader().

◆ readDocZoneData()

bool FullWrtParser::readDocZoneData ( FullWrtStruct::EntryPtr  zone)
protected

try to read the zone containing the data of each doc zone (ie. Zone0)

Referenced by createZones().

◆ readDocZoneStruct()

bool FullWrtParser::readDocZoneStruct ( FullWrtStruct::EntryPtr  zone)
protected

try to read the zone which stores the structure of zone0, ... (ie. Zone1)

Referenced by createZones().

◆ readEndDocInfo()

bool FullWrtParser::readEndDocInfo ( FullWrtStruct::EntryPtr  zone)
protected

try to read the end of zone2 (only v2) ?

Referenced by readDocInfo().

◆ readFileZoneFlags()

bool FullWrtParser::readFileZoneFlags ( FullWrtStruct::EntryPtr  zone)
protected

try to read the file zones main flags

-1: generic, -2: null, other fId

Referenced by createFileZones().

◆ readFileZonePos()

bool FullWrtParser::readFileZonePos ( FullWrtStruct::EntryPtr  zone)
protected

try to read the file zones position

Referenced by createFileZones().

◆ readGenericDocData()

bool FullWrtParser::readGenericDocData ( FullWrtStruct::EntryPtr  zone,
FullWrtStruct::ZoneHeader doc 
)
protected

try to read the data of a zone which begins with a generic header

Referenced by readDocZoneData().

◆ readPrintInfo()

bool FullWrtParser::readPrintInfo ( FullWrtStruct::EntryPtr  zone)
protected

try read the print info zone

Referenced by readDocInfo().

◆ readReferenceData()

bool FullWrtParser::readReferenceData ( FullWrtStruct::EntryPtr  zone)
protected

try to read the reference data

Referenced by readDocZoneData().

◆ send()

bool FullWrtParser::send ( int  fileId,
MWAWColor  fontColor = MWAWColor::black() 
)
protected

ask the text parser to send a zone

Referenced by FullWrtGraph::send().

◆ sendGraphic()

void FullWrtParser::sendGraphic ( int  docId)
protected

try to send a graphic

Referenced by FullWrtText::send(), and sendVariable().

◆ sendReference()

void FullWrtParser::sendReference ( int  docId)
protected

try to send a reference, in pratice do nothing

Referenced by FullWrtText::send().

◆ sendText()

void FullWrtParser::sendText ( int  docId,
libmwaw::SubDocumentType  type,
MWAWNote::Type  which = MWAWNote::FootNote 
)
protected

try to send a footnote/endnote entry

Referenced by FullWrtText::send().

◆ sendVariable()

void FullWrtParser::sendVariable ( int  docId)
protected

try to send a variable, in pratice do nothing

in this case, the content seems to be a textbox which contains the field display, but as in general this zone is not read correctly (ie. the field is not found ) and as sending textbox is not implemented, better to stop here...

Referenced by FullWrtText::send().

Friends And Related Function Documentation

◆ FullWrtGraph

friend class FullWrtGraph
friend

Referenced by init().

◆ FullWrtParserInternal::SubDocument

◆ FullWrtText

friend class FullWrtText
friend

Referenced by init().

Member Data Documentation

◆ m_graphParser

std::shared_ptr<FullWrtGraph> FullWrtParser::m_graphParser
protected

◆ m_state

◆ m_textParser

std::shared_ptr<FullWrtText> FullWrtParser::m_textParser
protected

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

Generated on Fri Sep 18 2020 18:14:52 for libmwaw by doxygen 1.8.20