the main class to read a GreatWorks text file More...
#include <GWParser.hxx>
Public Types | |
enum | DocType { DRAW, TEXT, UNKNOWN } |
an enum used to defined the document type More... | |
Public Member Functions | |
GWParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor More... | |
virtual | ~GWParser () |
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 | newPage (int number) |
adds a new page More... | |
MWAWSection | getMainSection () const |
return the main section More... | |
bool | sendHF (int id) |
try to send the i^th header/footer More... | |
bool | canSendTextBoxAsGraphic (MWAWEntry const &entry) |
check if a textbox can be send in a graphic zone, ie. does not contains any graphic More... | |
bool | sendTextbox (MWAWEntry const &entry, bool inGraphic) |
try to textbox's text More... | |
bool | sendPicture (MWAWEntry const &entry, MWAWPosition pos) |
try to send a picture More... | |
DocType | getDocumentType () const |
bool | createZones () |
finds the different objects zones More... | |
bool | createDrawZones () |
finds the different objects zones ( for a draw file) More... | |
bool | readRSRCZones () |
read the resource fork zone More... | |
bool | readPrintInfo (MWAWEntry const &entry) |
read a PrintInfo block ( PRNT resource block ) More... | |
bool | readWPSN (MWAWEntry const &entry) |
read the windows positions ( WPSN resource block ) More... | |
bool | readDocInfo () |
read the DocInfo block ( many unknown data ) More... | |
bool | readARRs (MWAWEntry const &entry) |
read a unknown zone ( ARRs resource block: v2 ) More... | |
bool | readDaHS (MWAWEntry const &entry) |
read a unknown zone ( DaHS resource block: v2 ) More... | |
bool | readGrDS (MWAWEntry const &entry) |
read a unknown zone ( GrDS resource block: v2 ) More... | |
bool | readNxEd (MWAWEntry const &entry) |
read a unknown zone ( NxED resource block: v2 ) 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 < GWParserInternal::State > | m_state |
the state More... | |
shared_ptr< GWGraph > | m_graphParser |
the graph parser More... | |
shared_ptr< GWText > | m_textParser |
the text parser More... | |
Friends | |
class | GWParserInternal::SubDocument |
class | GWGraph |
class | GWText |
the main class to read a GreatWorks text file
enum GWParser::DocType |
GWParser::GWParser | ( | MWAWInputStreamPtr | input, |
MWAWRSRCParserPtr | rsrcParser, | ||
MWAWHeader * | header | ||
) |
constructor
|
virtual |
destructor
|
protected |
check if a textbox can be send in a graphic zone, ie. does not contains any graphic
Referenced by GWGraph::canCreateGraphic(), GWGraph::sendGroupChild(), and GWGraph::sendTextbox().
|
virtual |
|
protected |
creates the listener which will be associated to the document
Referenced by parse().
|
protected |
finds the different objects zones ( for a draw file)
Referenced by createZones().
|
protected |
finds the different objects zones
Referenced by parse().
|
protected |
|
protected |
return the main section
Referenced by GWText::sendZone().
|
protected |
returns the page left top point ( in inches)
Referenced by GWGraph::sendFrame().
|
protected |
inits all internal variables
Referenced by GWParser().
|
protected |
adds a new page
Referenced by GWText::sendZone().
|
virtual |
virtual function used to parse the input
Implements MWAWParser.
|
protected |
read a unknown zone ( ARRs resource block: v2 )
Referenced by readRSRCZones().
|
protected |
read a unknown zone ( DaHS resource block: v2 )
Referenced by readRSRCZones().
|
protected |
read the DocInfo block ( many unknown data )
Referenced by createZones().
|
protected |
read a unknown zone ( GrDS resource block: v2 )
Referenced by readRSRCZones().
|
protected |
read a unknown zone ( NxED resource block: v2 )
Referenced by readRSRCZones().
|
protected |
read a PrintInfo block ( PRNT resource block )
Referenced by readRSRCZones().
|
protected |
read the resource fork zone
Referenced by createZones().
|
protected |
read the windows positions ( WPSN resource block )
Referenced by readRSRCZones().
|
protected |
a DebugFile used to write what we recognize when we parse the document in rsrc
Referenced by readARRs(), readDaHS(), readGrDS(), readNxEd(), GWGraph::readPalettes(), GWGraph::readPatterns(), readPrintInfo(), and readWPSN().
|
protected |
return the input input
Referenced by readARRs(), readDaHS(), readGrDS(), readNxEd(), GWGraph::readPalettes(), GWGraph::readPatterns(), readPrintInfo(), and readWPSN().
|
protected |
try to send the i^th header/footer
|
protected |
try to send a picture
Referenced by GWText::sendZone().
|
protected |
try to textbox's text
Referenced by GWGraph::sendTextbox().
|
friend |
|
protected |
the graph parser
Referenced by createDocument(), createDrawZones(), createZones(), init(), parse(), readRSRCZones(), and sendPicture().
|
protected |
the state
Referenced by checkHeader(), createDocument(), createZones(), getDocumentType(), getMainSection(), getPageLeftTop(), init(), newPage(), and readDocInfo().
|
protected |
the text parser
Referenced by canSendTextBoxAsGraphic(), checkHeader(), createDocument(), createDrawZones(), createZones(), init(), parse(), sendHF(), and sendTextbox().