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 const &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
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(), RagTime5Graph::readPictureContainer(), RagTime5Graph::readPictureData(), RagTime5Graph::readPictureList(), RagTime5Graph::readPictureMatch(), readScriptComment(), readZoneData(), unpackZone(), updateZone(), and updateZoneInput().
|
protected |
check a cluster list
|
protected |
check a cluster list
Referenced by readChildList(), readClusterLinkList(), readClusterZone(), RagTime5Formula::readFormulaClusters(), RagTime5Graph::readGraphicCluster(), RagTime5Layout::readLayoutCluster(), RagTime5Graph::readPictureCluster(), RagTime5Pipeline::readPipelineCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), and RagTime5Text::readTextCluster().
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
Referenced by RagTime5Graph::readButtonCluster(), RagTime5Formula::readFormulaClusters(), RagTime5Formula::readFormulaDefinition(), RagTime5Graph::readGraphicCluster(), RagTime5Layout::readLayoutCluster(), RagTime5Graph::readPictureCluster(), RagTime5Pipeline::readPipelineCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), RagTime5Text::readTextCluster(), and RagTime5Text::send().
|
protected |
returns the cluster type corresponding to zone id or C_Unknown (if the zone is not a cluster or was not parsed)
Referenced by RagTime5Pipeline::getContainerType(), RagTime5Graph::send(), RagTime5Spreadsheet::send(), and RagTime5Layout::updateLayout().
|
protected |
returns the zone corresponding to a data id (or 0)
Referenced by checkClusterList(), checkIsSpreadsheet(), RagTime5Graph::readButtonCluster(), readChildList(), readClusterGProp(), RagTime5ClusterManager::readClusterMainList(), readClusterRootData(), RagTime5Graph::readColorPatternZone(), readFixedSizeZone(), RagTime5StyleManager::readFormats(), RagTime5Formula::readFormulaClusters(), RagTime5Formula::readFormulaZones(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readGraphicShapes(), RagTime5Graph::readGraphicTransformations(), RagTime5Graph::readGraphicTypes(), RagTime5Graph::readGraphicUsed(), RagTime5Text::readLinkZones(), readListZone(), readLongListWithSize(), RagTime5Graph::readPictureCluster(), RagTime5Graph::readPictureList(), RagTime5Text::readPLC(), RagTime5Text::readPLCToCharStyle(), RagTime5Spreadsheet::readSpreadsheetCluster(), readStructZone(), RagTime5ClusterManager::readUnknownClusterC(), RagTime5Text::send(), and useMainZoneInfoData().
|
protected |
returns the document meta data
|
protected |
returns the formula parser
Referenced by RagTime5Spreadsheet::parseSpreadsheetFormulas(), and RagTime5StructManager::readField().
|
protected |
returns the graphic parser
|
inline |
returns the main parser
|
inlineprotected |
returns the parser state
Referenced by ascii().
|
protected |
try to return the container's type corresponding to an id
Referenced by RagTime5Graph::send().
|
protected |
returns the spreadsheet parser
Referenced by RagTime5Formula::readFormulaDefinition(), and RagTime5Formula::readFormulaZones().
|
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
Referenced by RagTime5Spreadsheet::readSpreadsheetCluster(), and RagTime5Text::readTextCluster().
|
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 RagTime5Graph::readButtonCluster(), readChildList(), readClusterRootData(), and RagTime5Graph::readGraphicCluster().
|
protected |
try to read the main cluster
Referenced by readClusterZone().
|
protected |
try to read a cluster zone
Referenced by createZones(), readClusterRootData(), RagTime5ClusterManager::readUnknownClusterC(), and useMainZoneInfoData().
|
protected |
try to read the main doc info cluster data
Referenced by RagTime5DocumentInternal::DocInfoFieldParser::parseField().
|
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 RagTime5Graph::readButtonCluster(), readClusterGProp(), readClusterRootData(), readClusterZone(), readFixedSizeZone(), RagTime5StyleManager::readFormats(), RagTime5Formula::readFormulaClusters(), RagTime5Graph::readGraphicCluster(), RagTime5Layout::readLayoutCluster(), RagTime5Graph::readPictureCluster(), RagTime5Pipeline::readPipelineCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), RagTime5Text::readTextCluster(), 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 RagTime5Graph::readButtonCluster(), readClusterLinkList(), readClusterRootData(), readClusterZone(), RagTime5Graph::readGraphicCluster(), RagTime5Layout::readLayoutCluster(), readListZone(), RagTime5Graph::readPictureCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), RagTime5Text::readTextCluster(), 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 RagTime5ClusterManager::readClusterMainList(), readClusterRootData(), RagTime5StyleManager::readFormats(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readPictureCluster(), RagTime5Text::readTextCluster(), 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 RagTime5StyleManager::readFormats(), RagTime5Formula::readFormulaZones(), RagTime5Graph::readGraphicShapes(), RagTime5Graph::readGraphicTypes(), RagTime5Text::readLinkZones(), readListZone(), and readStructZone().
|
protected |
try to read a script comment zone
Referenced by RagTime5Graph::readButtonCluster(), and 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(), readClusterZone(), RagTime5Formula::readFunctionNames(), RagTime5Graph::readGraphicCluster(), RagTime5StyleManager::readGraphicColors(), RagTime5StyleManager::readGraphicStyles(), RagTime5Layout::readLayoutCluster(), and RagTime5StyleManager::readTextStyles().
|
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 RagTime5Graph::readButtonCluster(), RagTime5ClusterManager::readClusterMainList(), readClusterZone(), RagTime5StyleManager::readFormats(), RagTime5Graph::readGraphicShapes(), RagTime5Layout::readLayoutCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), readStructZone(), and RagTime5Text::readTextCluster().
|
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 RagTime5Pipeline::send(), RagTime5Graph::send(), RagTime5Spreadsheet::send(), RagTime5Text::send(), RagTime5ClusterManager::sendClusterMainList(), RagTime5Layout::sendPageContents(), sendSpreadsheet(), and RagTime5Graph::sendTextZone().
|
protected |
try to send a button content as text
Referenced by RagTime5Spreadsheet::send().
|
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().
|
friend |
Referenced by init().
|
friend |
|
friend |
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
friend |
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
friend |
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
protected |
the chart manager
Referenced by init(), and readChartCluster().
|
protected |
the cluster manager
Referenced by checkIsSpreadsheet(), getClusterManager(), getClusterType(), init(), readClusterLinkList(), readClusterRootData(), readClusterZone(), send(), and sendZones().
|
protected |
the formula manager
Referenced by createZones(), getFormulaParser(), init(), and readClusterRootData().
|
protected |
the graph manager
Referenced by createZones(), flushExtra(), getGraphParser(), init(), readButtonCluster(), readClusterRootData(), readClusterZone(), readGraphicCluster(), readPictureCluster(), readZoneData(), send(), and sendButtonZoneAsText().
|
protected |
the layout manager
Referenced by init(), numPages(), readLayoutCluster(), and sendZones().
|
protected |
the main parser
Referenced by checkHeader(), findZones(), getMainParser(), newPage(), unpackZone(), updatePageSpanList(), and updateZoneInput().
|
protected |
the parser state
Referenced by getParserState(), and numPages().
|
protected |
the pipeline manager
Referenced by getPipelineContainerType(), init(), readPipelineCluster(), and send().
|
protected |
the send footnote callback
|
protected |
the spreadsheet manager
Referenced by createZones(), flushExtra(), getSpreadsheetParser(), init(), readSpreadsheetCluster(), send(), and sendSpreadsheet().
|
protected |
the state
Referenced by checkHeader(), checkIsSpreadsheet(), createZones(), findZones(), findZonesKind(), flushExtra(), getDataZone(), init(), numPages(), parseMainZoneInfoData(), readClusterRootData(), send(), sendZones(), setVersion(), updateZone(), useMainZoneInfoData(), and version().
|
protected |
the structure manager
Referenced by checkIsSpreadsheet(), getStructManager(), init(), readClusterLinkList(), readStructData(), readUnicodeString(), and useMainZoneInfoData().
|
protected |
the style manager
Referenced by getStyleManager(), init(), and readClusterZone().
|
protected |
the text manager
Referenced by flushExtra(), init(), readTextCluster(), and send().