the main class to read a FreeHand v0,v1 file More...
#include <FreeHandParser.hxx>
Public Member Functions | |
FreeHandParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
constructor | |
~FreeHandParser () final | |
destructor | |
bool | checkHeader (MWAWHeader *header, bool strict=false) final |
checks if the document header is correct (or not) | |
void | parse (librevenge::RVNGDrawingInterface *documentInterface) final |
virtual function used to parse the input | |
![]() | |
~MWAWGraphicParser () override | |
destructor | |
virtual void | parse (librevenge::RVNGDrawingInterface *documentInterface)=0 |
virtual function used to parse the input | |
![]() | |
virtual | ~MWAWParser () |
virtual destructor | |
virtual bool | checkHeader (MWAWHeader *header, bool strict=false)=0 |
virtual function used to check if the document header is correct (or not) | |
int | version () const |
returns the works version | |
MWAWParserStatePtr | getParserState () |
returns the parser state | |
MWAWHeader * | getHeader () |
returns the header | |
MWAWInputStreamPtr & | getInput () |
returns the actual input | |
MWAWListenerPtr | getMainListener () |
returns the main listener | |
MWAWGraphicListenerPtr & | getGraphicListener () |
returns the graphic listener | |
MWAWPresentationListenerPtr & | getPresentationListener () |
returns the presentation listener | |
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener () |
returns the spreadsheet listener | |
MWAWTextListenerPtr & | getTextListener () |
returns the text listener | |
MWAWFontConverterPtr & | getFontConverter () |
returns the font converter | |
MWAWFontManagerPtr & | getFontManager () |
returns the font manager | |
MWAWPageSpan const & | getPageSpan () const |
returns the actual page dimension | |
MWAWPageSpan & | getPageSpan () |
returns the actual page dimension | |
double | getFormLength () const |
returns the form length | |
double | getFormWidth () const |
returns the form width | |
double | getPageLength () const |
returns the page length (form length without margin ) | |
double | getPageWidth () const |
returns the page width (form width without margin ) | |
MWAWRSRCParserPtr & | getRSRCParser () |
returns the rsrc parser | |
libmwaw::DebugFile & | ascii () |
a DebugFile used to write what we recognize when we parse the document | |
Protected Member Functions | |
void | init () |
inits all internal variables | |
void | createDocument (librevenge::RVNGDrawingInterface *documentInterface) |
creates the listener which will be associated to the document | |
bool | createZones () |
finds the different objects zones | |
bool | readZoneV1 (int zId) |
try to read a zone: version 1 | |
bool | readZoneV2 (int zId) |
try to read a zone: version 2 | |
bool | readScreenMode (FreeHandParserInternal::ScreenMode &screen) |
try to read a special scren mode | |
bool | readStyleHeader (FreeHandParserInternal::StyleHeader &style) |
try to read a style header | |
bool | readColor (int zId) |
try to read a color zone | |
bool | readDash (int zId) |
try to read the dash zone | |
bool | readFillStyle (int zId) |
try to read a fill zone | |
bool | readLineStyle (int zId) |
try to read a line style zone | |
bool | readPostscriptStyle (int zId) |
try to read a postscript zone | |
bool | readRootGroup (int zId) |
try to read the list of group | |
bool | readStyleGroup (int zId) |
try to read a style group zone | |
bool | readGroupV1 (int zId) |
try to read a group zone: version 1 | |
bool | readGroupV2 (int zId) |
try to read a group zone: version 2 | |
bool | readJoinGroup (int zId) |
try to read a join zone (used to put text around path) | |
bool | readTransformGroup (int zId) |
try to read a node which contain the group transformation | |
bool | readStringZone (int zId) |
try to read a label/font name zone | |
bool | readShapeHeader (FreeHandParserInternal::ShapeHeader &shape) |
try to read a shape header | |
bool | readDataZone (int zId) |
try to read a data zone | |
bool | readBackgroundPicture (int zId) |
try to read a background picture zone | |
bool | readPictureZone (int zId) |
try to read a picture node | |
bool | readShape (int zId) |
try to read a shape | |
bool | readTextboxV1 (int zId) |
try to read a textbox zone: version 1 | |
bool | readTextboxV2 (int zId) |
try to read a textbox zone: version 2 | |
bool | sendZone (int zId, MWAWTransformation const &transform) |
try to send a zone | |
bool | sendGroup (FreeHandParserInternal::Shape const &group, MWAWTransformation const &transform) |
try to send a group shape | |
bool | sendBackgroundPicture (FreeHandParserInternal::Shape const &picture, MWAWTransformation const &transform) |
try to send a background picture | |
bool | sendPicture (FreeHandParserInternal::Shape const &picture, MWAWTransformation const &transform) |
try to send a picture | |
bool | sendShape (FreeHandParserInternal::Shape const &shape, MWAWTransformation const &transform) |
try to send a basic shape | |
bool | sendTextbox (FreeHandParserInternal::Textbox const &textbox, MWAWTransformation const &transform) |
try to send a basic textbox | |
bool | sendText (int zId) |
try to send the text of a text box | |
bool | openLayer (int zId) |
try to open a layer | |
void | closeLayer () |
try to close a layer | |
void | flushExtra () |
sends the data which have not yet been sent to the listener | |
![]() | |
MWAWGraphicParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
constructor (protected) | |
MWAWGraphicParser (MWAWParserStatePtr const &state) | |
constructor using a state | |
![]() | |
MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
constructor (protected) | |
MWAWParser (MWAWParserStatePtr const &state) | |
constructor using a state | |
void | setVersion (int vers) |
sets the document's version | |
void | setGraphicListener (MWAWGraphicListenerPtr &listener) |
sets the graphic listener | |
void | resetGraphicListener () |
resets the listener | |
void | setPresentationListener (MWAWPresentationListenerPtr &listener) |
sets the presentation listener | |
void | resetPresentationListener () |
resets the listener | |
void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener) |
sets the spreadsheet listener | |
void | resetSpreadsheetListener () |
resets the listener | |
void | setTextListener (MWAWTextListenerPtr &listener) |
sets the text listener | |
void | resetTextListener () |
resets the listener | |
void | setAsciiName (char const *name) |
Debugging: change the default ascii file. | |
std::string const & | asciiName () const |
return the ascii file name | |
Static Protected Member Functions | |
static bool | decomposeMatrix (MWAWTransformation const &matrix, float &rotation, MWAWTransformation &transform, MWAWVec2f const ¢er) |
try to decompose the matrix in a rotation + scaling/translation matrix. | |
Protected Attributes | |
std::shared_ptr< FreeHandParserInternal::State > | m_state |
the state | |
Friends | |
class | FreeHandParserInternal::SubDocument |
the main class to read a FreeHand v0,v1 file
FreeHandParser::FreeHandParser | ( | MWAWInputStreamPtr const & | input, |
MWAWRSRCParserPtr const & | rsrcParser, | ||
MWAWHeader * | header | ||
) |
constructor
|
final |
destructor
|
finalvirtual |
|
protected |
try to close a layer
Referenced by sendGroup().
|
protected |
creates the listener which will be associated to the document
Referenced by parse().
|
protected |
finds the different objects zones
Referenced by parse().
|
staticprotected |
try to decompose the matrix in a rotation + scaling/translation matrix.
Note: because of the y-symetry this function is different from MWAWTransformation::decompose
Referenced by sendPicture(), and sendTextbox().
|
protected |
sends the data which have not yet been sent to the listener
Referenced by parse().
|
protected |
inits all internal variables
Referenced by FreeHandParser().
|
protected |
try to open a layer
Referenced by openLayer(), and sendGroup().
|
finalvirtual |
virtual function used to parse the input
Implements MWAWGraphicParser.
|
protected |
try to read a background picture zone
Referenced by readZoneV1().
|
protected |
try to read a color zone
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read the dash zone
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a data zone
Referenced by readZoneV2().
|
protected |
try to read a fill zone
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a group zone: version 1
Referenced by readZoneV1().
|
protected |
try to read a group zone: version 2
Referenced by readZoneV2().
|
protected |
try to read a join zone (used to put text around path)
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a line style zone
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a picture node
Referenced by readZoneV2().
|
protected |
try to read a postscript zone
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read the list of group
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a special scren mode
Referenced by readShapeHeader(), and readStyleHeader().
|
protected |
try to read a shape
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a shape header
Referenced by readBackgroundPicture(), readJoinGroup(), readPictureZone(), readShape(), readTextboxV1(), readTextboxV2(), and readTransformGroup().
|
protected |
try to read a label/font name zone
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a style group zone
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a style header
Referenced by readColor(), readDash(), readFillStyle(), readLineStyle(), and readPostscriptStyle().
|
protected |
try to read a textbox zone: version 1
Referenced by readZoneV1().
|
protected |
try to read a textbox zone: version 2
Referenced by readZoneV2().
|
protected |
try to read a node which contain the group transformation
Referenced by readZoneV1(), and readZoneV2().
|
protected |
try to read a zone: version 1
Referenced by createZones().
|
protected |
try to read a zone: version 2
Referenced by createZones().
|
protected |
try to send a background picture
Referenced by sendZone().
|
protected |
try to send a group shape
Referenced by sendZone().
|
protected |
try to send a picture
Referenced by sendZone().
|
protected |
try to send a basic shape
Referenced by sendZone().
|
protected |
try to send the text of a text box
|
protected |
try to send a basic textbox
Referenced by sendZone().
|
protected |
try to send a zone
Referenced by flushExtra(), parse(), and sendGroup().
|
friend |
|
protected |
the state
Referenced by checkHeader(), closeLayer(), createZones(), flushExtra(), init(), openLayer(), parse(), readBackgroundPicture(), readColor(), readDash(), readDataZone(), readFillStyle(), readGroupV1(), readGroupV2(), readJoinGroup(), readLineStyle(), readPictureZone(), readPostscriptStyle(), readRootGroup(), readShape(), readShapeHeader(), readStringZone(), readStyleGroup(), readStyleHeader(), readTextboxV1(), readTextboxV2(), readTransformGroup(), sendGroup(), sendPicture(), sendShape(), sendText(), and sendZone().