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 
73 class RagTime5Parser final : public MWAWTextParser
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:
88  RagTime5Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
90  ~RagTime5Parser() final;
91 
93  bool checkHeader(MWAWHeader *header, bool strict=false) final;
94 
95  // the main parse function
96  void parse(librevenge::RVNGTextInterface *documentInterface) final;
97 
98 protected:
100  void init();
101 
102  //
103  // interface
104  //
105 
107  std::shared_ptr<RagTime5Zone> getDataZone(int dataId) const;
109  RagTime5ClusterManager::Cluster::Type getClusterType(int zId) const;
111  RagTime5ClusterManager::Cluster::Type getPipelineContainerType(int pipelineId) const;
112 
114  std::shared_ptr<RagTime5ClusterManager> getClusterManager();
116  std::shared_ptr<RagTime5StructManager> getStructManager();
118  std::shared_ptr<RagTime5StyleManager> getStyleManager();
119 
121  std::shared_ptr<RagTime5ClusterManager::Cluster> readChartCluster(RagTime5Zone &zone, int zoneType);
123  std::shared_ptr<RagTime5ClusterManager::Cluster> readGraphicCluster(RagTime5Zone &zone, int zoneType);
125  std::shared_ptr<RagTime5ClusterManager::Cluster> readLayoutCluster(RagTime5Zone &zone, int zoneType);
127  std::shared_ptr<RagTime5ClusterManager::Cluster> readPipelineCluster(RagTime5Zone &zone, int zoneType);
129  std::shared_ptr<RagTime5ClusterManager::Cluster> readPictureCluster(RagTime5Zone &zone, int zoneType);
131  std::shared_ptr<RagTime5ClusterManager::Cluster> readSpreadsheetCluster(RagTime5Zone &zone, int zoneType);
133  std::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);
167  bool readClusterLinkList(RagTime5ClusterManager::Link const &link,
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);
187  bool readClusterRootData(RagTime5ClusterManager::ClusterRoot &cluster);
189  bool readClusterFieldsData(RagTime5ClusterManager::Cluster &cluster);
191  bool readDocInfoClusterData(RagTime5Zone &zone, MWAWEntry const &entry);
193  bool readClusterScriptData(RagTime5ClusterManager::ClusterScript &cluster);
195  bool readScriptComment(RagTime5Zone &zone);
197  bool readClusterGProp(RagTime5ClusterManager::Cluster &cluster);
199  bool readUnknownClusterCData(RagTime5ClusterManager::Cluster &cluster);
200 
202  bool readStructZone(RagTime5ClusterManager::Cluster &cluster, RagTime5StructManager::FieldParser &parser, int headerSz);
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);
210  bool readListZone(RagTime5ClusterManager::Link const &link, RagTime5StructManager::DataParser &parser);
212  bool readFixedSizeZone(RagTime5ClusterManager::Link const &link, std::string const &name);
214  bool readFixedSizeZone(RagTime5ClusterManager::Link const &link, RagTime5StructManager::DataParser &parser);
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  std::shared_ptr<RagTime5ParserInternal::State> m_state;
231  std::shared_ptr<RagTime5Chart> m_chartParser;
233  std::shared_ptr<RagTime5Graph> m_graphParser;
235  std::shared_ptr<RagTime5Layout> m_layoutParser;
241  std::shared_ptr<RagTime5Text> m_textParser;
242 
249 };
250 #endif
251 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
RagTime5ParserInternal::State::State
State()
constructor
Definition: RagTime5Parser.cxx:242
MWAWTextListenerPtr
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:565
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:148
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:549
RagTime5Parser::m_pipelineParser
std::shared_ptr< RagTime5Pipeline > m_pipelineParser
the pipeline manager
Definition: RagTime5Parser.hxx:237
MWAWTextParser
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:299
RagTime5Parser::RagTime5StyleManager
friend class RagTime5StyleManager
Definition: RagTime5Parser.hxx:83
RagTime5Parser::newPage
void newPage(int number)
adds a new page
Definition: RagTime5Parser.cxx:396
RagTime5Zone::setInput
void setInput(MWAWInputStreamPtr const &input)
reset the current input
Definition: RagTime5StructManager.hxx:96
RagTime5ParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: RagTime5Parser.cxx:274
RagTime5ParserInternal::ClustListParser::parseData
bool parseData(MWAWInputStreamPtr &input, long endPos, RagTime5Zone &, int n, libmwaw::DebugStream &f) final
try to parse a data
Definition: RagTime5Parser.cxx:190
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:808
RagTime5Parser::getClusterManager
std::shared_ptr< RagTime5ClusterManager > getClusterManager()
returns the cluster manager
Definition: RagTime5Parser.cxx:326
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:266
RagTime5Parser::getStyleManager
std::shared_ptr< RagTime5StyleManager > getStyleManager()
returns the style manager
Definition: RagTime5Parser.cxx:336
RagTime5Parser::readClusterRootData
bool readClusterRootData(RagTime5ClusterManager::ClusterRoot &cluster)
try to read the main cluster
Definition: RagTime5Parser.cxx:930
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
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:388
RagTime5Parser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: RagTime5Parser.cxx:2361
RagTime5Zone::setAsciiFileName
void setAsciiFileName(std::string const &name)
defines the ascii name
Definition: RagTime5StructManager.hxx:114
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:864
RagTime5ClusterManager::Cluster::m_conditionFormulaLinks
std::vector< Link > m_conditionFormulaLinks
the conditions formula links
Definition: RagTime5ClusterManager.hxx:269
RagTime5ParserInternal::DocInfoFieldParser::DocInfoFieldParser
DocInfoFieldParser(RagTime5Parser &parser)
constructor
Definition: RagTime5Parser.cxx:74
RagTime5Zone::m_defPosition
long m_defPosition
the position of the definition in the main zones
Definition: RagTime5StructManager.hxx:128
RagTime5ClusterManager::Cluster::C_FormatStyles
@ C_FormatStyles
Definition: RagTime5ClusterManager.hxx:230
RagTime5Parser::readLayoutCluster
std::shared_ptr< RagTime5ClusterManager::Cluster > readLayoutCluster(RagTime5Zone &zone, int zoneType)
try to read a layout cluster (via the layout manager)
Definition: RagTime5Parser.cxx:351
RagTime5ParserInternal::DocInfoFieldParser
Internal: the helper to read doc info parse.
Definition: RagTime5Parser.cxx:72
RagTime5Parser::readClusterFieldsData
bool readClusterFieldsData(RagTime5ClusterManager::Cluster &cluster)
try to read the field data
Definition: RagTime5Parser.cxx:1277
RagTime5ClusterManager::Cluster::C_Pipeline
@ C_Pipeline
Definition: RagTime5ClusterManager.hxx:224
RagTime5ParserInternal::ClustListParser::getIdList
std::vector< int > getIdList() const
returns the not null list dataId list
Definition: RagTime5Parser.cxx:174
RagTime5StructManager::DataParser::parseData
virtual bool parseData(MWAWInputStreamPtr &, long, RagTime5Zone &, int, libmwaw::DebugStream &)
parse a data
Definition: RagTime5StructManager.hxx:405
RagTime5ParserInternal::ClustListParser::m_clusterManager
RagTime5ClusterManager & m_clusterManager
the main zone manager
Definition: RagTime5Parser.cxx:227
RagTime5ClusterManager::ClusterRoot::m_listClusterLink
Link m_listClusterLink[2]
first the main cluster link, second list of field definition link
Definition: RagTime5ClusterManager.hxx:319
RagTime5ClusterManager::Cluster::C_ClusterC
@ C_ClusterC
Definition: RagTime5ClusterManager.hxx:232
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:130
RagTime5Parser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: RagTime5Parser.cxx:444
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:238
RagTime5Spreadsheet.hxx
RagTime5Parser
the main class to read a RagTime v5 file
Definition: RagTime5Parser.hxx:74
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
RagTime5Parser::readSpreadsheetCluster
std::shared_ptr< RagTime5ClusterManager::Cluster > readSpreadsheetCluster(RagTime5Zone &zone, int zoneType)
try to read a spreadsheet cluster (via the spreadsheet manager)
Definition: RagTime5Parser.cxx:366
RagTime5Zone::ascii
libmwaw::DebugFile & ascii()
returns the current ascii file
Definition: RagTime5StructManager.hxx:107
RagTime5Parser::readListZone
bool readListZone(RagTime5ClusterManager::Link const &link)
try to read a list zone
Definition: RagTime5Parser.cxx:1608
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:375
RagTime5StructManager::Field
a field of RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:235
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
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:223
RagTime5ClusterManager::ClusterRoot::m_listClusterId
int m_listClusterId
the cluster list id
Definition: RagTime5ClusterManager.hxx:315
MWAWPrinter.hxx
RagTime5ParserInternal::State::m_pageZonesIdMap
std::map< int, std::vector< int > > m_pageZonesIdMap
a map: page->main zone id
Definition: RagTime5Parser.cxx:269
RagTime5ClusterManager::Cluster::C_ChartZone
@ C_ChartZone
Definition: RagTime5ClusterManager.hxx:228
RagTime5ParserInternal::State::m_sendZoneSet
std::set< int > m_sendZoneSet
a set used to avoid looping when sending zone
Definition: RagTime5Parser.cxx:271
RagTime5Zone::m_entry
MWAWEntry m_entry
the zone entry
Definition: RagTime5StructManager.hxx:132
RagTime5StructManager::DataParser::getZoneName
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5StructManager.hxx:393
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:873
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:184
RagTime5StructManager::DataParser
virtual class use to parse the unstructured data
Definition: RagTime5StructManager.hxx:384
RagTime5Parser::readPictureCluster
std::shared_ptr< RagTime5ClusterManager::Cluster > readPictureCluster(RagTime5Zone &zone, int zoneType)
try to read a picture cluster (via the graphic manager)
Definition: RagTime5Parser.cxx:361
RagTime5StructManager::DataParser::DataParser
DataParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:386
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:1681
RagTime5Parser::readUnicodeString
bool readUnicodeString(RagTime5Zone &zone, std::string const &what="")
try to read a unicode string zone
Definition: RagTime5Parser.cxx:838
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
RagTime5Parser::unpackZone
bool unpackZone(RagTime5Zone &zone, MWAWEntry const &entry, std::vector< unsigned char > &data)
try to unpack a zone
Definition: RagTime5Parser.cxx:1985
RagTime5Parser::readChartCluster
std::shared_ptr< RagTime5ClusterManager::Cluster > readChartCluster(RagTime5Zone &zone, int zoneType)
try to read a chart cluster (via the spreadsheet manager)
Definition: RagTime5Parser.cxx:341
RagTime5ParserInternal::ClustListParser::ClustListParser
ClustListParser(RagTime5ClusterManager &clusterManager, int fieldSize, std::string const &zoneName)
constructor
Definition: RagTime5Parser.cxx:159
RagTime5Zone::m_level
int m_level
the zone level
Definition: RagTime5StructManager.hxx:124
RagTime5StructManager::Field::T_FieldList
@ T_FieldList
Definition: RagTime5StructManager.hxx:237
RagTime5ClusterManager::Cluster::C_PictureZone
@ C_PictureZone
Definition: RagTime5ClusterManager.hxx:228
RagTime5ClusterManager::ClusterScript::m_scriptComment
Link m_scriptComment
the script comment zone
Definition: RagTime5ClusterManager.hxx:340
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:1200
RagTime5Parser::getDataZone
std::shared_ptr< RagTime5Zone > getDataZone(int dataId) const
returns the zone corresponding to a data id (or 0)
Definition: RagTime5Parser.cxx:376
RagTime5ParserInternal
Internal: the structures of a RagTime5Parser.
Definition: RagTime5Parser.cxx:70
RagTime5StructManager::GObjPropFieldParser
basic parser to read image/main graphic position properties
Definition: RagTime5StructManager.hxx:418
RagTime5ParserInternal::DocInfoFieldParser::~DocInfoFieldParser
~DocInfoFieldParser() final
destructor
Definition: RagTime5Parser.cxx:108
RagTime5ClusterManager::Cluster::C_ColorPattern
@ C_ColorPattern
Definition: RagTime5ClusterManager.hxx:224
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
RagTime5Zone::m_childIdToZoneMap
std::map< int, std::shared_ptr< RagTime5Zone > > m_childIdToZoneMap
the child zones
Definition: RagTime5StructManager.hxx:144
RagTime5ClusterManager::Cluster::C_TextStyles
@ C_TextStyles
Definition: RagTime5ClusterManager.hxx:230
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:2448
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:1093
RagTime5ClusterManager.hxx
RagTime5StructManager::FieldParser
virtual class use to parse the field data
Definition: RagTime5StructManager.hxx:341
RagTime5Graph
the main class to read the graphic part of RagTime 56 file
Definition: RagTime5Graph.hxx:80
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
RagTime5Parser::getStructManager
std::shared_ptr< RagTime5StructManager > getStructManager()
returns the structure manager
Definition: RagTime5Parser.cxx:331
MWAWParser::getMainListener
MWAWListenerPtr getMainListener()
returns the main listener
Definition: MWAWParser.cxx:120
MWAWParser::setTextListener
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
RagTime5StructManager::Field::m_fileType
long m_fileType
the file type
Definition: RagTime5StructManager.hxx:269
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:913
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:113
RagTime5Parser::readClusterScriptData
bool readClusterScriptData(RagTime5ClusterManager::ClusterScript &cluster)
try to read the script data
Definition: RagTime5Parser.cxx:1518
RagTime5StructManager::Field::m_longValue
long m_longValue[2]
the long value
Definition: RagTime5StructManager.hxx:273
MWAWRSRCParser.hxx
RagTime5ParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: RagTime5Parser.cxx:276
RagTime5ClusterManager::ClusterRoot::m_listUnicodeLink
Link m_listUnicodeLink
a link to a list of unknown index+unicode string
Definition: RagTime5ClusterManager.hxx:313
MWAWPosition.hxx
RagTime5ParserInternal::ClustListParser::~ClustListParser
~ClustListParser() final
destructor
Definition: RagTime5Parser.cxx:234
RagTime5Parser::m_chartParser
std::shared_ptr< RagTime5Chart > m_chartParser
the chart manager
Definition: RagTime5Parser.hxx:231
RagTime5StructManager::FieldParser::parseField
virtual bool parseField(Field &field, RagTime5Zone &, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5StructManager.hxx:369
RagTime5ClusterManager::ClusterRoot::m_linkUnknown
Link m_linkUnknown
other link: scripts and field 6
Definition: RagTime5ClusterManager.hxx:322
RagTime5Zone::getKindLastPart
std::string getKindLastPart(bool main=true) const
returns the main type
Definition: RagTime5StructManager.hxx:80
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:237
RagTime5ClusterManager::Cluster::C_GraphicZone
@ C_GraphicZone
Definition: RagTime5ClusterManager.hxx:228
RagTime5Parser::createZones
bool createZones()
finds the different objects zones
Definition: RagTime5Parser.cxx:479
RagTime5Zone::m_extra
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:150
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:66
RagTime5ClusterManager::Cluster::m_hiLoEndian
bool m_hiLoEndian
the cluster hiLo endian
Definition: RagTime5ClusterManager.hxx:259
RagTime5ParserInternal::State::m_dataIdZoneMap
std::map< int, std::shared_ptr< RagTime5Zone > > m_dataIdZoneMap
a map: data id->entry (datafork)
Definition: RagTime5Parser.cxx:267
RagTime5Zone
main zone in a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:49
RagTime5ClusterManager::Cluster::C_TextZone
@ C_TextZone
Definition: RagTime5ClusterManager.hxx:228
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:302
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:559
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:92
RagTime5Parser::readPositions
bool readPositions(int posId, std::vector< long > &listPosition)
try to read a positions zone in data
Definition: RagTime5Parser.cxx:922
RagTime5Zone::getZoneName
std::string getZoneName() const
returns the zone name
Definition: RagTime5StructManager.cxx:1648
RagTime5Parser::m_structManager
std::shared_ptr< RagTime5StructManager > m_structManager
the structure manager
Definition: RagTime5Parser.hxx:246
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
RagTime5Parser::m_state
std::shared_ptr< RagTime5ParserInternal::State > m_state
the state
Definition: RagTime5Parser.hxx:229
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
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:274
RagTime5Zone::getInput
MWAWInputStreamPtr getInput()
returns the current input
Definition: RagTime5StructManager.hxx:91
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:351
RagTime5StructManager::FieldParser::FieldParser
FieldParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:343
MWAWPictMac.hxx
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
RagTime5ClusterManager::Cluster::C_GraphicStyles
@ C_GraphicStyles
Definition: RagTime5ClusterManager.hxx:230
RagTime5Zone::m_entriesList
std::vector< MWAWEntry > m_entriesList
the list of original entries
Definition: RagTime5StructManager.hxx:142
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:82
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:71
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
RagTime5Parser::m_styleManager
std::shared_ptr< RagTime5StyleManager > m_styleManager
the style manager
Definition: RagTime5Parser.hxx:248
RagTime5Parser::RagTime5Layout
friend class RagTime5Layout
Definition: RagTime5Parser.hxx:77
RagTime5ParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: RagTime5Parser.cxx:277
RagTime5ClusterManager::Cluster::C_ColorStyles
@ C_ColorStyles
Definition: RagTime5ClusterManager.hxx:230
RagTime5StyleManager.hxx
RagTime5ParserInternal::State::m_zonesList
std::vector< std::shared_ptr< RagTime5Zone > > m_zonesList
the zone list
Definition: RagTime5Parser.cxx:261
RagTime5ClusterManager::ClusterRoot::m_graphicTypeLink
Link m_graphicTypeLink
the graphic type id
Definition: RagTime5ClusterManager.hxx:308
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:305
RagTime5ClusterManager::Cluster::m_linksList
std::vector< Link > m_linksList
the link list
Definition: RagTime5ClusterManager.hxx:273
RagTime5ParserInternal::State
Internal: the state of a RagTime5Parser.
Definition: RagTime5Parser.cxx:240
RagTime5ClusterManager::Cluster::Type
Type
the cluster type
Definition: RagTime5ClusterManager.hxx:223
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
RagTime5Parser::readZoneInfo
bool readZoneInfo()
try to read the main zone info zone and the main cluster(and child)
Definition: RagTime5Parser.cxx:619
RagTime5Parser::readGraphicCluster
std::shared_ptr< RagTime5ClusterManager::Cluster > readGraphicCluster(RagTime5Zone &zone, int zoneType)
try to read a graphic cluster (via the graphic manager)
Definition: RagTime5Parser.cxx:346
RagTime5ClusterManager::Cluster::m_dataLink
Link m_dataLink
the main data link
Definition: RagTime5ClusterManager.hxx:263
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:87
RagTime5ParserInternal::IndexUnicodeParser::~IndexUnicodeParser
~IndexUnicodeParser() final
destructor
Definition: RagTime5Parser.cxx:152
RagTime5Layout.hxx
RagTime5ClusterManager::Cluster::C_Script
@ C_Script
Definition: RagTime5ClusterManager.hxx:225
RagTime5ParserInternal::IndexUnicodeParser::m_readIndex
bool m_readIndex
a flag to know if we need to read the index
Definition: RagTime5Parser.cxx:147
RagTime5Parser::m_textParser
std::shared_ptr< RagTime5Text > m_textParser
the text manager
Definition: RagTime5Parser.hxx:241
RagTime5Parser::readZoneData
bool readZoneData(RagTime5Zone &zone)
try to read the zone data
Definition: RagTime5Parser.cxx:700
RagTime5ClusterManager::ClusterRoot
the cluster for root
Definition: RagTime5ClusterManager.hxx:284
RagTime5Parser::RagTime5Parser
RagTime5Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: RagTime5Parser.cxx:286
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:383
RagTime5ClusterManager::ClusterRoot::m_docInfoLink
Link m_docInfoLink
the doc info link
Definition: RagTime5ClusterManager.hxx:311
MWAWGraphicStyle.hxx
RagTime5Parser::readScriptComment
bool readScriptComment(RagTime5Zone &zone)
try to read a script comment zone
Definition: RagTime5Parser.cxx:1441
RagTime5ClusterManager::Cluster::m_zoneId
int m_zoneId
the zone id
Definition: RagTime5ClusterManager.hxx:257
RagTime5Parser::m_spreadsheetParser
std::shared_ptr< RagTime5Spreadsheet > m_spreadsheetParser
the spreadsheet manager
Definition: RagTime5Parser.hxx:239
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
RagTime5ParserInternal::ClustListParser::m_idToNameMap
std::map< int, librevenge::RVNGString > m_idToNameMap
the name
Definition: RagTime5Parser.cxx:224
MWAWTextListener.hxx
Defines MWAWTextListener: the libmwaw word processor listener.
RagTime5Zone::addErrorInDebugFile
void addErrorInDebugFile(std::string const &zoneName)
mark a zone as bad
Definition: RagTime5StructManager.cxx:1668
RagTime5ParserInternal::ClustListParser::m_fieldSize
int m_fieldSize
the field size
Definition: RagTime5Parser.cxx:220
RagTime5Parser::RagTime5Text
friend class RagTime5Text
Definition: RagTime5Parser.hxx:80
RagTime5ClusterManager::Cluster::C_ClusterGProp
@ C_ClusterGProp
Definition: RagTime5ClusterManager.hxx:225
RagTime5Parser::m_layoutParser
std::shared_ptr< RagTime5Layout > m_layoutParser
the layout manager
Definition: RagTime5Parser.hxx:235
RagTime5Parser::m_clusterManager
std::shared_ptr< RagTime5ClusterManager > m_clusterManager
the cluster manager
Definition: RagTime5Parser.hxx:244
RagTime5ClusterManager::Cluster::C_SpreadsheetZone
@ C_SpreadsheetZone
Definition: RagTime5ClusterManager.hxx:228
RagTime5ClusterManager::Cluster::C_Fields
@ C_Fields
Definition: RagTime5ClusterManager.hxx:224
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:1841
RagTime5Parser::sendZones
bool sendZones()
try to send the different zones
Definition: RagTime5Parser.cxx:2432
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:98
RagTime5StructManager
basic class used to store RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:171
RagTime5Zone::m_ids
int m_ids[3]
the zone id
Definition: RagTime5StructManager.hxx:138
RagTime5ClusterManager::Cluster::C_Empty
@ C_Empty
Definition: RagTime5ClusterManager.hxx:234
RagTime5ClusterManager::Cluster::m_nameLink
Link m_nameLink
the name link
Definition: RagTime5ClusterManager.hxx:265
RagTime5ParserInternal::State::m_zoneInfo
std::shared_ptr< RagTime5Zone > m_zoneInfo
the zone info zone (ie. the first zone)
Definition: RagTime5Parser.cxx:265
RagTime5ParserInternal::DocInfoFieldParser::parseField
bool parseField(RagTime5StructManager::Field &field, RagTime5Zone &zone, int, libmwaw::DebugStream &f) final
parse a field
Definition: RagTime5Parser.cxx:82
RagTime5Parser::m_graphParser
std::shared_ptr< RagTime5Graph > m_graphParser
the graph manager
Definition: RagTime5Parser.hxx:233
RagTime5ParserInternal::IndexUnicodeParser::m_idToStringMap
std::map< int, librevenge::RVNGString > m_idToStringMap
the data
Definition: RagTime5Parser.cxx:149
RagTime5ParserInternal::IndexUnicodeParser::parseData
bool parseData(MWAWInputStreamPtr &input, long endPos, RagTime5Zone &, int n, libmwaw::DebugStream &f) final
try to parse a data
Definition: RagTime5Parser.cxx:124
RagTime5ParserInternal::ClustListParser::m_linkList
std::vector< RagTime5StructManager::ZoneLink > m_linkList
the list of read cluster
Definition: RagTime5Parser.cxx:222
RagTime5ParserInternal::IndexUnicodeParser
Internal: the helper to read index + unicode string for a RagTime5Parser.
Definition: RagTime5Parser.cxx:113
RagTime5Parser::~RagTime5Parser
~RagTime5Parser() final
destructor
Definition: RagTime5Parser.cxx:301
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 ximplemented
RagTime5ClusterManager::Cluster
the cluster data
Definition: RagTime5ClusterManager.hxx:221
libmwaw
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:51
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:84
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:551
RagTime5ParserInternal::State::m_zonesEntry
MWAWEntry m_zonesEntry
the main zone entry
Definition: RagTime5Parser.cxx:259
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:1933
MWAWFont.hxx
librevenge
Definition: MWAWDocument.hxx:57
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:211
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:363
RagTime5ClusterManager::ClusterScript
the cluster script ( 2/a/4002/400a zone)
Definition: RagTime5ClusterManager.hxx:329
RagTime5Parser::readUnknownClusterCData
bool readUnknownClusterCData(RagTime5ClusterManager::Cluster &cluster)
try to read the unknown clusterC data
Definition: RagTime5Parser.cxx:1574
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:273
RagTime5Parser::readClusterZone
bool readClusterZone(RagTime5Zone &zone, int type=-1)
try to read a cluster zone
Definition: RagTime5Parser.cxx:1108
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:230
RagTime5Zone::m_hiLoEndian
bool m_hiLoEndian
true if the endian is hilo
Definition: RagTime5StructManager.hxx:136
RagTime5Parser::readDocInfoClusterData
bool readDocInfoClusterData(RagTime5Zone &zone, MWAWEntry const &entry)
try to read the main doc info cluster data
Definition: RagTime5Parser.cxx:1288
RagTime5Parser::readStructZone
bool readStructZone(RagTime5ClusterManager::Cluster &cluster, RagTime5StructManager::FieldParser &parser, int headerSz)
try to read a structured zone
Definition: RagTime5Parser.cxx:1745
RagTime5Parser::readTextCluster
std::shared_ptr< RagTime5ClusterManager::Cluster > readTextCluster(RagTime5Zone &zone, int zoneType)
try to read a text cluster (via the text manager)
Definition: RagTime5Parser.cxx:371
RagTime5ClusterManager::Cluster::C_Layout
@ C_Layout
Definition: RagTime5ClusterManager.hxx:224
RagTime5ClusterManager::ClusterRoot::m_clusterIds
int m_clusterIds[1]
other cluster id (unknown cluster b, )
Definition: RagTime5ClusterManager.hxx:305
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
MWAWParser.hxx
RagTime5Parser::readPipelineCluster
std::shared_ptr< RagTime5ClusterManager::Cluster > readPipelineCluster(RagTime5Zone &zone, int zoneType)
try to read a pipeline cluster (via the pipeline manager)
Definition: RagTime5Parser.cxx:356
RagTime5StructManager::Field::m_type
Type m_type
the field type
Definition: RagTime5StructManager.hxx:267
RagTime5ClusterManager::Cluster::m_fieldClusterLink
Link m_fieldClusterLink
the field cluster links (def and pos)
Definition: RagTime5ClusterManager.hxx:267
RagTime5Parser::flushExtra
void flushExtra()
flush unsent zone (debugging function)
Definition: RagTime5Parser.cxx:2477
RagTime5Parser.hxx
RagTime5Parser::RagTime5Pipeline
friend class RagTime5Pipeline
Definition: RagTime5Parser.hxx:78
RagTime5ParserInternal::ClustListParser
Internal: the helper to read a clustList.
Definition: RagTime5Parser.cxx:157
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:98
RagTime5Parser::readDocumentVersion
bool readDocumentVersion(RagTime5Zone &zone)
try to read the document version zone
Definition: RagTime5Parser.cxx:2128
RagTime5Parser::findDataZones
bool findDataZones(MWAWEntry const &entry)
try to create the main data zones list
Definition: RagTime5Parser.cxx:2180
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
RagTime5Text.hxx
RagTime5ClusterManager::Cluster::C_Root
@ C_Root
Definition: RagTime5ClusterManager.hxx:225
RagTime5Chart
the main class to read the chart part of RagTime 56 file
Definition: RagTime5Chart.hxx:74
RagTime5Parser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: RagTime5Parser.cxx:412
RagTime5ClusterManager::Cluster::C_Unknown
@ C_Unknown
Definition: RagTime5ClusterManager.hxx:234
RagTime5ClusterManager::Cluster::m_settingLinks
std::vector< Link > m_settingLinks
the settings links
Definition: RagTime5ClusterManager.hxx:271
RagTime5Parser::readClusterGProp
bool readClusterGProp(RagTime5ClusterManager::Cluster &cluster)
try to read the cluster with contains main graphic object properties
Definition: RagTime5Parser.cxx:1549
MWAWStringStream
internal class used to create a RVNGInputStream from a unsigned char's pointer
Definition: MWAWStringStream.hxx:37
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:263
RagTime5Parser::SubDocument
friend class RagTime5ParserInternal::SubDocument
Definition: RagTime5Parser.hxx:84

Generated on Sun Nov 12 2023 11:59:12 for libmwaw by doxygen 1.8.20