FreeHandParser Class Reference documentation

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
FreeHandParser Class Reference

the main class to read a FreeHand v0,v1 file More...

`#include <FreeHandParser.hxx>`

Inheritance diagram for FreeHandParser:

## Public Member Functions
| FreeHandParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
| constructor More...
virtual | ~FreeHandParser ()
| destructor More...
bool | checkHeader (MWAWHeader *header, bool strict=false)
| checks if the document header is correct (or not) More...
void | parse (librevenge::RVNGDrawingInterface *documentInterface)
| virtual function used to parse the input More...
Public Member Functions inherited from MWAWGraphicParser
virtual | ~MWAWGraphicParser ()
| 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...
MWAWHeader * | getHeader ()
| returns the header More...
MWAWInputStreamPtr & | getInput ()
| returns the actual input More...
MWAWListenerPtr | getMainListener ()
| returns the main listener More...
MWAWGraphicListenerPtr & | getGraphicListener ()
| returns the graphic listener More...
MWAWPresentationListenerPtr & | getPresentationListener ()
| returns the presentation listener More...
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener ()
| returns the spreadsheet listener More...
MWAWTextListenerPtr & | getTextListener ()
| returns the text listener More...
MWAWFontConverterPtr & | getFontConverter ()
| returns the font converter 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...
libmwaw::DebugFile & | ascii ()
| 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::RVNGDrawingInterface *documentInterface)
| creates the listener which will be associated to the document More...
bool | createZones ()
| finds the different objects zones More...
bool | readZoneV1 (int zId)
| try to read a zone: version 1 More...
bool | readZoneV2 (int zId)
| try to read a zone: version 2 More...
bool | readScreenMode (FreeHandParserInternal::ScreenMode &screen)
| try to read a special scren mode More...
bool | readStyleHeader (FreeHandParserInternal::StyleHeader &style)
| try to read a style header More...
bool | readColor (int zId)
| try to read a color zone More...
bool | readDash (int zId)
| try to read the dash zone More...
bool | readFillStyle (int zId)
| try to read a fill zone More...
bool | readLineStyle (int zId)
| try to read a line style zone More...
bool | readPostscriptStyle (int zId)
| try to read a postscript zone More...
bool | readRootGroup (int zId)
| try to read the list of group More...
bool | readStyleGroup (int zId)
| try to read a style group zone More...
bool | readGroupV1 (int zId)
| try to read a group zone: version 1 More...
bool | readGroupV2 (int zId)
| try to read a group zone: version 2 More...
bool | readJoinGroup (int zId)
| try to read a join zone (used to put text around path) More...
bool | readTransformGroup (int zId)
| try to read a node which contain the group transformation More...
bool | readStringZone (int zId)
| try to read a label/font name zone More...
bool | readShapeHeader (FreeHandParserInternal::ShapeHeader &shape)
| try to read a shape header More...
bool | readDataZone (int zId)
| try to read a data zone More...
bool | readBackgroundPicture (int zId)
| try to read a background picture zone More...
bool | readPictureZone (int zId)
| try to read a picture node More...
bool | readShape (int zId)
| try to read a shape More...
bool | readTextboxV1 (int zId)
| try to read a textbox zone: version 1 More...
bool | readTextboxV2 (int zId)
| try to read a textbox zone: version 2 More...
bool | sendZone (int zId, MWAWTransformation const &transform)
| try to send a zone More...
bool | sendGroup (FreeHandParserInternal::Shape const &group, MWAWTransformation const &transform)
| try to send a group shape More...
bool | sendBackgroundPicture (FreeHandParserInternal::Shape const &picture, MWAWTransformation const &transform)
| try to send a background picture More...
bool | sendPicture (FreeHandParserInternal::Shape const &picture, MWAWTransformation const &transform)
| try to send a picture More...
bool | sendShape (FreeHandParserInternal::Shape const &shape, MWAWTransformation const &transform)
| try to send a basic shape More...
bool | sendTextbox (FreeHandParserInternal::Textbox const &textbox, MWAWTransformation const &transform)
| try to send a basic textbox More...
bool | sendText (int zId)
| try to send the text of a text box More...
bool | openLayer (int zId)
| try to open a layer More...
void | closeLayer ()
| try to close a layer More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
Protected Member Functions inherited from MWAWGraphicParser
| MWAWGraphicParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
| constructor (protected) More...
| MWAWGraphicParser (MWAWParserStatePtr state)
| constructor using a state More...
Protected Member Functions inherited from MWAWParser
| MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
| constructor (protected) More...
| MWAWParser (MWAWParserStatePtr 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 | setFontConverter (MWAWFontConverterPtr fontConverter)
| sets the font convertor More...
void | setAsciiName (char const *name)
| Debugging: change the default ascii file. More...
std::string const & | asciiName () const
| return the ascii file name More...

## Static Protected Member Functions
static bool | decomposeMatrix (MWAWTransformation const &matrix, float &rotation, MWAWTransformation &transform, MWAWVec2f const &center)
| try to decompose the matrix in a rotation + scaling/translation matrix. More...

## Protected Attributes
shared_ptr< FreeHandParserInternal::State > | m_state
| the state More...

## Friends
class | FreeHandParserInternal::SubDocument

## Detailed Description

the main class to read a FreeHand v0,v1 file

## Constructor & Destructor Documentation

FreeHandParser::FreeHandParser | ( | MWAWInputStreamPtr | input,
|  | MWAWRSRCParserPtr | rsrcParser,
|  | MWAWHeader * | header
| ) |  |

constructor

FreeHandParser::~FreeHandParser | ( |  | ) |
| virtual

destructor

## Member Function Documentation

bool FreeHandParser::checkHeader | ( | MWAWHeader * | header,
|  | bool | strict = `false`
| ) |  |
| virtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

void FreeHandParser::closeLayer | ( |  | ) |
| protected

try to close a layer

Referenced by sendGroup().

void FreeHandParser::createDocument | ( | librevenge::RVNGDrawingInterface * | documentInterface | ) |
| protected

creates the listener which will be associated to the document

Referenced by parse().

bool FreeHandParser::createZones | ( |  | ) |
| protected

finds the different objects zones

Referenced by parse().

bool FreeHandParser::decomposeMatrix | ( | MWAWTransformation const & | matrix,
|  | float & | rotation,
|  | MWAWTransformation & | transform,
|  | MWAWVec2f const & | center
| ) |  |
| 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().

void FreeHandParser::flushExtra | ( |  | ) |
| protected

sends the data which have not yet been sent to the listener

Referenced by parse().

void FreeHandParser::init | ( |  | ) |
| protected

inits all internal variables

Referenced by FreeHandParser().

bool FreeHandParser::openLayer | ( | int | zId | ) |
| protected

try to open a layer

Referenced by sendGroup().

void FreeHandParser::parse | ( | librevenge::RVNGDrawingInterface * | documentInterface | ) |
| virtual

virtual function used to parse the input

Implements MWAWGraphicParser.

bool FreeHandParser::readBackgroundPicture | ( | int | zId | ) |
| protected

try to read a background picture zone

Referenced by readZoneV1().

bool FreeHandParser::readColor | ( | int | zId | ) |
| protected

try to read a color zone

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readDash | ( | int | zId | ) |
| protected

try to read the dash zone

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readDataZone | ( | int | zId | ) |
| protected

try to read a data zone

Referenced by readZoneV2().

bool FreeHandParser::readFillStyle | ( | int | zId | ) |
| protected

try to read a fill zone

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readGroupV1 | ( | int | zId | ) |
| protected

try to read a group zone: version 1

Referenced by readZoneV1().

bool FreeHandParser::readGroupV2 | ( | int | zId | ) |
| protected

try to read a group zone: version 2

Referenced by readZoneV2().

bool FreeHandParser::readJoinGroup | ( | int | zId | ) |
| protected

try to read a join zone (used to put text around path)

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readLineStyle | ( | int | zId | ) |
| protected

try to read a line style zone

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readPictureZone | ( | int | zId | ) |
| protected

try to read a picture node

Referenced by readZoneV2().

bool FreeHandParser::readPostscriptStyle | ( | int | zId | ) |
| protected

try to read a postscript zone

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readRootGroup | ( | int | zId | ) |
| protected

try to read the list of group

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readScreenMode | ( | FreeHandParserInternal::ScreenMode & | screen | ) |
| protected

try to read a special scren mode

Referenced by readShapeHeader(), and readStyleHeader().

bool FreeHandParser::readShape | ( | int | zId | ) |
| protected

try to read a shape

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readShapeHeader | ( | FreeHandParserInternal::ShapeHeader & | shape | ) |
| protected

try to read a shape header

Referenced by readBackgroundPicture(), readJoinGroup(), readPictureZone(), readShape(), readTextboxV1(), readTextboxV2(), and readTransformGroup().

bool FreeHandParser::readStringZone | ( | int | zId | ) |
| protected

try to read a label/font name zone

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readStyleGroup | ( | int | zId | ) |
| protected

try to read a style group zone

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readStyleHeader | ( | FreeHandParserInternal::StyleHeader & | style | ) |
| protected

try to read a style header

Referenced by readColor(), readDash(), readFillStyle(), readLineStyle(), and readPostscriptStyle().

bool FreeHandParser::readTextboxV1 | ( | int | zId | ) |
| protected

try to read a textbox zone: version 1

Referenced by readZoneV1().

bool FreeHandParser::readTextboxV2 | ( | int | zId | ) |
| protected

try to read a textbox zone: version 2

Referenced by readZoneV2().

bool FreeHandParser::readTransformGroup | ( | int | zId | ) |
| protected

try to read a node which contain the group transformation

Referenced by readZoneV1(), and readZoneV2().

bool FreeHandParser::readZoneV1 | ( | int | zId | ) |
| protected

try to read a zone: version 1

Referenced by createZones().

bool FreeHandParser::readZoneV2 | ( | int | zId | ) |
| protected

try to read a zone: version 2

Referenced by createZones().

bool FreeHandParser::sendBackgroundPicture | ( | FreeHandParserInternal::Shape const & | picture,
|  | MWAWTransformation const & | transform
| ) |  |
| protected

try to send a background picture

Referenced by sendZone().

bool FreeHandParser::sendGroup | ( | FreeHandParserInternal::Shape const & | group,
|  | MWAWTransformation const & | transform
| ) |  |
| protected

try to send a group shape

Referenced by sendZone().

bool FreeHandParser::sendPicture | ( | FreeHandParserInternal::Shape const & | picture,
|  | MWAWTransformation const & | transform
| ) |  |
| protected

try to send a picture

Referenced by sendZone().

bool FreeHandParser::sendShape | ( | FreeHandParserInternal::Shape const & | shape,
|  | MWAWTransformation const & | transform
| ) |  |
| protected

try to send a basic shape

Referenced by sendZone().

bool FreeHandParser::sendText | ( | int | zId | ) |
| protected

try to send the text of a text box

Referenced by FreeHandParserInternal::SubDocument::parse().

bool FreeHandParser::sendTextbox | ( | FreeHandParserInternal::Textbox const & | textbox,
|  | MWAWTransformation const & | transform
| ) |  |
| protected

try to send a basic textbox

Referenced by sendZone().

bool FreeHandParser::sendZone | ( | int | zId,
|  | MWAWTransformation const & | transform
| ) |  |
| protected

try to send a zone

Referenced by flushExtra(), parse(), and sendGroup().

## Friends And Related Function Documentation

friend class FreeHandParserInternal::SubDocument
| friend

## Member Data Documentation

shared_ptr<FreeHandParserInternal::State> FreeHandParser::m_state
| 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().

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

- FreeHandParser.hxx
- FreeHandParser.cxx