the main class to read a RagTime v5 file More...
#include <RagTime5Parser.hxx>
Public Member Functions | |
RagTime5Parser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor More... | |
virtual | ~RagTime5Parser () |
destructor More... | |
bool | checkHeader (MWAWHeader *header, bool strict=false) |
checks if the document header is correct (or not) More... | |
void | parse (librevenge::RVNGTextInterface *documentInterface) |
virtual function used to parse the input More... | |
![]() | |
virtual | ~MWAWParser () |
virtual destructor More... | |
int | version () const |
returns the works version More... | |
MWAWParserStatePtr | getParserState () |
returns the parser state More... | |
MWAWHeader * | getHeader () |
returns the header More... | |
MWAWInputStreamPtr & | getInput () |
returns the actual input More... | |
MWAWListenerPtr | getMainListener () |
returns the main listener More... | |
MWAWGraphicListenerPtr & | getGraphicListener () |
returns the graphic listener More... | |
MWAWPresentationListenerPtr & | getPresentationListener () |
returns the presentation listener More... | |
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener () |
returns the spreadsheet listener More... | |
MWAWTextListenerPtr & | getTextListener () |
returns the text listener More... | |
MWAWFontConverterPtr & | getFontConverter () |
returns the font converter More... | |
MWAWPageSpan const & | getPageSpan () const |
returns the actual page dimension More... | |
MWAWPageSpan & | getPageSpan () |
returns the actual page dimension More... | |
double | getFormLength () const |
returns the form length More... | |
double | getFormWidth () const |
returns the form width More... | |
double | getPageLength () const |
returns the page length (form length without margin ) More... | |
double | getPageWidth () const |
returns the page width (form width without margin ) More... | |
MWAWRSRCParserPtr & | getRSRCParser () |
returns the rsrc parser More... | |
libmwaw::DebugFile & | ascii () |
a DebugFile used to write what we recognize when we parse the document More... | |
Protected Member Functions | |
void | init () |
inits all internal variables More... | |
shared_ptr < RagTime5ClusterManager > | getClusterManager () |
returns the cluster manager More... | |
shared_ptr< RagTime5StructManager > | getStructManager () |
returns the structure manager More... | |
bool | readChartCluster (RagTime5Zone &zone, int zoneType) |
try to read a chart cluster (via the spreadsheet manager) More... | |
bool | readGraphicCluster (RagTime5Zone &zone, int zoneType) |
try to read a graphic cluster (via the graphic manager) More... | |
bool | readPictureCluster (RagTime5Zone &zone, int zoneType) |
try to read a picture cluster (via the graphic manager) More... | |
bool | readSpreadsheetCluster (RagTime5Zone &zone, int zoneType) |
try to read a spreadsheet cluster (via the spreadsheet manager) More... | |
bool | readTextCluster (RagTime5Zone &zone, int zoneType) |
try to read a text cluster (via the text manager) More... | |
void | createDocument (librevenge::RVNGTextInterface *documentInterface) |
creates the listener which will be associated to the document More... | |
bool | sendZones () |
try to send the different zones More... | |
void | newPage (int number) |
adds a new page More... | |
bool | createZones () |
finds the different objects zones More... | |
bool | findDataZones (MWAWEntry const &entry) |
try to create the main data zones list More... | |
shared_ptr< RagTime5Zone > | getDataZone (int dataId) const |
returns the zone corresponding to a data id (or 0) More... | |
bool | update (RagTime5Zone &zone) |
try to update a zone: create a new input if the zone is stored in different positions, ... More... | |
bool | readZoneData (RagTime5Zone &zone) |
try to read the zone data More... | |
bool | unpackZone (RagTime5Zone &zone, MWAWEntry const &entry, std::vector< unsigned char > &data) |
try to unpack a zone More... | |
bool | unpackZone (RagTime5Zone &zone) |
try to unpack a zone More... | |
bool | readClusterZones () |
try to read the different cluster zones More... | |
bool | readClusterZone (RagTime5Zone &zone, int type=-1) |
try to read a cluster zone More... | |
bool | readClusterLinkList (RagTime5Zone &zone, RagTime5ClusterManager::Link const &link) |
try to read a cluster link zone More... | |
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 More... | |
bool | readString (RagTime5Zone &zone, std::string &string) |
try to read a string zone ( zone with id1=21,id2=23:24) More... | |
bool | readUnicodeString (RagTime5Zone &zone) |
try to read a unicode string zone More... | |
bool | readLongListWithSize (int dataId, int fSz, std::vector< long > &list, std::string const &zoneName="") |
try to read a int/long zone data More... | |
bool | readPositions (int posId, std::vector< long > &listPosition) |
try to read a positions zone in data More... | |
bool | readLongList (RagTime5ClusterManager::Link const &link, std::vector< long > &list) |
try to read/get the list of long of a L_LongList More... | |
bool | readUnicodeStringList (RagTime5ClusterManager::Link const &link, std::map< int, librevenge::RVNGString > &idToStringMap) |
try to read a list of unicode string zone More... | |
bool | readDocumentVersion (RagTime5Zone &zone) |
try to read the document version zone More... | |
bool | readClusterRootData (RagTime5ClusterManager::ClusterRoot &cluster) |
try to read the main cluster More... | |
bool | readFormats (RagTime5ClusterManager::Cluster &cluster) |
try to read the list of format More... | |
bool | readClusterFieldsData (RagTime5ClusterManager::Cluster &cluster) |
try to read the field data More... | |
bool | readClusterLayoutData (RagTime5ClusterManager::ClusterLayout &cluster) |
try to read the layout cluster (type 4001) More... | |
bool | readClusterPipelineData (RagTime5ClusterManager::Cluster &cluster) |
try to read the pipeline cluster data More... | |
bool | readDocInfoClusterData (RagTime5Zone &zone, MWAWEntry const &entry) |
try to read the main doc info cluster data More... | |
bool | readClusterScriptData (RagTime5ClusterManager::ClusterScript &cluster) |
try to read the unknown clusterA data More... | |
bool | readUnknownClusterBData (RagTime5ClusterManager::Cluster &cluster) |
try to read the unknown clusterB data More... | |
bool | readUnknownClusterCData (RagTime5ClusterManager::Cluster &cluster) |
try to read the unknown clusterC data More... | |
bool | readStructZone (RagTime5ClusterManager::Cluster &cluster, RagTime5StructManager::FieldParser &parser, int headerSz) |
try to read a structured zone More... | |
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 More... | |
bool | readStructMainZone (RagTime5Zone &zone) |
try to read a main structured zone (unknown content) More... | |
bool | readListZone (RagTime5ClusterManager::Link const &link) |
try to read a list zone More... | |
bool | readListZone (RagTime5ClusterManager::Link const &link, RagTime5StructManager::DataParser &parser) |
try to read a list zone More... | |
bool | readFixedSizeZone (RagTime5ClusterManager::Link const &link, std::string const &name) |
try to read a fixed size zone More... | |
bool | readFixedSizeZone (RagTime5ClusterManager::Link const &link, RagTime5StructManager::DataParser &parser) |
try to read a fixed size zone More... | |
bool | checkClusterList (std::vector< int > const &list) |
check a cluster list More... | |
void | flushExtra () |
flush unsent zone (debugging function) More... | |
![]() | |
MWAWTextParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor (protected) More... | |
MWAWTextParser (MWAWParserStatePtr state) | |
constructor using a state More... | |
![]() | |
MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor (protected) More... | |
MWAWParser (MWAWParserStatePtr state) | |
constructor using a state More... | |
void | setVersion (int vers) |
sets the document's version More... | |
void | setGraphicListener (MWAWGraphicListenerPtr &listener) |
sets the graphic listener More... | |
void | resetGraphicListener () |
resets the listener More... | |
void | setPresentationListener (MWAWPresentationListenerPtr &listener) |
sets the presentation listener More... | |
void | resetPresentationListener () |
resets the listener More... | |
void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener) |
sets the spreadsheet listener More... | |
void | resetSpreadsheetListener () |
resets the listener More... | |
void | setTextListener (MWAWTextListenerPtr &listener) |
sets the text listener More... | |
void | resetTextListener () |
resets the listener More... | |
void | setFontConverter (MWAWFontConverterPtr fontConverter) |
sets the font convertor More... | |
void | setAsciiName (char const *name) |
Debugging: change the default ascii file. More... | |
std::string const & | asciiName () const |
return the ascii file name More... | |
Protected Attributes | |
shared_ptr < RagTime5ParserInternal::State > | m_state |
the state More... | |
shared_ptr< RagTime5Graph > | m_graphParser |
the graph manager More... | |
shared_ptr< RagTime5Spreadsheet > | m_spreadsheetParser |
the spreadsheet manager More... | |
shared_ptr< RagTime5Text > | m_textParser |
the text manager More... | |
shared_ptr< RagTime5StructManager > | m_structManager |
the structure manager More... | |
shared_ptr < RagTime5ClusterManager > | m_clusterManager |
the cluster manager More... | |
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
|
virtual |
destructor
|
protected |
check a cluster list
Referenced by RagTime5Spreadsheet::readChartCluster(), readClusterLayoutData(), readClusterScriptData(), readClusterZone(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readPictureCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), and RagTime5Text::readTextCluster().
|
virtual |
|
protected |
creates the listener which will be associated to the document
Referenced by parse().
|
protected |
finds the different objects zones
Referenced by parse().
|
protected |
try to create the main data zones list
Referenced by createZones().
|
protected |
flush unsent zone (debugging function)
|
protected |
returns the cluster manager
Referenced by RagTime5Spreadsheet::readChartCluster(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readPictureCluster(), RagTime5Spreadsheet::readSpreadsheetCluster(), and RagTime5Text::readTextCluster().
|
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().
|
protected |
returns the structure manager
|
protected |
inits all internal variables
Referenced by RagTime5Parser().
|
protected |
adds a new page
|
virtual |
virtual function used to parse the input
Implements MWAWTextParser.
|
protected |
try to read a chart cluster (via the spreadsheet manager)
Referenced by RagTime5ClusterManager::readCluster().
|
protected |
try to read the field data
Referenced by readClusterZone().
|
protected |
try to read the layout cluster (type 4001)
Referenced by readClusterZone().
|
protected |
try to read a cluster link zone
Referenced by readClusterRootData(), readClusterScriptData(), RagTime5Graph::readGraphicCluster(), and RagTime5Spreadsheet::readSpreadsheetCluster().
|
protected |
try to read a cluster list link zone
|
protected |
try to read the pipeline cluster data
Referenced by readClusterZone().
|
protected |
|
protected |
try to read the unknown clusterA data
Referenced by readClusterZone().
|
protected |
try to read a cluster zone
Referenced by readClusterRootData(), readClusterZones(), RagTime5ClusterManager::readFieldClusters(), and RagTime5ClusterManager::readUnknownClusterC().
|
protected |
try to read the different cluster zones
Referenced by createZones().
|
protected |
try to read the main doc info cluster data
Referenced by RagTime5ParserInternal::DocInfoFieldParser::parseField().
|
protected |
try to read the document version zone
Referenced by readZoneData().
|
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().
|
protected |
try to read a fixed size zone
|
protected |
try to read the list of format
Referenced by readClusterZone().
|
protected |
try to read a graphic cluster (via the graphic manager)
Referenced by RagTime5ClusterManager::readCluster().
|
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().
|
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(), and RagTime5Graph::readGraphicCluster().
|
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)
Referenced by RagTime5ClusterManager::readCluster().
|
protected |
try to read a positions zone in data
Referenced by RagTime5Text::readFieldZones(), readFormats(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readGraphicTypes(), RagTime5Text::readLinkZones(), readListZone(), and readStructZone().
|
protected |
try to read a spreadsheet cluster (via the spreadsheet manager)
Referenced by RagTime5ClusterManager::readCluster().
|
protected |
try to read a string zone ( zone with id1=21,id2=23:24)
Referenced by createZones(), and readZoneData().
|
protected |
try to read a data in a structured zone
Referenced by readStructZone().
|
protected |
try to read a main structured zone (unknown content)
Referenced by readZoneData().
|
protected |
try to read a structured zone
Referenced by RagTime5Spreadsheet::readChartCluster(), readClusterLayoutData(), readClusterRootData(), readClusterZone(), RagTime5Graph::readGraphicCluster(), RagTime5Graph::readGraphicColors(), RagTime5Graph::readGraphicStyles(), RagTime5Text::readTextStyles(), and readUnknownClusterBData().
|
protected |
try to read a text cluster (via the text manager)
Referenced by RagTime5ClusterManager::readCluster().
|
protected |
try to read a unicode string zone
Referenced by readClusterScriptData(), RagTime5Text::readTextCluster(), and readZoneData().
|
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().
|
protected |
try to read the unknown clusterB data
Referenced by readClusterZone().
|
protected |
try to read the unknown clusterC data
Referenced by readClusterZone().
|
protected |
try to read the zone data
Referenced by createZones().
|
protected |
try to send the different zones
|
protected |
try to unpack a zone
Referenced by createZones(), and unpackZone().
|
protected |
try to unpack a zone
|
protected |
try to update a zone: create a new input if the zone is stored in different positions, ...
Referenced by createZones().
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
friend |
|
friend |
|
friend |
Referenced by init().
|
friend |
Referenced by init().
|
protected |
the cluster manager
Referenced by getClusterManager(), init(), readClusterLayoutData(), readClusterLinkList(), readClusterRootData(), and readClusterZone().
|
protected |
the graph manager
Referenced by createZones(), init(), readClusterRootData(), readClusterZone(), readGraphicCluster(), readPictureCluster(), and readZoneData().
|
protected |
the spreadsheet manager
Referenced by init(), readChartCluster(), and readSpreadsheetCluster().
|
protected |
the state
Referenced by checkHeader(), createDocument(), createZones(), findDataZones(), getDataZone(), init(), newPage(), readClusterRootData(), and readClusterZones().
|
protected |
the structure manager
Referenced by createZones(), getStructManager(), init(), readClusterLinkList(), readStructData(), readStructMainZone(), and readUnicodeString().
|
protected |
the text manager
Referenced by init(), readClusterFieldsData(), readClusterRootData(), readClusterZone(), and readTextCluster().