the main class to read a RagTime v5 file More...
#include <RagTime5Parser.hxx>
Public Member Functions | |
| RagTime5Parser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
| constructor | |
| virtual | ~RagTime5Parser () |
| destructor | |
| bool | checkHeader (MWAWHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
| void | parse (librevenge::RVNGTextInterface *documentInterface) |
| virtual function used to parse the input | |
Protected Member Functions | |
| void | init () |
| inits all internal variables | |
| shared_ptr < RagTime5ClusterManager > | getClusterManager () |
| returns the cluster manager | |
| shared_ptr< RagTime5StructManager > | getStructManager () |
| returns the structure manager | |
| bool | readChartCluster (RagTime5Zone &zone, int zoneType) |
| try to read a chart cluster (via the spreadsheet manager) | |
| bool | readGraphicCluster (RagTime5Zone &zone, int zoneType) |
| try to read a graphic cluster (via the graphic manager) | |
| bool | readPictureCluster (RagTime5Zone &zone, int zoneType) |
| try to read a picture cluster (via the graphic manager) | |
| bool | readSpreadsheetCluster (RagTime5Zone &zone, int zoneType) |
| try to read a spreadsheet cluster (via the spreadsheet manager) | |
| bool | readTextCluster (RagTime5Zone &zone, int zoneType) |
| try to read a text cluster (via the text manager) | |
| void | createDocument (librevenge::RVNGTextInterface *documentInterface) |
| creates the listener which will be associated to the document | |
| bool | sendZones () |
| try to send the different zones | |
| void | newPage (int number) |
| adds a new page | |
| bool | createZones () |
| finds the different objects zones | |
| bool | findDataZones (MWAWEntry const &entry) |
| try to create the main data zones list | |
| shared_ptr< RagTime5Zone > | getDataZone (int dataId) const |
| returns the zone corresponding to a data id (or 0) | |
| bool | update (RagTime5Zone &zone) |
| try to update a zone: create a new input if the zone is stored in different positions, ... | |
| bool | readZoneData (RagTime5Zone &zone) |
| try to read the zone data | |
| bool | unpackZone (RagTime5Zone &zone, MWAWEntry const &entry, std::vector< unsigned char > &data) |
| try to unpack a zone | |
| bool | unpackZone (RagTime5Zone &zone) |
| try to unpack a zone | |
| bool | readClusterZones () |
| try to read the different cluster zones | |
| bool | readClusterZone (RagTime5Zone &zone, int type=-1) |
| try to read a cluster zone | |
| bool | readClusterLinkList (RagTime5Zone &zone, RagTime5ClusterManager::Link const &link) |
| try to read a cluster link zone | |
| bool | readClusterLinkList (RagTime5ClusterManager::Link const &link, RagTime5ClusterManager::Link const &nameLink, std::vector< int > &list, std::string const &name="") |
| try to read a cluster list link zone | |
| bool | readString (RagTime5Zone &zone, std::string &string) |
| try to read a string zone ( zone with id1=21,id2=23:24) | |
| bool | readUnicodeString (RagTime5Zone &zone) |
| try to read a unicode string zone | |
| bool | readLongListWithSize (int dataId, int fSz, std::vector< long > &list, std::string const &zoneName="") |
| try to read a int/long zone data | |
| bool | readPositions (int posId, std::vector< long > &listPosition) |
| try to read a positions zone in data | |
| bool | readLongList (RagTime5ClusterManager::Link const &link, std::vector< long > &list) |
| try to read/get the list of long of a L_LongList | |
| bool | readUnicodeStringList (RagTime5ClusterManager::Link const &link, std::map< int, librevenge::RVNGString > &idToStringMap) |
| try to read a list of unicode string zone | |
| bool | readDocumentVersion (RagTime5Zone &zone) |
| try to read the document version zone | |
| bool | readClusterRootData (RagTime5ClusterManager::ClusterRoot &cluster) |
| try to read the main cluster | |
| bool | readFormats (RagTime5ClusterManager::Cluster &cluster) |
| try to read the list of format | |
| bool | readClusterFieldsData (RagTime5ClusterManager::Cluster &cluster) |
| try to read the field data | |
| bool | readClusterLayoutData (RagTime5ClusterManager::ClusterLayout &cluster) |
| try to read the layout cluster (type 4001) | |
| bool | readClusterPipelineData (RagTime5ClusterManager::Cluster &cluster) |
| try to read the pipeline cluster data | |
| bool | readDocInfoClusterData (RagTime5Zone &zone, MWAWEntry const &entry) |
| try to read the main doc info cluster data | |
| bool | readClusterScriptData (RagTime5ClusterManager::ClusterScript &cluster) |
| try to read the unknown clusterA data | |
| bool | readUnknownClusterBData (RagTime5ClusterManager::Cluster &cluster) |
| try to read the unknown clusterB data | |
| bool | readUnknownClusterCData (RagTime5ClusterManager::Cluster &cluster) |
| try to read the unknown clusterC data | |
| bool | readStructZone (RagTime5ClusterManager::Cluster &cluster, RagTime5StructManager::FieldParser &parser, int headerSz) |
| try to read a structured zone | |
| bool | readStructData (RagTime5Zone &zone, long endPos, int n, int headerSz, RagTime5StructManager::FieldParser &parser, librevenge::RVNGString const &dataName) |
| try to read a data in a structured zone | |
| bool | readStructMainZone (RagTime5Zone &zone) |
| try to read a main structured zone (unknown content) | |
| bool | readListZone (RagTime5ClusterManager::Link const &link) |
| try to read a list zone | |
| bool | readListZone (RagTime5ClusterManager::Link const &link, RagTime5StructManager::DataParser &parser) |
| try to read a list zone | |
| bool | readFixedSizeZone (RagTime5ClusterManager::Link const &link, std::string const &name) |
| try to read a fixed size zone | |
| bool | readFixedSizeZone (RagTime5ClusterManager::Link const &link, RagTime5StructManager::DataParser &parser) |
| try to read a fixed size zone | |
| bool | checkClusterList (std::vector< int > const &list) |
| check a cluster list | |
| void | flushExtra () |
| flush unsent zone (debugging function) | |
Protected Attributes | |
| shared_ptr < RagTime5ParserInternal::State > | m_state |
| the state | |
| shared_ptr< RagTime5Graph > | m_graphParser |
| the graph manager | |
| shared_ptr< RagTime5Spreadsheet > | m_spreadsheetParser |
| the spreadsheet manager | |
| shared_ptr< RagTime5Text > | m_textParser |
| the text manager | |
| shared_ptr< RagTime5StructManager > | m_structManager |
| the structure manager | |
| shared_ptr < RagTime5ClusterManager > | m_clusterManager |
| the cluster manager | |
Friends | |
| class | RagTime5Graph |
| class | RagTime5Spreadsheet |
| class | RagTime5Text |
| class | RagTime5ClusterManager |
| struct | RagTime5ParserInternal::DocInfoFieldParser |
| class | RagTime5ParserInternal::SubDocument |
the main class to read a RagTime v5 file
| RagTime5Parser::RagTime5Parser | ( | MWAWInputStreamPtr | input, |
| MWAWRSRCParserPtr | rsrcParser, | ||
| MWAWHeader * | header | ||
| ) |
constructor
| RagTime5Parser::~RagTime5Parser | ( | ) | [virtual] |
destructor
| bool RagTime5Parser::checkClusterList | ( | std::vector< int > const & | list | ) | [protected] |
check a cluster list
Referenced by RagTime5Spreadsheet::readChartCluster(), readClusterLayoutData(), readClusterScriptData(), readClusterZone(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readPictureCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), and RagTime5Text::readTextCluster().
| bool RagTime5Parser::checkHeader | ( | MWAWHeader * | header, |
| bool | strict = false |
||
| ) | [virtual] |
| void RagTime5Parser::createDocument | ( | librevenge::RVNGTextInterface * | documentInterface | ) | [protected] |
creates the listener which will be associated to the document
Referenced by parse().
| bool RagTime5Parser::createZones | ( | ) | [protected] |
finds the different objects zones
Referenced by parse().
| bool RagTime5Parser::findDataZones | ( | MWAWEntry const & | entry | ) | [protected] |
try to create the main data zones list
Referenced by createZones().
| void RagTime5Parser::flushExtra | ( | ) | [protected] |
flush unsent zone (debugging function)
| shared_ptr< RagTime5ClusterManager > RagTime5Parser::getClusterManager | ( | ) | [protected] |
returns the cluster manager
Referenced by RagTime5Spreadsheet::readChartCluster(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readPictureCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), and RagTime5Text::readTextCluster().
| shared_ptr< RagTime5Zone > RagTime5Parser::getDataZone | ( | int | dataId | ) | const [protected] |
returns the zone corresponding to a data id (or 0)
Referenced by checkClusterList(), createZones(), RagTime5ClusterManager::readClusterMainList(), readClusterRootData(), readClusterScriptData(), readClusterZones(), RagTime5Graph::readColorPatternZone(), RagTime5ClusterManager::readFieldClusters(), RagTime5Text::readFieldZones(), readFixedSizeZone(), readFormats(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readGraphicTransformations(), RagTime5Graph::readGraphicTypes(), RagTime5Graph::readGraphicUnknown(), RagTime5Text::readLinkZones(), readListZone(), readLongListWithSize(), RagTime5Graph::readPictureList(), RagTime5Spreadsheet::readSpreadsheetCluster(), readStructZone(), RagTime5Text::readTextCluster(), RagTime5Text::readTextUnknown0(), RagTime5Text::readTextUnknown1(), readUnknownClusterBData(), and RagTime5ClusterManager::readUnknownClusterC().
| shared_ptr< RagTime5StructManager > RagTime5Parser::getStructManager | ( | ) | [protected] |
returns the structure manager
| void RagTime5Parser::init | ( | ) | [protected] |
inits all internal variables
Referenced by RagTime5Parser().
| void RagTime5Parser::newPage | ( | int | number | ) | [protected] |
adds a new page
| void RagTime5Parser::parse | ( | librevenge::RVNGTextInterface * | documentInterface | ) | [virtual] |
virtual function used to parse the input
Implements MWAWTextParser.
| bool RagTime5Parser::readChartCluster | ( | RagTime5Zone & | zone, |
| int | zoneType | ||
| ) | [protected] |
try to read a chart cluster (via the spreadsheet manager)
Referenced by RagTime5ClusterManager::readCluster().
| bool RagTime5Parser::readClusterFieldsData | ( | RagTime5ClusterManager::Cluster & | cluster | ) | [protected] |
try to read the field data
Referenced by readClusterZone().
| bool RagTime5Parser::readClusterLayoutData | ( | RagTime5ClusterManager::ClusterLayout & | cluster | ) | [protected] |
try to read the layout cluster (type 4001)
Referenced by readClusterZone().
| bool RagTime5Parser::readClusterLinkList | ( | RagTime5Zone & | zone, |
| RagTime5ClusterManager::Link const & | link | ||
| ) | [protected] |
try to read a cluster link zone
Referenced by readClusterRootData(), readClusterScriptData(), RagTime5Graph::readGraphicCluster(), and RagTime5Spreadsheet::readSpreadsheetCluster().
| bool RagTime5Parser::readClusterLinkList | ( | RagTime5ClusterManager::Link const & | link, |
| RagTime5ClusterManager::Link const & | nameLink, | ||
| std::vector< int > & | list, | ||
| std::string const & | name = "" |
||
| ) | [protected] |
try to read a cluster list link zone
| bool RagTime5Parser::readClusterPipelineData | ( | RagTime5ClusterManager::Cluster & | cluster | ) | [protected] |
try to read the pipeline cluster data
Referenced by readClusterZone().
| bool RagTime5Parser::readClusterRootData | ( | RagTime5ClusterManager::ClusterRoot & | cluster | ) | [protected] |
| bool RagTime5Parser::readClusterScriptData | ( | RagTime5ClusterManager::ClusterScript & | cluster | ) | [protected] |
try to read the unknown clusterA data
Referenced by readClusterZone().
| bool RagTime5Parser::readClusterZone | ( | RagTime5Zone & | zone, |
| int | type = -1 |
||
| ) | [protected] |
try to read a cluster zone
Referenced by readClusterRootData(), readClusterZones(), RagTime5ClusterManager::readFieldClusters(), and RagTime5ClusterManager::readUnknownClusterC().
| bool RagTime5Parser::readClusterZones | ( | ) | [protected] |
try to read the different cluster zones
Referenced by createZones().
| bool RagTime5Parser::readDocInfoClusterData | ( | RagTime5Zone & | zone, |
| MWAWEntry const & | entry | ||
| ) | [protected] |
try to read the main doc info cluster data
Referenced by RagTime5ParserInternal::DocInfoFieldParser::parseField().
| bool RagTime5Parser::readDocumentVersion | ( | RagTime5Zone & | zone | ) | [protected] |
try to read the document version zone
Referenced by readZoneData().
| bool RagTime5Parser::readFixedSizeZone | ( | RagTime5ClusterManager::Link const & | link, |
| std::string const & | name | ||
| ) | [protected] |
try to read a fixed size zone
Referenced by RagTime5Spreadsheet::readChartCluster(), readClusterFieldsData(), readClusterLayoutData(), readClusterPipelineData(), readClusterRootData(), readClusterScriptData(), readClusterZone(), readFormats(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readPictureCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), RagTime5Text::readTextCluster(), readUnknownClusterBData(), and readUnknownClusterCData().
| bool RagTime5Parser::readFixedSizeZone | ( | RagTime5ClusterManager::Link const & | link, |
| RagTime5StructManager::DataParser & | parser | ||
| ) | [protected] |
try to read a fixed size zone
| bool RagTime5Parser::readFormats | ( | RagTime5ClusterManager::Cluster & | cluster | ) | [protected] |
try to read the list of format
Referenced by readClusterZone().
| bool RagTime5Parser::readGraphicCluster | ( | RagTime5Zone & | zone, |
| int | zoneType | ||
| ) | [protected] |
try to read a graphic cluster (via the graphic manager)
Referenced by RagTime5ClusterManager::readCluster().
| bool RagTime5Parser::readListZone | ( | RagTime5ClusterManager::Link const & | link | ) | [protected] |
try to read a list zone
Referenced by RagTime5Spreadsheet::readChartCluster(), readClusterLayoutData(), readClusterRootData(), readClusterScriptData(), readClusterZone(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readPictureCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), RagTime5Text::readTextCluster(), readUnicodeStringList(), and readUnknownClusterCData().
| bool RagTime5Parser::readListZone | ( | RagTime5ClusterManager::Link const & | link, |
| RagTime5StructManager::DataParser & | parser | ||
| ) | [protected] |
try to read a list zone
| bool RagTime5Parser::readLongList | ( | RagTime5ClusterManager::Link const & | link, |
| std::vector< long > & | list | ||
| ) | [protected] |
try to read/get the list of long of a L_LongList
Referenced by RagTime5ClusterManager::readClusterMainList(), readClusterRootData(), and RagTime5Graph::readGraphicCluster().
| bool RagTime5Parser::readLongListWithSize | ( | int | dataId, |
| int | fSz, | ||
| std::vector< long > & | list, | ||
| std::string const & | zoneName = "" |
||
| ) | [protected] |
try to read a int/long zone data
Referenced by readLongList(), and readPositions().
| bool RagTime5Parser::readPictureCluster | ( | RagTime5Zone & | zone, |
| int | zoneType | ||
| ) | [protected] |
try to read a picture cluster (via the graphic manager)
Referenced by RagTime5ClusterManager::readCluster().
| bool RagTime5Parser::readPositions | ( | int | posId, |
| std::vector< long > & | listPosition | ||
| ) | [protected] |
try to read a positions zone in data
Referenced by RagTime5Text::readFieldZones(), readFormats(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readGraphicTypes(), RagTime5Text::readLinkZones(), readListZone(), and readStructZone().
| bool RagTime5Parser::readSpreadsheetCluster | ( | RagTime5Zone & | zone, |
| int | zoneType | ||
| ) | [protected] |
try to read a spreadsheet cluster (via the spreadsheet manager)
Referenced by RagTime5ClusterManager::readCluster().
| bool RagTime5Parser::readString | ( | RagTime5Zone & | zone, |
| std::string & | string | ||
| ) | [protected] |
try to read a string zone ( zone with id1=21,id2=23:24)
Referenced by createZones(), and readZoneData().
| bool RagTime5Parser::readStructData | ( | RagTime5Zone & | zone, |
| long | endPos, | ||
| int | n, | ||
| int | headerSz, | ||
| RagTime5StructManager::FieldParser & | parser, | ||
| librevenge::RVNGString const & | dataName | ||
| ) | [protected] |
try to read a data in a structured zone
Referenced by readStructZone().
| bool RagTime5Parser::readStructMainZone | ( | RagTime5Zone & | zone | ) | [protected] |
try to read a main structured zone (unknown content)
Referenced by readZoneData().
| bool RagTime5Parser::readStructZone | ( | RagTime5ClusterManager::Cluster & | cluster, |
| RagTime5StructManager::FieldParser & | parser, | ||
| int | headerSz | ||
| ) | [protected] |
try to read a structured zone
Referenced by RagTime5Spreadsheet::readChartCluster(), readClusterLayoutData(), readClusterRootData(), readClusterZone(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readGraphicColors(), RagTime5Graph::readGraphicStyles(), RagTime5Text::readTextStyles(), and readUnknownClusterBData().
| bool RagTime5Parser::readTextCluster | ( | RagTime5Zone & | zone, |
| int | zoneType | ||
| ) | [protected] |
try to read a text cluster (via the text manager)
Referenced by RagTime5ClusterManager::readCluster().
| bool RagTime5Parser::readUnicodeString | ( | RagTime5Zone & | zone | ) | [protected] |
try to read a unicode string zone
Referenced by readClusterScriptData(), RagTime5Text::readTextCluster(), and readZoneData().
| bool RagTime5Parser::readUnicodeStringList | ( | RagTime5ClusterManager::Link const & | link, |
| std::map< int, librevenge::RVNGString > & | idToStringMap | ||
| ) | [protected] |
try to read a list of unicode string zone
Referenced by RagTime5Spreadsheet::readChartCluster(), readClusterLayoutData(), RagTime5ClusterManager::readClusterMainList(), readClusterZone(), readFormats(), RagTime5Graph::readGraphicCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), and readStructZone().
| bool RagTime5Parser::readUnknownClusterBData | ( | RagTime5ClusterManager::Cluster & | cluster | ) | [protected] |
try to read the unknown clusterB data
Referenced by readClusterZone().
| bool RagTime5Parser::readUnknownClusterCData | ( | RagTime5ClusterManager::Cluster & | cluster | ) | [protected] |
try to read the unknown clusterC data
Referenced by readClusterZone().
| bool RagTime5Parser::readZoneData | ( | RagTime5Zone & | zone | ) | [protected] |
try to read the zone data
Referenced by createZones().
| bool RagTime5Parser::sendZones | ( | ) | [protected] |
try to send the different zones
| bool RagTime5Parser::unpackZone | ( | RagTime5Zone & | zone, |
| MWAWEntry const & | entry, | ||
| std::vector< unsigned char > & | data | ||
| ) | [protected] |
try to unpack a zone
Referenced by createZones(), and unpackZone().
| bool RagTime5Parser::unpackZone | ( | RagTime5Zone & | zone | ) | [protected] |
try to unpack a zone
| bool RagTime5Parser::update | ( | RagTime5Zone & | zone | ) | [protected] |
try to update a zone: create a new input if the zone is stored in different positions, ...
Referenced by createZones().
friend class RagTime5ClusterManager [friend] |
Referenced by init().
friend class RagTime5Graph [friend] |
Referenced by init().
friend struct RagTime5ParserInternal::DocInfoFieldParser [friend] |
friend class RagTime5ParserInternal::SubDocument [friend] |
friend class RagTime5Spreadsheet [friend] |
Referenced by init().
friend class RagTime5Text [friend] |
Referenced by init().
shared_ptr<RagTime5ClusterManager> RagTime5Parser::m_clusterManager [protected] |
the cluster manager
Referenced by getClusterManager(), init(), readClusterLayoutData(), readClusterLinkList(), readClusterRootData(), and readClusterZone().
shared_ptr<RagTime5Graph> RagTime5Parser::m_graphParser [protected] |
the graph manager
Referenced by createZones(), init(), readClusterRootData(), readClusterZone(), readGraphicCluster(), readPictureCluster(), and readZoneData().
shared_ptr<RagTime5Spreadsheet> RagTime5Parser::m_spreadsheetParser [protected] |
the spreadsheet manager
Referenced by init(), readChartCluster(), and readSpreadsheetCluster().
shared_ptr<RagTime5ParserInternal::State> RagTime5Parser::m_state [protected] |
the state
Referenced by checkHeader(), createDocument(), createZones(), findDataZones(), getDataZone(), init(), newPage(), readClusterRootData(), and readClusterZones().
shared_ptr<RagTime5StructManager> RagTime5Parser::m_structManager [protected] |
the structure manager
Referenced by createZones(), getStructManager(), init(), readClusterLinkList(), readStructData(), readStructMainZone(), and readUnicodeString().
shared_ptr<RagTime5Text> RagTime5Parser::m_textParser [protected] |
the text manager
Referenced by init(), readClusterFieldsData(), readClusterRootData(), readClusterZone(), and readTextCluster().