the main class to read a MacDraw II file More...
#include <MacDrawProParser.hxx>
Public Member Functions | |
| MacDrawProParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
| constructor | |
| virtual | ~MacDrawProParser () |
| destructor | |
| bool | checkHeader (MWAWHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
| void | parse (librevenge::RVNGDrawingInterface *documentInterface) |
| virtual function used to parse the input | |
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 | readPrintInfo () |
| tries to read the print info zone | |
| bool | readHeaderInfo () |
| tries to the header info zone ( print info + some information about content + prefs ?) | |
| bool | readLayersInfo () |
| tries to the layer info zone | |
| bool | readLayerLibraryCorrespondance () |
| tries to the layer library correspondance zone | |
| bool | readLibrariesInfo () |
| tries to read the library name info zone | |
| bool | findObjectPositions (bool dataZone) |
| finds the objet's data/text positions | |
| bool | computeLayersAndLibrariesBoundingBox () |
| computes the layers and libraries bounding box | |
| bool | readStructuredHeaderZone (MWAWEntry const &entry, std::map< int, long > &idToDeltaPosMap) |
| tries to read a structured zone header | |
| int | readObject () |
| tries to read an object and returns the object id (-1 if error ) | |
| bool | readObjectData (MacDrawProParserInternal::Shape &shape, int zId) |
| tries to read an object data | |
| bool | readRotationInObjectData (MacDrawProParserInternal::Shape &shape, long endPos, std::string &extra) |
| tries to read the rotation | |
| bool | updateGeometryShape (MacDrawProParserInternal::Shape &shape, float cornerWidth) |
| tries to update the basic geometric data | |
| bool | readBitmap (MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry) |
| tries to read a bitmap data | |
| bool | readTextII (MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry) |
| tries to read a text object data in MacDraw II file | |
| bool | readTextPro (MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry) |
| tries to read a text object data in MacDraw pro file | |
| bool | readGeometryShapeData (MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry) |
| tries to read a basic geometric object data ( line, rect, arc,... ) | |
| bool | sendMasterPage () |
| tries to create a master page if needed | |
| bool | sendPage (int page) |
| tries to send the layer corresponding a page | |
| bool | send (MacDrawProParserInternal::Library const &library) |
| tries to send a library (not functionnal) | |
| bool | send (MacDrawProParserInternal::Layer const &layer) |
| tries to send a layer | |
| bool | send (MacDrawProParserInternal::Shape const &shape, MWAWVec2f const &orig) |
| tries to send a shape | |
| bool | sendBitmap (MacDrawProParserInternal::Shape const &shape, MWAWPosition const &pos) |
| tries to send a bitmap to the listener | |
| bool | sendText (int zoneId) |
| tries to send a text zone to the listener | |
| bool | sendLabel (MWAWEntry const &entry) |
| tries to send a line label to the listener | |
| void | flushExtra () |
| sends the data which have not yet been sent to the listener | |
Protected Attributes | |
| shared_ptr < MacDrawProParserInternal::State > | m_state |
| the state | |
| shared_ptr < MacDrawProStyleManager > | m_styleManager |
| the style manager state | |
Friends | |
| class | MacDrawProStyleManager |
| class | MacDrawProParserInternal::SubDocument |
the main class to read a MacDraw II file
| MacDrawProParser::MacDrawProParser | ( | MWAWInputStreamPtr | input, |
| MWAWRSRCParserPtr | rsrcParser, | ||
| MWAWHeader * | header | ||
| ) |
constructor
| MacDrawProParser::~MacDrawProParser | ( | ) | [virtual] |
destructor
| bool MacDrawProParser::checkHeader | ( | MWAWHeader * | header, |
| bool | strict = false |
||
| ) | [virtual] |
| bool MacDrawProParser::computeLayersAndLibrariesBoundingBox | ( | ) | [protected] |
computes the layers and libraries bounding box
Referenced by createZones().
| void MacDrawProParser::createDocument | ( | librevenge::RVNGDrawingInterface * | documentInterface | ) | [protected] |
creates the listener which will be associated to the document
Referenced by parse().
| bool MacDrawProParser::createZones | ( | ) | [protected] |
finds the different objects zones
Referenced by parse().
| bool MacDrawProParser::findObjectPositions | ( | bool | dataZone | ) | [protected] |
finds the objet's data/text positions
Referenced by createZones().
| void MacDrawProParser::flushExtra | ( | ) | [protected] |
sends the data which have not yet been sent to the listener
Referenced by parse().
| void MacDrawProParser::init | ( | ) | [protected] |
inits all internal variables
Referenced by MacDrawProParser().
| void MacDrawProParser::parse | ( | librevenge::RVNGDrawingInterface * | documentInterface | ) | [virtual] |
virtual function used to parse the input
Implements MWAWGraphicParser.
| bool MacDrawProParser::readBitmap | ( | MacDrawProParserInternal::Shape & | shape, |
| MWAWEntry const & | entry | ||
| ) | [protected] |
tries to read a bitmap data
Referenced by readObjectData().
| bool MacDrawProParser::readGeometryShapeData | ( | MacDrawProParserInternal::Shape & | shape, |
| MWAWEntry const & | entry | ||
| ) | [protected] |
tries to read a basic geometric object data ( line, rect, arc,... )
Referenced by readObjectData().
| bool MacDrawProParser::readHeaderInfo | ( | ) | [protected] |
tries to the header info zone ( print info + some information about content + prefs ?)
Referenced by checkHeader(), and createZones().
| bool MacDrawProParser::readLayerLibraryCorrespondance | ( | ) | [protected] |
tries to the layer library correspondance zone
Referenced by createZones().
| bool MacDrawProParser::readLayersInfo | ( | ) | [protected] |
tries to the layer info zone
Referenced by createZones().
| bool MacDrawProParser::readLibrariesInfo | ( | ) | [protected] |
tries to read the library name info zone
Referenced by createZones().
| int MacDrawProParser::readObject | ( | ) | [protected] |
tries to read an object and returns the object id (-1 if error )
Referenced by createZones().
| bool MacDrawProParser::readObjectData | ( | MacDrawProParserInternal::Shape & | shape, |
| int | zId | ||
| ) | [protected] |
tries to read an object data
Referenced by readObject().
| bool MacDrawProParser::readPrintInfo | ( | ) | [protected] |
tries to read the print info zone
Referenced by readHeaderInfo().
| bool MacDrawProParser::readRotationInObjectData | ( | MacDrawProParserInternal::Shape & | shape, |
| long | endPos, | ||
| std::string & | extra | ||
| ) | [protected] |
tries to read the rotation
Referenced by readBitmap(), readGeometryShapeData(), readObjectData(), readTextII(), and readTextPro().
| bool MacDrawProParser::readStructuredHeaderZone | ( | MWAWEntry const & | entry, |
| std::map< int, long > & | idToDeltaPosMap | ||
| ) | [protected] |
tries to read a structured zone header
Referenced by findObjectPositions(), and readLayerLibraryCorrespondance().
| bool MacDrawProParser::readTextII | ( | MacDrawProParserInternal::Shape & | shape, |
| MWAWEntry const & | entry | ||
| ) | [protected] |
tries to read a text object data in MacDraw II file
Referenced by readObjectData().
| bool MacDrawProParser::readTextPro | ( | MacDrawProParserInternal::Shape & | shape, |
| MWAWEntry const & | entry | ||
| ) | [protected] |
tries to read a text object data in MacDraw pro file
Referenced by readObjectData().
| bool MacDrawProParser::send | ( | MacDrawProParserInternal::Library const & | library | ) | [protected] |
tries to send a library (not functionnal)
Referenced by flushExtra(), send(), sendMasterPage(), and sendPage().
| bool MacDrawProParser::send | ( | MacDrawProParserInternal::Layer const & | layer | ) | [protected] |
tries to send a layer
| bool MacDrawProParser::send | ( | MacDrawProParserInternal::Shape const & | shape, |
| MWAWVec2f const & | orig | ||
| ) | [protected] |
tries to send a shape
| bool MacDrawProParser::sendBitmap | ( | MacDrawProParserInternal::Shape const & | shape, |
| MWAWPosition const & | pos | ||
| ) | [protected] |
tries to send a bitmap to the listener
Referenced by send().
| bool MacDrawProParser::sendLabel | ( | MWAWEntry const & | entry | ) | [protected] |
tries to send a line label to the listener
Referenced by MacDrawProParserInternal::SubDocument::parse().
| bool MacDrawProParser::sendMasterPage | ( | ) | [protected] |
tries to create a master page if needed
Referenced by parse().
| bool MacDrawProParser::sendPage | ( | int | page | ) | [protected] |
tries to send the layer corresponding a page
Referenced by parse().
| bool MacDrawProParser::sendText | ( | int | zoneId | ) | [protected] |
tries to send a text zone to the listener
Referenced by MacDrawProParserInternal::SubDocument::parse().
| bool MacDrawProParser::updateGeometryShape | ( | MacDrawProParserInternal::Shape & | shape, |
| float | cornerWidth | ||
| ) | [protected] |
tries to update the basic geometric data
Referenced by readObject().
friend class MacDrawProParserInternal::SubDocument [friend] |
friend class MacDrawProStyleManager [friend] |
Referenced by checkHeader(), and init().
shared_ptr<MacDrawProParserInternal::State> MacDrawProParser::m_state [protected] |
the state
Referenced by checkHeader(), computeLayersAndLibrariesBoundingBox(), createDocument(), createZones(), findObjectPositions(), flushExtra(), init(), parse(), readHeaderInfo(), readLayerLibraryCorrespondance(), readLayersInfo(), readLibrariesInfo(), readObject(), readObjectData(), send(), sendMasterPage(), sendPage(), and sendText().
shared_ptr<MacDrawProStyleManager> MacDrawProParser::m_styleManager [protected] |
the style manager state
Referenced by checkHeader(), createZones(), init(), readHeaderInfo(), readObject(), and sendText().