RagTime5Parser.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2 
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33 
34 #ifndef RAG_TIME_5_PARSER
35 # define RAG_TIME_5_PARSER
36 
37 #include <map>
38 #include <string>
39 #include <set>
40 #include <vector>
41 
42 #include "MWAWDebug.hxx"
43 #include "MWAWInputStream.hxx"
44 
45 #include "MWAWParser.hxx"
46 
49 
50 namespace RagTime5ParserInternal
51 {
52 struct DocInfoFieldParser;
53 struct State;
54 class SubDocument;
55 }
56 
57 class RagTime5Chart;
58 class RagTime5Graph;
59 class RagTime5Layout;
60 class RagTime5Pipeline;
64 class RagTime5Text;
65 class RagTime5Zone;
67 
74 {
75  friend class RagTime5Chart;
76  friend class RagTime5Graph;
77  friend class RagTime5Layout;
78  friend class RagTime5Pipeline;
79  friend class RagTime5Spreadsheet;
80  friend class RagTime5Text;
81  friend class RagTime5ClusterManager;
83  friend class RagTime5StyleManager;
85 
86 public:
90  virtual ~RagTime5Parser();
91 
93  bool checkHeader(MWAWHeader *header, bool strict=false);
94 
95  // the main parse function
96  void parse(librevenge::RVNGTextInterface *documentInterface);
97 
98 protected:
100  void init();
101 
102  //
103  // interface
104  //
105 
107  shared_ptr<RagTime5Zone> getDataZone(int dataId) const;
112 
114  shared_ptr<RagTime5ClusterManager> getClusterManager();
116  shared_ptr<RagTime5StructManager> getStructManager();
118  shared_ptr<RagTime5StyleManager> getStyleManager();
119 
121  shared_ptr<RagTime5ClusterManager::Cluster> readChartCluster(RagTime5Zone &zone, int zoneType);
123  shared_ptr<RagTime5ClusterManager::Cluster> readGraphicCluster(RagTime5Zone &zone, int zoneType);
125  shared_ptr<RagTime5ClusterManager::Cluster> readLayoutCluster(RagTime5Zone &zone, int zoneType);
127  shared_ptr<RagTime5ClusterManager::Cluster> readPipelineCluster(RagTime5Zone &zone, int zoneType);
129  shared_ptr<RagTime5ClusterManager::Cluster> readPictureCluster(RagTime5Zone &zone, int zoneType);
131  shared_ptr<RagTime5ClusterManager::Cluster> readSpreadsheetCluster(RagTime5Zone &zone, int zoneType);
133  shared_ptr<RagTime5ClusterManager::Cluster> readTextCluster(RagTime5Zone &zone, int zoneType);
134 
136  void createDocument(librevenge::RVNGTextInterface *documentInterface);
138  bool sendZones();
140  bool send(int zoneId, MWAWListenerPtr listener, MWAWPosition const &pos, int partId=0, int part2Id=0);
141 
143  void newPage(int number);
144 
146  bool createZones();
148  bool findDataZones(MWAWEntry const &entry);
150  bool update(RagTime5Zone &zone);
152  bool readZoneData(RagTime5Zone &zone);
154  bool unpackZone(RagTime5Zone &zone, MWAWEntry const &entry, std::vector<unsigned char> &data);
156  bool unpackZone(RagTime5Zone &zone);
157 
159  bool readZoneInfo();
161  bool readClusterZone(RagTime5Zone &zone, int type=-1);
164  RagTime5ClusterManager::Link const &link,
165  std::vector<RagTime5StructManager::ZoneLink> &listLinks);
168  RagTime5ClusterManager::Link const &nameLink,
169  std::vector<RagTime5StructManager::ZoneLink> &list, std::string const &name="");
170 
172  bool readString(RagTime5Zone &zone, std::string &string);
174  bool readUnicodeString(RagTime5Zone &zone, std::string const &what="");
176  bool readLongListWithSize(int dataId, int fSz, std::vector<long> &list, std::string const &zoneName="");
178  bool readPositions(int posId, std::vector<long> &listPosition);
180  bool readLongList(RagTime5ClusterManager::Link const &link, std::vector<long> &list);
182  bool readUnicodeStringList(RagTime5ClusterManager::Link const &link, std::map<int, librevenge::RVNGString> &idToStringMap);
183 
185  bool readDocumentVersion(RagTime5Zone &zone);
191  bool readDocInfoClusterData(RagTime5Zone &zone, MWAWEntry const &entry);
195  bool readScriptComment(RagTime5Zone &zone);
200 
204  bool readStructData(RagTime5Zone &zone, long endPos, int n, int headerSz,
205  RagTime5StructManager::FieldParser &parser, librevenge::RVNGString const &dataName);
206 
208  bool readListZone(RagTime5ClusterManager::Link const &link);
212  bool readFixedSizeZone(RagTime5ClusterManager::Link const &link, std::string const &name);
215 
217  bool checkClusterList(std::vector<RagTime5StructManager::ZoneLink> const &list);
219  bool checkClusterList(std::vector<int> const &list);
221  void flushExtra();
222 
223 protected:
224 
225  //
226  // data
227  //
229  shared_ptr<RagTime5ParserInternal::State> m_state;
231  shared_ptr<RagTime5Chart> m_chartParser;
233  shared_ptr<RagTime5Graph> m_graphParser;
235  shared_ptr<RagTime5Layout> m_layoutParser;
237  shared_ptr<RagTime5Pipeline> m_pipelineParser;
239  shared_ptr<RagTime5Spreadsheet> m_spreadsheetParser;
241  shared_ptr<RagTime5Text> m_textParser;
242 
244  shared_ptr<RagTime5ClusterManager> m_clusterManager;
246  shared_ptr<RagTime5StructManager> m_structManager;
248  shared_ptr<RagTime5StyleManager> m_styleManager;
249 };
250 #endif
251 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
RagTime5ParserInternal::State::State
State()
constructor
Definition: RagTime5Parser.cxx:236
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
RagTime5Zone::m_isParsed
bool m_isParsed
a flag to know if the zone is parsed
Definition: RagTime5StructManager.hxx:134
MWAWTextParser
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
RagTime5Parser::RagTime5StyleManager
friend class RagTime5StyleManager
Definition: RagTime5Parser.hxx:83
RagTime5Parser::newPage
void newPage(int number)
adds a new page
Definition: RagTime5Parser.cxx:420
RagTime5ParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: RagTime5Parser.cxx:257
MWAWTextListenerPtr
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
RagTime5Parser::readChartCluster
shared_ptr< RagTime5ClusterManager::Cluster > readChartCluster(RagTime5Zone &zone, int zoneType)
try to read a chart cluster (via the spreadsheet manager)
Definition: RagTime5Parser.cxx:365
RagTime5ParserInternal::DocInfoFieldParser::m_mainParser
RagTime5Parser & m_mainParser
the main parser
Definition: RagTime5Parser.cxx:105
RagTime5Parser::readString
bool readString(RagTime5Zone &zone, std::string &string)
try to read a string zone ( zone with id1=21,id2=23:24)
Definition: RagTime5Parser.cxx:840
RagTime5ParserInternal::IndexUnicodeParser::~IndexUnicodeParser
virtual ~IndexUnicodeParser()
destructor
Definition: RagTime5Parser.cxx:150
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
RagTime5Parser::readClusterRootData
bool readClusterRootData(RagTime5ClusterManager::ClusterRoot &cluster)
try to read the main cluster
Definition: RagTime5Parser.cxx:962
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
RagTime5ParserInternal::SubDocument::~SubDocument
virtual ~SubDocument()
destructor
Definition: RagTime5Parser.cxx:273
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
RagTime5Parser::getPipelineContainerType
RagTime5ClusterManager::Cluster::Type getPipelineContainerType(int pipelineId) const
try to return the container's type corresponding to an id
Definition: RagTime5Parser.cxx:412
RagTime5Parser::m_styleManager
shared_ptr< RagTime5StyleManager > m_styleManager
the style manager
Definition: RagTime5Parser.hxx:248
RagTime5Zone::setAsciiFileName
void setAsciiFileName(std::string const &name)
defines the ascii name
Definition: RagTime5StructManager.hxx:100
RagTime5Parser::readUnicodeStringList
bool readUnicodeStringList(RagTime5ClusterManager::Link const &link, std::map< int, librevenge::RVNGString > &idToStringMap)
try to read a list of unicode string zone
Definition: RagTime5Parser.cxx:896
RagTime5ClusterManager::Cluster::m_conditionFormulaLinks
std::vector< Link > m_conditionFormulaLinks
the conditions formula links
Definition: RagTime5ClusterManager.hxx:254
RagTime5ParserInternal::DocInfoFieldParser::DocInfoFieldParser
DocInfoFieldParser(RagTime5Parser &parser)
constructor
Definition: RagTime5Parser.cxx:75
RagTime5Zone::m_defPosition
long m_defPosition
the position of the definition in the main zones
Definition: RagTime5StructManager.hxx:114
RagTime5ClusterManager::Cluster::C_FormatStyles
@ C_FormatStyles
Definition: RagTime5ClusterManager.hxx:225
RagTime5ParserInternal::DocInfoFieldParser
Internal: the helper to read doc info parse.
Definition: RagTime5Parser.cxx:73
RagTime5Parser::readClusterFieldsData
bool readClusterFieldsData(RagTime5ClusterManager::Cluster &cluster)
try to read the field data
Definition: RagTime5Parser.cxx:1316
RagTime5ClusterManager::Cluster::C_Pipeline
@ C_Pipeline
Definition: RagTime5ClusterManager.hxx:219
RagTime5ParserInternal::ClustListParser::getIdList
std::vector< int > getIdList() const
returns the not null list dataId list
Definition: RagTime5Parser.cxx:168
RagTime5StructManager::DataParser::parseData
virtual bool parseData(MWAWInputStreamPtr &, long, RagTime5Zone &, int, libmwaw::DebugStream &)
parse a data
Definition: RagTime5StructManager.hxx:365
RagTime5ParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: RagTime5Parser.cxx:288
RagTime5Parser::getStyleManager
shared_ptr< RagTime5StyleManager > getStyleManager()
returns the style manager
Definition: RagTime5Parser.cxx:360
RagTime5ParserInternal::ClustListParser::m_clusterManager
RagTime5ClusterManager & m_clusterManager
the main zone manager
Definition: RagTime5Parser.cxx:221
RagTime5ClusterManager::ClusterRoot::m_listClusterLink
Link m_listClusterLink[2]
first the main cluster link, second list of field definition link
Definition: RagTime5ClusterManager.hxx:297
RagTime5ClusterManager::Cluster::C_ClusterC
@ C_ClusterC
Definition: RagTime5ClusterManager.hxx:227
RagTime5Parser::readPictureCluster
shared_ptr< RagTime5ClusterManager::Cluster > readPictureCluster(RagTime5Zone &zone, int zoneType)
try to read a picture cluster (via the graphic manager)
Definition: RagTime5Parser.cxx:385
RagTime5Spreadsheet
the main class to read the spreadsheet part of RagTime 56 file
Definition: RagTime5Spreadsheet.hxx:76
RagTime5Zone::m_kinds
std::string m_kinds[2]
the zone types: normal and packing
Definition: RagTime5StructManager.hxx:116
RagTime5Parser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: RagTime5Parser.cxx:468
MWAWInputStream
Internal class used to read the file stream Internal class used to read the file stream,...
Definition: MWAWInputStream.hxx:54
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
RagTime5StructManager.hxx
RagTime5StructManager::Field::T_Unstructured
@ T_Unstructured
Definition: RagTime5StructManager.hxx:221
RagTime5Parser::m_textParser
shared_ptr< RagTime5Text > m_textParser
the text manager
Definition: RagTime5Parser.hxx:241
RagTime5Spreadsheet.hxx
RagTime5Parser
the main class to read a RagTime v5 file
Definition: RagTime5Parser.hxx:74
RagTime5Parser::getStructManager
shared_ptr< RagTime5StructManager > getStructManager()
returns the structure manager
Definition: RagTime5Parser.cxx:355
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
RagTime5Zone::setInput
void setInput(MWAWInputStreamPtr input)
reset the current input
Definition: RagTime5StructManager.hxx:82
RagTime5Zone::ascii
libmwaw::DebugFile & ascii()
returns the current ascii file
Definition: RagTime5StructManager.hxx:93
RagTime5Parser::readListZone
bool readListZone(RagTime5ClusterManager::Link const &link)
try to read a list zone
Definition: RagTime5Parser.cxx:1653
RagTime5ParserInternal::SubDocument::operator==
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: RagTime5Parser.cxx:278
RagTime5StructManager::FieldParser::m_regroupFields
bool m_regroupFields
a flag use to decide if we output one debug message by field or not
Definition: RagTime5StructManager.hxx:338
RagTime5ParserInternal::SubDocument
Internal: the subdocument of a RagTime5Parser.
Definition: RagTime5Parser.cxx:266
RagTime5StructManager::Field
a field of RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:218
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
RagTime5Parser::RagTime5Parser
RagTime5Parser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: RagTime5Parser.cxx:317
RagTime5Parser::readSpreadsheetCluster
shared_ptr< RagTime5ClusterManager::Cluster > readSpreadsheetCluster(RagTime5Zone &zone, int zoneType)
try to read a spreadsheet cluster (via the spreadsheet manager)
Definition: RagTime5Parser.cxx:390
RagTime5Chart.hxx
RagTime5ClusterManager::getClusterName
std::string getClusterName(int id)
returns "data"+id+"A" ( followed by the cluster type and name if know)
Definition: RagTime5ClusterManager.cxx:215
RagTime5ClusterManager::ClusterRoot::m_listClusterId
int m_listClusterId
the cluster list id
Definition: RagTime5ClusterManager.hxx:293
MWAWPrinter.hxx
RagTime5ParserInternal::State::m_pageZonesIdMap
std::map< int, std::vector< int > > m_pageZonesIdMap
a map: page->main zone id
Definition: RagTime5Parser.cxx:252
RagTime5ClusterManager::Cluster::C_ChartZone
@ C_ChartZone
Definition: RagTime5ClusterManager.hxx:223
RagTime5Zone::m_childIdToZoneMap
std::map< int, shared_ptr< RagTime5Zone > > m_childIdToZoneMap
the child zones
Definition: RagTime5StructManager.hxx:130
RagTime5ParserInternal::State::m_sendZoneSet
std::set< int > m_sendZoneSet
a set used to avoid looping when sending zone
Definition: RagTime5Parser.cxx:254
RagTime5ParserInternal::IndexUnicodeParser::parseData
bool parseData(MWAWInputStreamPtr &input, long endPos, RagTime5Zone &, int n, libmwaw::DebugStream &f)
try to parse a data
Definition: RagTime5Parser.cxx:122
RagTime5Zone::m_entry
MWAWEntry m_entry
the zone entry
Definition: RagTime5StructManager.hxx:118
RagTime5StructManager::DataParser::getZoneName
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5StructManager.hxx:353
RagTime5Layout
the main class to read the text part of RagTime 56 file
Definition: RagTime5Layout.hxx:73
RagTime5Parser::readLongListWithSize
bool readLongListWithSize(int dataId, int fSz, std::vector< long > &list, std::string const &zoneName="")
try to read a int/long zone data
Definition: RagTime5Parser.cxx:905
RagTime5ParserInternal::SubDocument::SubDocument
SubDocument(RagTime5Parser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: RagTime5Parser.cxx:269
RagTime5Parser::RagTime5Graph
friend class RagTime5Graph
Definition: RagTime5Parser.hxx:76
RagTime5ParserInternal::ClustListParser::getClusterName
std::string getClusterName(int id) const
return the cluster name
Definition: RagTime5Parser.cxx:178
RagTime5StructManager::DataParser
virtual class use to parse the unstructured data
Definition: RagTime5StructManager.hxx:347
RagTime5StructManager::DataParser::DataParser
DataParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:349
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
RagTime5Parser::readFixedSizeZone
bool readFixedSizeZone(RagTime5ClusterManager::Link const &link, std::string const &name)
try to read a fixed size zone
Definition: RagTime5Parser.cxx:1726
RagTime5Parser::readUnicodeString
bool readUnicodeString(RagTime5Zone &zone, std::string const &what="")
try to read a unicode string zone
Definition: RagTime5Parser.cxx:870
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
RagTime5Parser::unpackZone
bool unpackZone(RagTime5Zone &zone, MWAWEntry const &entry, std::vector< unsigned char > &data)
try to unpack a zone
Definition: RagTime5Parser.cxx:2030
RagTime5ParserInternal::ClustListParser::ClustListParser
ClustListParser(RagTime5ClusterManager &clusterManager, int fieldSize, std::string const &zoneName)
constructor
Definition: RagTime5Parser.cxx:157
RagTime5ParserInternal::State::m_zonesList
std::vector< shared_ptr< RagTime5Zone > > m_zonesList
the zone list
Definition: RagTime5Parser.cxx:244
RagTime5Zone::m_level
int m_level
the zone level
Definition: RagTime5StructManager.hxx:110
RagTime5StructManager::Field::T_FieldList
@ T_FieldList
Definition: RagTime5StructManager.hxx:220
RagTime5ClusterManager::Cluster::C_PictureZone
@ C_PictureZone
Definition: RagTime5ClusterManager.hxx:223
RagTime5ClusterManager::ClusterScript::m_scriptComment
Link m_scriptComment
the script comment zone
Definition: RagTime5ClusterManager.hxx:315
RagTime5Parser::readClusterLinkList
bool readClusterLinkList(RagTime5Zone &zone, RagTime5ClusterManager::Link const &link, std::vector< RagTime5StructManager::ZoneLink > &listLinks)
try to read a cluster link zone
Definition: RagTime5Parser.cxx:1239
RagTime5ParserInternal
Internal: the structures of a RagTime5Parser.
Definition: RagTime5Parser.cxx:71
RagTime5StructManager::GObjPropFieldParser
basic parser to read image/main graphic position properties
Definition: RagTime5StructManager.hxx:378
RagTime5ClusterManager::Cluster::C_ColorPattern
@ C_ColorPattern
Definition: RagTime5ClusterManager.hxx:219
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
RagTime5ClusterManager
basic class used to manage RagTime 5/6 zones
Definition: RagTime5ClusterManager.hxx:59
RagTime5ClusterManager::Cluster::C_TextStyles
@ C_TextStyles
Definition: RagTime5ClusterManager.hxx:225
RagTime5ParserInternal::DocInfoFieldParser::~DocInfoFieldParser
virtual ~DocInfoFieldParser()
destructor
Definition: RagTime5Parser.cxx:108
RagTime5Parser::send
bool send(int zoneId, MWAWListenerPtr listener, MWAWPosition const &pos, int partId=0, int part2Id=0)
try to send a cluster zone (mainly unimplemented)
Definition: RagTime5Parser.cxx:2493
RagTime5StyleManager
basic class used to read/store RagTime 5/6 styles
Definition: RagTime5StyleManager.hxx:61
RagTime5Graph.hxx
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
RagTime5Parser::checkClusterList
bool checkClusterList(std::vector< RagTime5StructManager::ZoneLink > const &list)
check a cluster list
Definition: RagTime5Parser.cxx:1131
MWAWSubDocument.hxx
RagTime5ClusterManager.hxx
RagTime5StructManager::FieldParser
virtual class use to parse the field data
Definition: RagTime5StructManager.hxx:308
RagTime5Graph
the main class to read the graphic part of RagTime 56 file
Definition: RagTime5Graph.hxx:80
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:178
RagTime5Parser::m_state
shared_ptr< RagTime5ParserInternal::State > m_state
the state
Definition: RagTime5Parser.hxx:229
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
MWAWParser::getMainListener
MWAWListenerPtr getMainListener()
returns the main listener
Definition: MWAWParser.cxx:108
MWAWParser::setTextListener
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
RagTime5StructManager::Field::m_fileType
long m_fileType
the file type
Definition: RagTime5StructManager.hxx:239
RagTime5Parser::readLongList
bool readLongList(RagTime5ClusterManager::Link const &link, std::vector< long > &list)
try to read/get the list of long of a L_LongList
Definition: RagTime5Parser.cxx:945
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWParagraph.hxx
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:105
RagTime5Parser::readClusterScriptData
bool readClusterScriptData(RagTime5ClusterManager::ClusterScript &cluster)
try to read the script data
Definition: RagTime5Parser.cxx:1560
RagTime5StructManager::Field::m_longValue
long m_longValue[2]
the long value
Definition: RagTime5StructManager.hxx:243
MWAWRSRCParser.hxx
RagTime5ParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: RagTime5Parser.cxx:259
RagTime5ParserInternal::ClustListParser::~ClustListParser
~ClustListParser()
destructor
Definition: RagTime5Parser.cxx:228
RagTime5ClusterManager::ClusterRoot::m_listUnicodeLink
Link m_listUnicodeLink
a link to a list of unknown index+unicode string
Definition: RagTime5ClusterManager.hxx:291
MWAWPosition.hxx
RagTime5StructManager::FieldParser::parseField
virtual bool parseField(Field &field, RagTime5Zone &, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5StructManager.hxx:332
RagTime5Parser::readGraphicCluster
shared_ptr< RagTime5ClusterManager::Cluster > readGraphicCluster(RagTime5Zone &zone, int zoneType)
try to read a graphic cluster (via the graphic manager)
Definition: RagTime5Parser.cxx:370
RagTime5ClusterManager::ClusterRoot::m_linkUnknown
Link m_linkUnknown
other link: scripts and field 6
Definition: RagTime5ClusterManager.hxx:300
RagTime5Parser::readLayoutCluster
shared_ptr< RagTime5ClusterManager::Cluster > readLayoutCluster(RagTime5Zone &zone, int zoneType)
try to read a layout cluster (via the layout manager)
Definition: RagTime5Parser.cxx:375
RagTime5Zone::getKindLastPart
std::string getKindLastPart(bool main=true) const
returns the main type
Definition: RagTime5StructManager.hxx:66
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
RagTime5StructManager::Field::T_Long
@ T_Long
Definition: RagTime5StructManager.hxx:220
RagTime5ClusterManager::Cluster::C_GraphicZone
@ C_GraphicZone
Definition: RagTime5ClusterManager.hxx:223
RagTime5Parser::createZones
bool createZones()
finds the different objects zones
Definition: RagTime5Parser.cxx:503
RagTime5Zone::m_extra
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:136
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
RagTime5ClusterManager::Cluster::m_hiLoEndian
bool m_hiLoEndian
the cluster hiLo endian
Definition: RagTime5ClusterManager.hxx:244
RagTime5ParserInternal::SubDocument::operator!=
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: RagTime5Parser.cxx:303
RagTime5Zone
main zone in a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:49
RagTime5Parser::parse
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: RagTime5Parser.cxx:436
RagTime5ClusterManager::Cluster::C_TextZone
@ C_TextZone
Definition: RagTime5ClusterManager.hxx:223
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
RagTime5ClusterManager::ClusterRoot::m_styleClusterIds
int m_styleClusterIds[8]
the list of style cluster ( graph, units, unitsbis, text, format, unknown, graphcolor,...
Definition: RagTime5ClusterManager.hxx:280
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
RagTime5Parser::readPositions
bool readPositions(int posId, std::vector< long > &listPosition)
try to read a positions zone in data
Definition: RagTime5Parser.cxx:954
RagTime5Zone::getZoneName
std::string getZoneName() const
returns the zone name
Definition: RagTime5StructManager.cxx:1660
RagTime5Parser::readTextCluster
shared_ptr< RagTime5ClusterManager::Cluster > readTextCluster(RagTime5Zone &zone, int zoneType)
try to read a text cluster (via the text manager)
Definition: RagTime5Parser.cxx:395
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
RagTime5ParserInternal::IndexUnicodeParser::IndexUnicodeParser
IndexUnicodeParser(RagTime5Parser &, bool readIndex, std::string const &zoneName)
constructor
Definition: RagTime5Parser.cxx:115
RagTime5ParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: RagTime5Parser.cxx:257
RagTime5Zone::getInput
MWAWInputStreamPtr getInput()
returns the current input
Definition: RagTime5StructManager.hxx:77
RagTime5StructManager::readUnicodeString
static bool readUnicodeString(MWAWInputStreamPtr input, long endPos, librevenge::RVNGString &string)
try to read a unicode string
Definition: RagTime5StructManager.cxx:240
RagTime5StructManager::FieldParser::getZoneName
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5StructManager.hxx:314
RagTime5StructManager::FieldParser::FieldParser
FieldParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:310
MWAWPictMac.hxx
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:142
MWAWDebug.hxx
RagTime5ClusterManager::Cluster::C_GraphicStyles
@ C_GraphicStyles
Definition: RagTime5ClusterManager.hxx:225
RagTime5Zone::m_entriesList
std::vector< MWAWEntry > m_entriesList
the list of original entries
Definition: RagTime5StructManager.hxx:128
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:57
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
RagTime5Parser::RagTime5Layout
friend class RagTime5Layout
Definition: RagTime5Parser.hxx:77
RagTime5ParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: RagTime5Parser.cxx:260
RagTime5ClusterManager::Cluster::C_ColorStyles
@ C_ColorStyles
Definition: RagTime5ClusterManager.hxx:225
RagTime5StyleManager.hxx
RagTime5Parser::getDataZone
shared_ptr< RagTime5Zone > getDataZone(int dataId) const
returns the zone corresponding to a data id (or 0)
Definition: RagTime5Parser.cxx:400
RagTime5ClusterManager::ClusterRoot::m_graphicTypeLink
Link m_graphicTypeLink
the graphic type id
Definition: RagTime5ClusterManager.hxx:286
RagTime5Pipeline
the main class to read the text part of RagTime 56 file
Definition: RagTime5Pipeline.hxx:73
RagTime5Text
the main class to read the text part of RagTime 56 file
Definition: RagTime5Text.hxx:76
RagTime5Parser::init
void init()
inits all internal variables
Definition: RagTime5Parser.cxx:329
RagTime5ClusterManager::Cluster::m_linksList
std::vector< Link > m_linksList
the link list
Definition: RagTime5ClusterManager.hxx:258
RagTime5Parser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: RagTime5Parser.cxx:2406
RagTime5ParserInternal::State
Internal: the state of a RagTime5Parser.
Definition: RagTime5Parser.cxx:234
RagTime5ClusterManager::Cluster::Type
Type
the cluster type
Definition: RagTime5ClusterManager.hxx:218
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
RagTime5Parser::readZoneInfo
bool readZoneInfo()
try to read the main zone info zone and the main cluster(and child)
Definition: RagTime5Parser.cxx:649
RagTime5ClusterManager::Cluster::m_dataLink
Link m_dataLink
the main data link
Definition: RagTime5ClusterManager.hxx:248
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
RagTime5Layout.hxx
RagTime5ClusterManager::Cluster::C_Script
@ C_Script
Definition: RagTime5ClusterManager.hxx:220
RagTime5ParserInternal::IndexUnicodeParser::m_readIndex
bool m_readIndex
a flag to know if we need to read the index
Definition: RagTime5Parser.cxx:145
RagTime5Parser::m_structManager
shared_ptr< RagTime5StructManager > m_structManager
the structure manager
Definition: RagTime5Parser.hxx:246
RagTime5Parser::readZoneData
bool readZoneData(RagTime5Zone &zone)
try to read the zone data
Definition: RagTime5Parser.cxx:731
RagTime5ClusterManager::ClusterRoot
the cluster for root
Definition: RagTime5ClusterManager.hxx:269
RagTime5Parser::getClusterType
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 n...
Definition: RagTime5Parser.cxx:407
RagTime5Parser::m_clusterManager
shared_ptr< RagTime5ClusterManager > m_clusterManager
the cluster manager
Definition: RagTime5Parser.hxx:244
RagTime5ClusterManager::ClusterRoot::m_docInfoLink
Link m_docInfoLink
the doc info link
Definition: RagTime5ClusterManager.hxx:289
MWAWGraphicStyle.hxx
RagTime5Zone::m_idsFlag
int m_idsFlag[3]
the zone flag
Definition: RagTime5StructManager.hxx:126
RagTime5Parser::readScriptComment
bool readScriptComment(RagTime5Zone &zone)
try to read a script comment zone
Definition: RagTime5Parser.cxx:1482
RagTime5ClusterManager::Cluster::m_zoneId
int m_zoneId
the zone id
Definition: RagTime5ClusterManager.hxx:242
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
RagTime5ParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: RagTime5Parser.cxx:291
RagTime5ParserInternal::State::m_zoneInfo
shared_ptr< RagTime5Zone > m_zoneInfo
the zone info zone (ie. the first zone)
Definition: RagTime5Parser.cxx:248
RagTime5ParserInternal::ClustListParser::m_idToNameMap
std::map< int, librevenge::RVNGString > m_idToNameMap
the name
Definition: RagTime5Parser.cxx:218
MWAWTextListener.hxx
RagTime5Zone::addErrorInDebugFile
void addErrorInDebugFile(std::string const &zoneName)
mark a zone as bad
Definition: RagTime5StructManager.cxx:1680
RagTime5ParserInternal::ClustListParser::m_fieldSize
int m_fieldSize
the field size
Definition: RagTime5Parser.cxx:214
RagTime5Parser::RagTime5Text
friend class RagTime5Text
Definition: RagTime5Parser.hxx:80
RagTime5ClusterManager::Cluster::C_ClusterGProp
@ C_ClusterGProp
Definition: RagTime5ClusterManager.hxx:220
RagTime5ParserInternal::DocInfoFieldParser::parseField
virtual bool parseField(RagTime5StructManager::Field &field, RagTime5Zone &zone, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5Parser.cxx:81
RagTime5ClusterManager::Cluster::C_SpreadsheetZone
@ C_SpreadsheetZone
Definition: RagTime5ClusterManager.hxx:223
RagTime5ClusterManager::Cluster::C_Fields
@ C_Fields
Definition: RagTime5ClusterManager.hxx:219
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
RagTime5Parser::readStructData
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
Definition: RagTime5Parser.cxx:1886
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
RagTime5Parser::sendZones
bool sendZones()
try to send the different zones
Definition: RagTime5Parser.cxx:2477
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
RagTime5StructManager
basic class used to store RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:157
MWAWRSRCParserPtr
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
RagTime5Parser::readPipelineCluster
shared_ptr< RagTime5ClusterManager::Cluster > readPipelineCluster(RagTime5Zone &zone, int zoneType)
try to read a pipeline cluster (via the pipeline manager)
Definition: RagTime5Parser.cxx:380
RagTime5Zone::m_ids
int m_ids[3]
the zone id
Definition: RagTime5StructManager.hxx:124
RagTime5ClusterManager::Cluster::C_Empty
@ C_Empty
Definition: RagTime5ClusterManager.hxx:229
RagTime5Parser::m_spreadsheetParser
shared_ptr< RagTime5Spreadsheet > m_spreadsheetParser
the spreadsheet manager
Definition: RagTime5Parser.hxx:239
RagTime5ClusterManager::Cluster::m_nameLink
Link m_nameLink
the name link
Definition: RagTime5ClusterManager.hxx:250
RagTime5Zone::m_variableD
int m_variableD[2]
the content of the zone D if it exists
Definition: RagTime5StructManager.hxx:132
RagTime5ParserInternal::IndexUnicodeParser::m_idToStringMap
std::map< int, librevenge::RVNGString > m_idToStringMap
the data
Definition: RagTime5Parser.cxx:147
RagTime5Parser::m_pipelineParser
shared_ptr< RagTime5Pipeline > m_pipelineParser
the pipeline manager
Definition: RagTime5Parser.hxx:237
RagTime5ParserInternal::ClustListParser::m_linkList
std::vector< RagTime5StructManager::ZoneLink > m_linkList
the list of read cluster
Definition: RagTime5Parser.cxx:216
RagTime5ParserInternal::IndexUnicodeParser
Internal: the helper to read index + unicode string for a RagTime5Parser.
Definition: RagTime5Parser.cxx:113
libmwaw::DebugFile
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
RagTime5Parser::RagTime5Chart
friend class RagTime5Chart
Definition: RagTime5Parser.hxx:75
RagTime5ParserInternal::ClustListParser::operator=
ClustListParser & operator=(ClustListParser &orig)
copy operator, not implemented
RagTime5ClusterManager::Cluster
the cluster data
Definition: RagTime5ClusterManager.hxx:216
MWAWStringStream.hxx
MWAWInputStream.hxx
RagTime5Pipeline.hxx
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:82
RagTime5Parser::getClusterManager
shared_ptr< RagTime5ClusterManager > getClusterManager()
returns the cluster manager
Definition: RagTime5Parser.cxx:350
RagTime5ParserInternal::State::m_zonesEntry
MWAWEntry m_zonesEntry
the main zone entry
Definition: RagTime5Parser.cxx:242
RagTime5Parser::update
bool update(RagTime5Zone &zone)
try to update a zone: create a new input if the zone is stored in different positions,...
Definition: RagTime5Parser.cxx:1978
MWAWFont.hxx
MWAWPictBitmap.hxx
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
RagTime5Parser::RagTime5Spreadsheet
friend class RagTime5Spreadsheet
Definition: RagTime5Parser.hxx:79
RagTime5StructManager::FieldParser::parseHeaderField
virtual bool parseHeaderField(Field &field, RagTime5Zone &, int, libmwaw::DebugStream &f)
parse a header field
Definition: RagTime5StructManager.hxx:326
RagTime5ClusterManager::ClusterScript
the cluster script ( 2/a/4002/400a zone)
Definition: RagTime5ClusterManager.hxx:307
RagTime5Parser::readUnknownClusterCData
bool readUnknownClusterCData(RagTime5ClusterManager::Cluster &cluster)
try to read the unknown clusterC data
Definition: RagTime5Parser.cxx:1618
RagTime5ParserInternal::ClustListParser::parseData
bool parseData(MWAWInputStreamPtr &input, long endPos, RagTime5Zone &, int n, libmwaw::DebugStream &f)
try to parse a data
Definition: RagTime5Parser.cxx:184
RagTime5ParserInternal::ClustListParser::ClustListParser
ClustListParser(ClustListParser &orig)
copy constructor, not implemented
RagTime5ParserInternal::State::m_hasLayout
bool m_hasLayout
a flag to know if the file has some layout
Definition: RagTime5Parser.cxx:256
RagTime5Parser::m_chartParser
shared_ptr< RagTime5Chart > m_chartParser
the chart manager
Definition: RagTime5Parser.hxx:231
RagTime5Parser::readClusterZone
bool readClusterZone(RagTime5Zone &zone, int type=-1)
try to read a cluster zone
Definition: RagTime5Parser.cxx:1146
RagTime5Parser::~RagTime5Parser
virtual ~RagTime5Parser()
destructor
Definition: RagTime5Parser.cxx:325
RagTime5StructManager::Field::m_entry
MWAWEntry m_entry
entry to defined the position of a String or Unstructured data
Definition: RagTime5StructManager.hxx:261
MWAWDocument::MWAW_T_RAGTIME
@ MWAW_T_RAGTIME
RagTime: -Mac v2.1-v3.2: done, -all v5.0-v6.5: incomplete, only try to retrieve the picture/shape/tex...
Definition: MWAWDocument.hxx:144
RagTime5ClusterManager::Cluster::C_UnitStyles
@ C_UnitStyles
Definition: RagTime5ClusterManager.hxx:225
RagTime5Zone::m_hiLoEndian
bool m_hiLoEndian
true if the endian is hilo
Definition: RagTime5StructManager.hxx:122
RagTime5Parser::readDocInfoClusterData
bool readDocInfoClusterData(RagTime5Zone &zone, MWAWEntry const &entry)
try to read the main doc info cluster data
Definition: RagTime5Parser.cxx:1329
RagTime5Parser::readStructZone
bool readStructZone(RagTime5ClusterManager::Cluster &cluster, RagTime5StructManager::FieldParser &parser, int headerSz)
try to read a structured zone
Definition: RagTime5Parser.cxx:1790
RagTime5Parser::m_graphParser
shared_ptr< RagTime5Graph > m_graphParser
the graph manager
Definition: RagTime5Parser.hxx:233
RagTime5ClusterManager::Cluster::C_Layout
@ C_Layout
Definition: RagTime5ClusterManager.hxx:219
RagTime5ClusterManager::ClusterRoot::m_clusterIds
int m_clusterIds[1]
other cluster id (unknown cluster b, )
Definition: RagTime5ClusterManager.hxx:283
RagTime5Parser::m_layoutParser
shared_ptr< RagTime5Layout > m_layoutParser
the layout manager
Definition: RagTime5Parser.hxx:235
RagTime5StructManager::readDataIdList
static bool readDataIdList(MWAWInputStreamPtr input, int n, std::vector< int > &listIds)
try to read n data id
Definition: RagTime5StructManager.cxx:269
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWListenerPtr
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
MWAWParser.hxx
RagTime5StructManager::Field::m_type
Type m_type
the field type
Definition: RagTime5StructManager.hxx:237
RagTime5ParserInternal::State::m_dataIdZoneMap
std::map< int, shared_ptr< RagTime5Zone > > m_dataIdZoneMap
a map: data id->entry (datafork)
Definition: RagTime5Parser.cxx:250
RagTime5StructManager::Field::m_fieldList
std::vector< Field > m_fieldList
the list of field
Definition: RagTime5StructManager.hxx:259
RagTime5ClusterManager::Cluster::m_fieldClusterLink
Link m_fieldClusterLink
the field cluster links (def and pos)
Definition: RagTime5ClusterManager.hxx:252
RagTime5Parser::flushExtra
void flushExtra()
flush unsent zone (debugging function)
Definition: RagTime5Parser.cxx:2522
RagTime5Parser.hxx
RagTime5Parser::RagTime5Pipeline
friend class RagTime5Pipeline
Definition: RagTime5Parser.hxx:78
MWAWSubDocument::m_input
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
RagTime5ParserInternal::ClustListParser
Internal: the helper to read a clustList.
Definition: RagTime5Parser.cxx:155
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
RagTime5Parser::readDocumentVersion
bool readDocumentVersion(RagTime5Zone &zone)
try to read the document version zone
Definition: RagTime5Parser.cxx:2173
RagTime5Parser::findDataZones
bool findDataZones(MWAWEntry const &entry)
try to create the main data zones list
Definition: RagTime5Parser.cxx:2225
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:151
RagTime5Text.hxx
RagTime5ClusterManager::Cluster::C_Root
@ C_Root
Definition: RagTime5ClusterManager.hxx:220
RagTime5Chart
the main class to read the chart part of RagTime 56 file
Definition: RagTime5Chart.hxx:74
RagTime5ClusterManager::Cluster::C_Unknown
@ C_Unknown
Definition: RagTime5ClusterManager.hxx:229
RagTime5ClusterManager::Cluster::m_settingLinks
std::vector< Link > m_settingLinks
the settings links
Definition: RagTime5ClusterManager.hxx:256
RagTime5Parser::readClusterGProp
bool readClusterGProp(RagTime5ClusterManager::Cluster &cluster)
try to read the cluster with contains main graphic object properties
Definition: RagTime5Parser.cxx:1592
MWAWStringStream
internal class used to create a RVNGInputStream from a unsigned char's pointer
Definition: MWAWStringStream.hxx:35
RagTime5Parser::RagTime5ClusterManager
friend class RagTime5ClusterManager
Definition: RagTime5Parser.hxx:81
RagTime5ParserInternal::State::m_idToTypeMap
std::map< int, std::string > m_idToTypeMap
a map id to type string
Definition: RagTime5Parser.cxx:246

Generated on Wed Jun 17 2020 06:30:13 for libmwaw by doxygen 1.8.18