the main class to read a RagTime v5 file More...
#include <RagTime5Document.hxx>
Public Member Functions | |
| RagTime5Document (MWAWParser &parser) | |
| constructor | |
| ~RagTime5Document () | |
| destructor | |
| bool | checkHeader (MWAWHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
| MWAWParser & | getMainParser () |
| returns the main parser | |
Protected Types | |
| typedef void(MWAWParser::* | NewPage) (int page, bool softBreak) |
| callback used to send a page break | |
| typedef void(MWAWParser::* | SendFootnote) (int zoneId) |
| callback used to send a footnote | |
Protected Member Functions | |
| void | init () |
| inits all internal variables | |
| int | numPages () const |
| returns the document number of page | |
| void | updatePageSpanList (std::vector< MWAWPageSpan > &spanList) |
| updates the page span list | |
| librevenge::RVNGPropertyList | getDocumentMetaData () const |
| returns the document meta data | |
| MWAWParserStatePtr | getParserState () |
| returns the parser state | |
| int | version () const |
| returns the document version | |
| void | setVersion (int vers) |
| sets the document version | |
| libmwaw::DebugFile & | ascii () |
| a DebugFile used to write what we recognize when we parse the document | |
| std::shared_ptr< RagTime5Zone > | getDataZone (int dataId) const |
| returns the zone corresponding to a data id (or 0) | |
| RagTime5ClusterManager::Cluster::Type | getClusterType (int zId) const |
| returns the cluster type corresponding to zone id or C_Unknown (if the zone is not a cluster or was not parsed) | |
| RagTime5ClusterManager::Cluster::Type | getPipelineContainerType (int pipelineId) const |
| try to return the container's type corresponding to an id | |
| std::shared_ptr< RagTime5ClusterManager > | getClusterManager () |
| returns the cluster manager | |
| std::shared_ptr< RagTime5StructManager > | getStructManager () |
| returns the structure manager | |
| std::shared_ptr< RagTime5StyleManager > | getStyleManager () |
| returns the style manager | |
| std::shared_ptr< RagTime5Formula > | getFormulaParser () |
| returns the formula parser | |
| std::shared_ptr< RagTime5Graph > | getGraphParser () |
| returns the graphic parser | |
| std::shared_ptr< RagTime5Spreadsheet > | getSpreadsheetParser () |
| returns the spreadsheet parser | |
| std::shared_ptr< RagTime5ClusterManager::Cluster > | readButtonCluster (RagTime5Zone &zone, int zoneType) |
| try to read a button cluster (via the graphic manager) | |
| std::shared_ptr< RagTime5ClusterManager::Cluster > | readChartCluster (RagTime5Zone &zone, int zoneType) |
| try to read a chart cluster (via the spreadsheet manager) | |
| std::shared_ptr< RagTime5ClusterManager::Cluster > | readGraphicCluster (RagTime5Zone &zone, int zoneType) |
| try to read a graphic cluster (via the graphic manager) | |
| std::shared_ptr< RagTime5ClusterManager::Cluster > | readLayoutCluster (RagTime5Zone &zone, int zoneType) |
| try to read a layout cluster (via the layout manager) | |
| std::shared_ptr< RagTime5ClusterManager::Cluster > | readPipelineCluster (RagTime5Zone &zone, int zoneType) |
| try to read a pipeline cluster (via the pipeline manager) | |
| std::shared_ptr< RagTime5ClusterManager::Cluster > | readPictureCluster (RagTime5Zone &zone, int zoneType) |
| try to read a picture cluster (via the graphic manager) | |
| std::shared_ptr< RagTime5ClusterManager::Cluster > | readSpreadsheetCluster (RagTime5Zone &zone, int zoneType) |
| try to read a spreadsheet cluster (via the spreadsheet manager) | |
| std::shared_ptr< RagTime5ClusterManager::Cluster > | readTextCluster (RagTime5Zone &zone, int zoneType) |
| try to read a text cluster (via the text manager) | |
| bool | sendZones (MWAWListenerPtr listener) |
| try to send the different zones | |
| bool | sendSpreadsheet (MWAWListenerPtr listener) |
| try to send the spreadsheet (assuming there is only one spreadsheet) | |
| bool | send (int zoneId, MWAWListenerPtr listener, MWAWPosition const &pos, int partId=0, int cellId=0, double totalWidth=-1) |
| try to send a cluster zone (mainly unimplemented) | |
| bool | sendButtonZoneAsText (MWAWListenerPtr listener, int buttonId) |
| try to send a button content as text | |
| void | newPage (int number, bool softBreak) |
| adds a new page | |
| bool | createZones () |
| finds the different objects zones | |
| bool | findZones (MWAWEntry const &entry) |
| try to find the list of zones (and stores them in a list) | |
| bool | findZonesKind () |
| try to find the zone's kind | |
| bool | updateZone (std::shared_ptr< RagTime5Zone > &zone) |
| try to update a zone: information + input | |
| bool | updateZoneInput (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 | useMainZoneInfoData () |
| try to read the main zone info zone and the main cluster(and child) | |
| bool | parseMainZoneInfoData (RagTime5Zone const &zone) |
| try to parse the zoneInfo child | |
| bool | checkIsSpreadsheet () |
| check if the document is a spreadsheet | |
| bool | readClusterZone (RagTime5Zone &zone, int type=-1) |
| try to read a cluster zone | |
| bool | readClusterLinkList (RagTime5Zone &zone, RagTime5ClusterManager::Link const &link, std::vector< RagTime5StructManager::ZoneLink > &listLinks) |
| try to read a cluster link zone | |
| bool | readClusterLinkList (RagTime5ClusterManager::Link const &link, std::vector< RagTime5StructManager::ZoneLink > &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, std::string const &what="") |
| 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::NameLink 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 | readDocInfoClusterData (RagTime5Zone &zone, MWAWEntry const &entry) |
| try to read the main doc info cluster data | |
| bool | readScriptComment (RagTime5Zone &zone) |
| try to read a script comment zone | |
| bool | readClusterGProp (RagTime5ClusterManager::Cluster &cluster) |
| try to read the cluster with contains main graphic object properties | |
| bool | readUnknownClusterCData (RagTime5ClusterManager::Cluster &cluster) |
| try to read the unknown clusterC data | |
| bool | readStructZone (RagTime5ClusterManager::Link const &link, RagTime5StructManager::FieldParser &parser, int headerSz, RagTime5ClusterManager::NameLink *nameLink=nullptr) |
| 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 | 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 | readChildList (RagTime5ClusterManager::Link const &link, std::vector< RagTime5StructManager::ZoneLink > &childList, bool findN=false) |
| try to read a cluster child list | |
| bool | checkClusterList (std::vector< RagTime5StructManager::ZoneLink > const &list) |
| check a cluster list | |
| bool | checkClusterList (std::vector< int > const &list) |
| check a cluster list | |
| void | flushExtra (MWAWListenerPtr listener, bool onlyCheck=false) |
| flush unsent zone (debugging function) | |
Protected Attributes | |
| MWAWParser * | m_parser |
| the main parser | |
| std::shared_ptr< MWAWParserState > | m_parserState |
| the parser state | |
| std::shared_ptr< RagTime5DocumentInternal::State > | m_state |
| the state | |
| std::shared_ptr< RagTime5Chart > | m_chartParser |
| the chart manager | |
| std::shared_ptr< RagTime5Formula > | m_formulaParser |
| the formula manager | |
| std::shared_ptr< RagTime5Graph > | m_graphParser |
| the graph manager | |
| std::shared_ptr< RagTime5Layout > | m_layoutParser |
| the layout manager | |
| std::shared_ptr< RagTime5Pipeline > | m_pipelineParser |
| the pipeline manager | |
| std::shared_ptr< RagTime5Spreadsheet > | m_spreadsheetParser |
| the spreadsheet manager | |
| std::shared_ptr< RagTime5Text > | m_textParser |
| the text manager | |
| std::shared_ptr< RagTime5ClusterManager > | m_clusterManager |
| the cluster manager | |
| std::shared_ptr< RagTime5StructManager > | m_structManager |
| the structure manager | |
| std::shared_ptr< RagTime5StyleManager > | m_styleManager |
| the style manager | |
| NewPage | m_newPage |
| the new page callback | |
| SendFootnote | m_sendFootnote |
| the send footnote callback | |
Private Member Functions | |
| RagTime5Document (RagTime5Document const &)=delete | |
| RagTime5Document & | operator= (RagTime5Document const &)=delete |
Friends | |
| class | RagTime5Chart |
| class | RagTime5Formula |
| class | RagTime5Graph |
| class | RagTime5Layout |
| class | RagTime5Parser |
| class | RagTime5Pipeline |
| class | RagTime5Spreadsheet |
| class | RagTime5SSParser |
| class | RagTime5StructManager |
| class | RagTime5Text |
| class | RagTime5ClusterManager |
| struct | RagTime5DocumentInternal::DocInfoFieldParser |
| class | RagTime5StyleManager |
| class | RagTime5DocumentInternal::SubDocument |
the main class to read a RagTime v5 file
|
protected |
callback used to send a page break
|
protected |
callback used to send a footnote
|
explicit |
constructor
Referenced by operator=(), and RagTime5Document().
| RagTime5Document::~RagTime5Document | ( | ) |
destructor
|
privatedelete |
|
inlineprotected |
a DebugFile used to write what we recognize when we parse the document
Referenced by checkHeader(), createZones(), findZones(), findZonesKind(), flushExtra(), parseMainZoneInfoData(), readDocumentVersion(), readListZone(), readScriptComment(), readZoneData(), unpackZone(), updateZone(), and updateZoneInput().
|
protected |
check a cluster list
|
protected |
check a cluster list
Referenced by readChildList(), readClusterLinkList(), and readClusterZone().
| bool RagTime5Document::checkHeader | ( | MWAWHeader * | header, |
| bool | strict = false ) |
checks if the document header is correct (or not)
|
protected |
check if the document is a spreadsheet
Referenced by checkHeader().
|
protected |
finds the different objects zones
|
protected |
try to find the list of zones (and stores them in a list)
Referenced by checkIsSpreadsheet(), and createZones().
|
protected |
try to find the zone's kind
Referenced by checkIsSpreadsheet(), and createZones().
|
protected |
flush unsent zone (debugging function)
|
protected |
returns the cluster manager
|
protected |
returns the cluster type corresponding to zone id or C_Unknown (if the zone is not a cluster or was not parsed)
|
protected |
returns the zone corresponding to a data id (or 0)
Referenced by checkClusterList(), checkClusterList(), checkIsSpreadsheet(), readChildList(), readClusterGProp(), readClusterRootData(), readFixedSizeZone(), readListZone(), readLongListWithSize(), readStructZone(), and useMainZoneInfoData().
|
protected |
returns the document meta data
|
protected |
returns the formula parser
|
protected |
returns the graphic parser
|
inline |
returns the main parser
|
inlineprotected |
returns the parser state
Referenced by ascii(), and RagTime5Document().
|
protected |
try to return the container's type corresponding to an id
|
protected |
returns the spreadsheet parser
|
protected |
returns the structure manager
|
protected |
returns the style manager
|
protected |
inits all internal variables
Referenced by RagTime5Document().
|
protected |
adds a new page
|
protected |
returns the document number of page
Referenced by updatePageSpanList().
|
privatedelete |
|
protected |
try to parse the zoneInfo child
Referenced by checkIsSpreadsheet(), and useMainZoneInfoData().
|
protected |
try to read a button cluster (via the graphic manager)
|
protected |
try to read a chart cluster (via the spreadsheet manager)
|
protected |
try to read a cluster child list
|
protected |
try to read the cluster with contains main graphic object properties
Referenced by readClusterZone().
|
protected |
try to read a cluster list link zone
|
protected |
try to read a cluster link zone
Referenced by readChildList(), and readClusterRootData().
|
protected |
try to read the main cluster
Referenced by readClusterZone().
|
protected |
try to read a cluster zone
Referenced by createZones(), readClusterRootData(), and useMainZoneInfoData().
|
protected |
try to read the main doc info cluster data
|
protected |
try to read the document version zone
Referenced by readZoneData().
|
protected |
try to read a fixed size zone
|
protected |
try to read a fixed size zone
Referenced by readClusterGProp(), readClusterRootData(), readClusterZone(), readFixedSizeZone(), and readUnknownClusterCData().
|
protected |
try to read a graphic cluster (via the graphic manager)
|
protected |
try to read a layout cluster (via the layout manager)
|
protected |
try to read a list zone
Referenced by readClusterLinkList(), readClusterRootData(), readClusterZone(), readListZone(), readUnicodeStringList(), and readUnknownClusterCData().
|
protected |
try to read a list zone
|
protected |
try to read/get the list of long of a L_LongList
Referenced by readClusterRootData(), and readUnicodeStringList().
|
protected |
try to read a int/long zone data
Referenced by readLongList(), and readPositions().
|
protected |
try to read a picture cluster (via the graphic manager)
|
protected |
try to read a pipeline cluster (via the pipeline manager)
|
protected |
try to read a positions zone in data
Referenced by readListZone(), and readStructZone().
|
protected |
try to read a script comment zone
Referenced by readZoneData().
|
protected |
try to read a spreadsheet cluster (via the spreadsheet manager)
|
protected |
try to read a string zone ( zone with id1=21,id2=23:24)
Referenced by findZonesKind(), and readZoneData().
|
protected |
try to read a data in a structured zone
Referenced by readStructZone().
|
protected |
try to read a structured zone
Referenced by readClusterGProp(), readClusterRootData(), and readClusterZone().
|
protected |
try to read a text cluster (via the text manager)
|
protected |
try to read a unicode string zone
Referenced by readScriptComment(), and readZoneData().
|
protected |
try to read a list of unicode string zone
Referenced by readClusterZone(), and readStructZone().
|
protected |
try to read the unknown clusterC data
Referenced by readClusterZone().
|
protected |
try to read the zone data
Referenced by flushExtra().
|
protected |
try to send a cluster zone (mainly unimplemented)
Referenced by sendSpreadsheet().
|
protected |
try to send a button content as text
|
protected |
try to send the spreadsheet (assuming there is only one spreadsheet)
|
protected |
try to send the different zones
|
protected |
sets the document version
Referenced by checkHeader().
|
protected |
try to unpack a zone
|
protected |
try to unpack a zone
Referenced by unpackZone(), and updateZone().
|
protected |
updates the page span list
|
protected |
try to update a zone: information + input
Referenced by checkIsSpreadsheet(), and createZones().
|
protected |
try to update a zone: create a new input if the zone is stored in different positions, ...
Referenced by findZonesKind(), and updateZone().
|
protected |
try to read the main zone info zone and the main cluster(and child)
Referenced by createZones().
|
protected |
returns the document version
Referenced by checkHeader(), and createZones().
|
friend |
Referenced by init(), and RagTime5Chart.
|
friend |
Referenced by init(), and RagTime5ClusterManager.
|
friend |
|
friend |
Referenced by RagTime5DocumentInternal::SubDocument.
|
friend |
Referenced by init(), and RagTime5Formula.
|
friend |
Referenced by init(), and RagTime5Graph.
|
friend |
Referenced by init(), and RagTime5Layout.
|
friend |
Referenced by RagTime5Parser.
|
friend |
Referenced by init(), and RagTime5Pipeline.
|
friend |
Referenced by init(), and RagTime5Spreadsheet.
|
friend |
Referenced by RagTime5SSParser.
|
friend |
Referenced by init(), and RagTime5StructManager.
|
friend |
Referenced by init(), and RagTime5StyleManager.
|
friend |
Referenced by init(), and RagTime5Text.
|
protected |
the chart manager
Referenced by init(), RagTime5Document(), and readChartCluster().
|
protected |
the cluster manager
Referenced by checkIsSpreadsheet(), getClusterManager(), getClusterType(), init(), RagTime5Document(), readClusterLinkList(), readClusterLinkList(), readClusterRootData(), readClusterZone(), send(), and sendZones().
|
protected |
the formula manager
Referenced by createZones(), getFormulaParser(), init(), RagTime5Document(), and readClusterRootData().
|
protected |
the graph manager
Referenced by createZones(), flushExtra(), getGraphParser(), init(), RagTime5Document(), readButtonCluster(), readClusterRootData(), readClusterZone(), readGraphicCluster(), readPictureCluster(), readZoneData(), send(), and sendButtonZoneAsText().
|
protected |
the layout manager
Referenced by init(), numPages(), RagTime5Document(), readLayoutCluster(), and sendZones().
|
protected |
the new page callback
Referenced by newPage(), and RagTime5Document().
|
protected |
the main parser
Referenced by checkHeader(), findZones(), getMainParser(), newPage(), RagTime5Document(), unpackZone(), updatePageSpanList(), and updateZoneInput().
|
protected |
the parser state
Referenced by getParserState(), numPages(), and RagTime5Document().
|
protected |
the pipeline manager
Referenced by getPipelineContainerType(), init(), RagTime5Document(), readPipelineCluster(), and send().
|
protected |
the send footnote callback
Referenced by RagTime5Document().
|
protected |
the spreadsheet manager
Referenced by createZones(), flushExtra(), getSpreadsheetParser(), init(), RagTime5Document(), readSpreadsheetCluster(), send(), and sendSpreadsheet().
|
protected |
the state
Referenced by checkHeader(), checkIsSpreadsheet(), createZones(), findZones(), findZonesKind(), flushExtra(), getDataZone(), init(), numPages(), parseMainZoneInfoData(), RagTime5Document(), readClusterRootData(), send(), sendZones(), setVersion(), updateZone(), useMainZoneInfoData(), and version().
|
protected |
the structure manager
Referenced by checkIsSpreadsheet(), getStructManager(), init(), RagTime5Document(), readClusterLinkList(), readStructData(), readUnicodeString(), and useMainZoneInfoData().
|
protected |
the style manager
Referenced by getStyleManager(), init(), RagTime5Document(), and readClusterZone().
|
protected |
the text manager
Referenced by flushExtra(), init(), RagTime5Document(), readTextCluster(), and send().