the main class to read a MacDraw II file More...
#include <MacDrawProParser.hxx>
Public Member Functions | |
| MacDrawProParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
| constructor | |
| ~MacDrawProParser () 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 | |
Public Member Functions inherited from MWAWGraphicParser | |
| ~MWAWGraphicParser () override | |
| destructor | |
Public Member Functions inherited from MWAWParser | |
| virtual | ~MWAWParser () |
| virtual destructor | |
| 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 | 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 | sendMeasure (MWAWEntry const &entry) |
| tries to send a line measure to the listener | |
| void | flushExtra () |
| sends the data which have not yet been sent to the listener | |
Protected Member Functions inherited from MWAWGraphicParser | |
| MWAWGraphicParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
| constructor (protected) | |
| MWAWGraphicParser (MWAWParserStatePtr const &state) | |
| constructor using a state | |
Protected Member Functions inherited from MWAWParser | |
| 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 | |
Protected Attributes | |
| std::shared_ptr< MacDrawProParserInternal::State > | m_state |
| the state | |
| std::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 const & | input, |
| MWAWRSRCParserPtr const & | rsrcParser, | ||
| MWAWHeader * | header ) |
constructor
|
final |
destructor
|
finalvirtual |
checks if the document header is correct (or not)
Implements MWAWParser.
Referenced by MacDrawProParserInternal::SubDocument, and parse().
|
protected |
computes the layers and libraries bounding box
Referenced by createZones(), and MacDrawProParserInternal::SubDocument.
|
protected |
creates the listener which will be associated to the document
Referenced by MacDrawProParserInternal::SubDocument, and parse().
|
protected |
finds the different objects zones
Referenced by MacDrawProParserInternal::SubDocument, and parse().
|
protected |
finds the objet's data/text positions
Referenced by createZones(), and MacDrawProParserInternal::SubDocument.
|
protected |
sends the data which have not yet been sent to the listener
Referenced by MacDrawProParserInternal::SubDocument, and parse().
|
protected |
inits all internal variables
Referenced by MacDrawProParser(), and MacDrawProParserInternal::SubDocument.
|
finalvirtual |
virtual function used to parse the input
Implements MWAWGraphicParser.
Referenced by MacDrawProParserInternal::SubDocument.
|
protected |
tries to read a bitmap data
Referenced by MacDrawProParserInternal::SubDocument, and readObjectData().
|
protected |
tries to read a basic geometric object data ( line, rect, arc,... )
Referenced by MacDrawProParserInternal::SubDocument, and readObjectData().
|
protected |
tries to the header info zone ( print info + some information about content + prefs ?)
Referenced by checkHeader(), createZones(), and MacDrawProParserInternal::SubDocument.
|
protected |
tries to the layer library correspondance zone
Referenced by createZones(), and MacDrawProParserInternal::SubDocument.
|
protected |
tries to the layer info zone
Referenced by createZones(), and MacDrawProParserInternal::SubDocument.
|
protected |
tries to read the library name info zone
Referenced by createZones(), and MacDrawProParserInternal::SubDocument.
|
protected |
tries to read an object and returns the object id (-1 if error )
Referenced by createZones(), MacDrawProParserInternal::SubDocument, and readObject().
|
protected |
tries to read an object data
Referenced by MacDrawProParserInternal::SubDocument, and readObject().
|
protected |
tries to read the print info zone
Referenced by MacDrawProParserInternal::SubDocument, and readHeaderInfo().
|
protected |
tries to read the rotation
Referenced by MacDrawProParserInternal::SubDocument, readBitmap(), readGeometryShapeData(), readObjectData(), readTextII(), and readTextPro().
|
protected |
tries to read a structured zone header
Referenced by findObjectPositions(), MacDrawProParserInternal::SubDocument, and readLayerLibraryCorrespondance().
|
protected |
tries to read a text object data in MacDraw II file
Referenced by MacDrawProParserInternal::SubDocument, and readObjectData().
|
protected |
tries to read a text object data in MacDraw pro file
Referenced by MacDrawProParserInternal::SubDocument, and readObjectData().
|
protected |
tries to send a layer
|
protected |
tries to send a library (not functionnal)
Referenced by flushExtra(), MacDrawProParserInternal::SubDocument, send(), send(), send(), sendMasterPage(), and sendPage().
|
protected |
tries to send a shape
|
protected |
tries to send a bitmap to the listener
Referenced by MacDrawProParserInternal::SubDocument, and send().
|
protected |
tries to create a master page if needed
Referenced by MacDrawProParserInternal::SubDocument, and parse().
|
protected |
tries to send a line measure to the listener
Referenced by MacDrawProParserInternal::SubDocument.
|
protected |
tries to send the layer corresponding a page
Referenced by MacDrawProParserInternal::SubDocument, and parse().
|
protected |
tries to send a text zone to the listener
Referenced by MacDrawProParserInternal::SubDocument.
|
protected |
tries to update the basic geometric data
Referenced by MacDrawProParserInternal::SubDocument, and readObject().
|
friend |
|
friend |
Referenced by checkHeader(), init(), and MacDrawProStyleManager.
|
protected |
the state
Referenced by checkHeader(), computeLayersAndLibrariesBoundingBox(), createDocument(), createZones(), findObjectPositions(), flushExtra(), init(), MacDrawProParser(), parse(), readHeaderInfo(), readLayerLibraryCorrespondance(), readLayersInfo(), readLibrariesInfo(), readObject(), readObjectData(), send(), send(), send(), sendMasterPage(), sendPage(), and sendText().
|
protected |
the style manager state
Referenced by checkHeader(), createZones(), init(), MacDrawProParser(), readHeaderInfo(), readObject(), and sendText().