RagTime5ClusterManager.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_CLUSTER_MANAGER
35 # define RAG_TIME_5_CLUSTER_MANAGER
36 
37 #include <map>
38 #include <ostream>
39 #include <sstream>
40 #include <string>
41 #include <vector>
42 
43 #include "libmwaw_internal.hxx"
44 #include "MWAWDebug.hxx"
45 #include "MWAWEntry.hxx"
46 
48 
49 class RagTime5Parser;
51 
53 {
54 struct State;
55 }
56 
59 {
60 public:
61  struct Link;
62 
63  struct Cluster;
64  struct ClusterRoot;
65  struct ClusterParser;
66 
67  friend struct ClusterParser;
68 
70  explicit RagTime5ClusterManager(RagTime5Parser &parser);
73 
75  bool sendClusterMainList();
76 
78  bool readCluster(RagTime5Zone &zone, ClusterParser &parser, bool warnForUnparsed=true);
80  bool readCluster(RagTime5Zone &zone, shared_ptr<Cluster> &cluster, int type=-1);
82  bool readClusterMainList(ClusterRoot &root, std::vector<int> &list, std::vector<int> const &clusterIdList);
83 
87  bool readFieldClusters(Link const &link);
89  bool readUnknownClusterC(Link const &link);
93  int getClusterType(RagTime5Zone &zone, int fileType);
95  bool getClusterBasicHeaderInfo(RagTime5Zone &zone, long &N, long &fSz, long &debHeaderPos);
96 
97  // low level
98 
100  bool readFieldHeader(RagTime5Zone &zone, long endPos, std::string const &headerName, long &endDataPos, long expectedLVal=-99999);
102  std::string getClusterName(int id);
103 
105  struct Link {
112  L_Unknown
113  };
115  explicit Link(Type type=L_Unknown) : m_type(type), m_name(""), m_ids(), m_N(0), m_fieldSize(0), m_longList()
116  {
117  for (int i=0; i<2; ++i)
118  m_fileType[i]=0;
119  }
121  bool empty() const
122  {
123  if (m_type==L_LongList && !m_longList.empty())
124  return false;
125  for (size_t i=0; i<m_ids.size(); ++i)
126  if (m_ids[i]>0) return false;
127  return true;
128  }
130  std::string getZoneName() const
131  {
132  switch (m_type) {
133  case L_ClusterLink:
134  return "clustLink";
135  case L_LinkDef:
136  return "linkDef";
137  case L_LongList:
138  if (!m_name.empty())
139  return m_name;
140  else {
141  std::stringstream s;
142  s << "longList" << m_fieldSize;
143  return s.str();
144  }
145  case L_UnicodeList:
146  return "unicodeListLink";
147  case L_UnknownClusterC:
148  return "unknownClusterC";
149  case L_FieldsList:
150  if (!m_name.empty())
151  return m_name;
152  return "fieldsList[unkn]";
153  case L_List:
154  if (!m_name.empty())
155  return m_name;
156  break;
157  case L_Unknown:
158 #if !defined(__clang__)
159  default:
160 #endif
161  break;
162  }
163  std::stringstream s;
164  if (m_type==L_List)
165  s << "ListZone";
166  else
167  s << "FixZone";
168  s << std::hex << m_fileType[0] << "_" << m_fileType[1] << std::dec;
169  if (m_fieldSize)
170  s << "_" << m_fieldSize;
171  s << "A";
172  return s.str();
173  }
175  friend std::ostream &operator<<(std::ostream &o, Link const &z)
176  {
177  if (z.empty()) return o;
178  o << z.getZoneName() << ":";
179  size_t numLinks=z.m_ids.size();
180  if (numLinks>1) o << "[";
181  for (size_t i=0; i<numLinks; ++i) {
182  if (z.m_ids[i]<=0)
183  o << "_";
184  else
185  o << "data" << z.m_ids[i] << "A";
186  if (i+1!=numLinks) o << ",";
187  }
188  if (numLinks>1) o << "]";
189  if (z.m_fieldSize&0x8000)
190  o << "[" << std::hex << z.m_fieldSize << std::dec << ":" << z.m_N << "]";
191  else
192  o << "[" << z.m_fieldSize << ":" << z.m_N << "]";
193  return o;
194  }
198  std::string m_name;
200  std::vector<int> m_ids;
202  int m_N;
206  long m_fileType[2];
208  std::vector<long> m_longList;
209  };
210 
212  // cluster classes
214 
216  struct Cluster {
218  enum Type {
221 
222  // the main zones
224  // the styles
226  // unknown clusters
228 
230  };
232  explicit Cluster(Type type) : m_type(type), m_zoneId(0), m_hiLoEndian(true), m_name(""),
235  {
236  }
238  virtual ~Cluster();
242  int m_zoneId;
246  librevenge::RVNGString m_name;
254  std::vector<Link> m_conditionFormulaLinks;
256  std::vector<Link> m_settingLinks;
258  std::vector<Link> m_linksList;
260  std::vector<int> m_clusterIdsList;
262  bool m_isSent;
263  };
264 
266  Cluster::Type getClusterType(int zId) const;
267 
269  struct ClusterRoot : public Cluster {
273  {
274  for (int i=0; i<8; ++i) m_styleClusterIds[i]=0;
275  for (int i=0; i<1; ++i) m_clusterIds[i]=0;
276  }
278  virtual ~ClusterRoot();
281 
283  int m_clusterIds[1];
284 
287 
298 
301 
303  librevenge::RVNGString m_fileName;
304  };
305 
307  struct ClusterScript : public Cluster {
310  {
311  }
313  virtual ~ClusterScript();
317  librevenge::RVNGString m_scriptName;
318  };
319 
321  // parser class
323 
325  struct ClusterParser {
327  ClusterParser(RagTime5ClusterManager &parser, int type, std::string const &zoneName) :
328  m_parser(parser), m_type(type), m_hiLoEndian(true), m_name(zoneName), m_dataId(0), m_link()
329  {
330  }
332  virtual ~ClusterParser();
334  virtual shared_ptr<Cluster> getCluster()=0;
336  virtual std::string getZoneName() const
337  {
338  return m_name;
339  }
341  virtual std::string getZoneName(int n, int m=-1) const
342  {
343  std::stringstream s;
344  s << m_name << "-" << n;
345  if (m>=0)
346  s << "-B" << m;
347  return s.str();
348  }
350  virtual void startZone()
351  {
352  }
354  virtual bool parseZone(MWAWInputStreamPtr &/*input*/, long /*fSz*/, int /*N*/, int /*flag*/, libmwaw::DebugStream &/*f*/)
355  {
356  return false;
357  }
359  virtual void endZone()
360  {
361  }
363  virtual bool parseField(RagTime5StructManager::Field const &/*field*/, int /*m*/, libmwaw::DebugStream &/*f*/)
364  {
365  return false;
366  }
369  virtual int getNewZoneToParse()
370  {
371  return -1;
372  }
373  //
374  // some tools
375  //
376 
378  bool isANameHeader(long N) const
379  {
380  return (m_hiLoEndian && N==int(0x80000000)) || (!m_hiLoEndian && N==0x8000);
381  }
382 
384  bool readLinkHeader(MWAWInputStreamPtr &input, long fSz, Link &link, long(&values)[4], std::string &message);
386  std::string getClusterName(int id);
390  int m_type;
394  std::string m_name;
396  int m_dataId;
399  private:
400  explicit ClusterParser(ClusterParser const &orig);
402  };
403 protected:
405  shared_ptr<RagTime5ClusterManagerInternal::State> m_state;
409  shared_ptr<RagTime5StructManager> m_structManager;
410 private:
413 };
414 
415 #endif
416 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
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
RagTime5ClusterManagerInternal::ClusterInformation::m_fileType
int m_fileType
the cluster file type
Definition: RagTime5ClusterManager.cxx:126
RagTime5StructManager::Field::T_Unicode
@ T_Unicode
Definition: RagTime5StructManager.hxx:221
RagTime5ClusterManager::getClusterBasicHeaderInfo
bool getClusterBasicHeaderInfo(RagTime5Zone &zone, long &N, long &fSz, long &debHeaderPos)
try to return basic information about the header cluster's zone
Definition: RagTime5ClusterManager.cxx:2122
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
RagTime5ClusterManagerInternal::ClusterInformation::operator<<
friend std::ostream & operator<<(std::ostream &o, ClusterInformation const &info)
operator<<
Definition: RagTime5ClusterManager.cxx:57
RagTime5ClusterManager::ClusterParser::getZoneName
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5ClusterManager.hxx:336
RagTime5ClusterManagerInternal::State::m_idToClusterMap
std::map< int, shared_ptr< RagTime5ClusterManager::Cluster > > m_idToClusterMap
map id to cluster map
Definition: RagTime5ClusterManager.cxx:139
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
RagTime5ClusterManager::ClusterScript::~ClusterScript
virtual ~ClusterScript()
destructor
Definition: RagTime5ClusterManager.cxx:169
RagTime5ClusterManagerInternal::RootCParser::parseHeaderZone
bool parseHeaderZone(MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
parse the header zone
Definition: RagTime5ClusterManager.cxx:1263
RagTime5ClusterManager::ClusterRoot::m_listClusterName
Link m_listClusterName
the cluster list id name zone link
Definition: RagTime5ClusterManager.hxx:295
RagTime5ClusterManagerInternal::StyleCParser::StyleCParser
StyleCParser(RagTime5ClusterManager &parser)
constructor
Definition: RagTime5ClusterManager.cxx:1811
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::~RagTime5ClusterManager
~RagTime5ClusterManager()
destructor
Definition: RagTime5ClusterManager.cxx:153
RagTime5ClusterManagerInternal::ClusterInformation::ClusterInformation
ClusterInformation()
constructor
Definition: RagTime5ClusterManager.cxx:53
RagTime5ClusterManager::Cluster::m_conditionFormulaLinks
std::vector< Link > m_conditionFormulaLinks
the conditions formula links
Definition: RagTime5ClusterManager.hxx:254
RagTime5ClusterManager::Cluster::C_FormatStyles
@ C_FormatStyles
Definition: RagTime5ClusterManager.hxx:225
RagTime5ClusterManager::sendClusterMainList
bool sendClusterMainList()
try to send the root cluster zone
Definition: RagTime5ClusterManager.cxx:517
RagTime5ClusterManager::Cluster::Cluster
Cluster(Type type)
constructor
Definition: RagTime5ClusterManager.hxx:232
RagTime5ClusterManager::ClusterParser::parseField
virtual bool parseField(RagTime5StructManager::Field const &, int, libmwaw::DebugStream &)
parse a the data of a zone, n_dataId:m
Definition: RagTime5ClusterManager.hxx:363
RagTime5ClusterManager::Cluster::C_Pipeline
@ C_Pipeline
Definition: RagTime5ClusterManager.hxx:219
RagTime5ClusterManager::ClusterParser::m_name
std::string m_name
the cluster name
Definition: RagTime5ClusterManager.hxx:394
RagTime5ClusterManager::ClusterParser::startZone
virtual void startZone()
start a new zone
Definition: RagTime5ClusterManager.hxx:350
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
RagTime5ClusterManager::ClusterParser::isANameHeader
bool isANameHeader(long N) const
return true if N correspond to a file/script name
Definition: RagTime5ClusterManager.hxx:378
RagTime5ClusterManager::ClusterParser::m_link
Link m_link
the actual link
Definition: RagTime5ClusterManager.hxx:398
RagTime5StructManager.hxx
RagTime5StructManager::Field::T_Unstructured
@ T_Unstructured
Definition: RagTime5StructManager.hxx:221
RagTime5ClusterManager::getClusterType
int getClusterType(RagTime5Zone &zone, int fileType)
returns the local zone type
Definition: RagTime5ClusterManager.cxx:2143
RagTime5Parser
the main class to read a RagTime v5 file
Definition: RagTime5Parser.hxx:74
RagTime5Zone::ascii
libmwaw::DebugFile & ascii()
returns the current ascii file
Definition: RagTime5StructManager.hxx:93
RagTime5ClusterManagerInternal::UnknownCParser::m_cluster
shared_ptr< RagTime5ClusterManager::Cluster > m_cluster
the current cluster
Definition: RagTime5ClusterManager.cxx:2113
MWAWEntry.hxx
RagTime5StructManager::Field
a field of RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:218
RagTime5ClusterManager::readFieldClusters
bool readFieldClusters(Link const &link)
try to read some field cluster
Definition: RagTime5ClusterManager.cxx:315
RagTime5ClusterManager::ClusterParser::readLinkHeader
bool readLinkHeader(MWAWInputStreamPtr &input, long fSz, Link &link, long(&values)[4], std::string &message)
try to read a link header
Definition: RagTime5ClusterManager.cxx:547
RagTime5ClusterManager::Cluster::m_isSent
bool m_isSent
true if the cluster was send
Definition: RagTime5ClusterManager.hxx:262
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
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::RagTime5ClusterManager
RagTime5ClusterManager(RagTime5Parser &parser)
constructor
Definition: RagTime5ClusterManager.cxx:148
RagTime5ClusterManager::ClusterRoot::m_listClusterId
int m_listClusterId
the cluster list id
Definition: RagTime5ClusterManager.hxx:293
RagTime5ClusterManager::readUnknownClusterC
bool readUnknownClusterC(Link const &link)
try to read some unknown cluster
Definition: RagTime5ClusterManager.cxx:333
RagTime5ClusterManager::m_state
shared_ptr< RagTime5ClusterManagerInternal::State > m_state
the state
Definition: RagTime5ClusterManager.hxx:405
RagTime5ClusterManager::ClusterParser
virtual class use to parse the cluster data
Definition: RagTime5ClusterManager.hxx:325
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
RagTime5ClusterManager::ClusterRoot::m_fileName
librevenge::RVNGString m_fileName
the filename if known
Definition: RagTime5ClusterManager.hxx:303
RagTime5Zone::m_entry
MWAWEntry m_entry
the zone entry
Definition: RagTime5StructManager.hxx:118
RagTime5ClusterManager::ClusterParser::parseZone
virtual bool parseZone(MWAWInputStreamPtr &, long, int, int, libmwaw::DebugStream &)
parse a zone
Definition: RagTime5ClusterManager.hxx:354
RagTime5ClusterManagerInternal::State::m_idToClusterInfoMap
std::map< int, ClusterInformation > m_idToClusterInfoMap
map id to cluster information map
Definition: RagTime5ClusterManager.cxx:137
RagTime5ClusterManagerInternal::ClusterInformation::m_type
int m_type
the cluster type
Definition: RagTime5ClusterManager.cxx:124
RagTime5ClusterManager::ClusterParser::getClusterName
std::string getClusterName(int id)
returns "data"+id+"A" ( followed by the cluster type and name if know)
Definition: RagTime5ClusterManager.cxx:542
RagTime5ClusterManagerInternal
Internal: the structures of a RagTime5ClusterManager.
Definition: RagTime5ClusterManager.cxx:49
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
RagTime5ClusterManager::ClusterParser
friend struct ClusterParser
Definition: RagTime5ClusterManager.hxx:65
RagTime5StructManager::Field::T_FieldList
@ T_FieldList
Definition: RagTime5StructManager.hxx:220
RagTime5ClusterManager::Cluster::C_PictureZone
@ C_PictureZone
Definition: RagTime5ClusterManager.hxx:223
RagTime5ClusterManagerInternal::RootCParser::parseZone
bool parseZone(MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
parse the header zone
Definition: RagTime5ClusterManager.cxx:836
RagTime5ClusterManagerInternal::ScriptCParser::endZone
void endZone()
end of a start zone call
Definition: RagTime5ClusterManager.cxx:1775
RagTime5ClusterManager::ClusterScript::m_scriptComment
Link m_scriptComment
the script comment zone
Definition: RagTime5ClusterManager.hxx:315
RagTime5ClusterManagerInternal::UnknownCParser::UnknownCParser
UnknownCParser(RagTime5ClusterManager &parser, int type)
constructor
Definition: RagTime5ClusterManager.cxx:2097
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::getClusterFileType
int getClusterFileType(RagTime5Zone &zone)
try to find a cluster zone type ( heuristic when the cluster type is unknown )
Definition: RagTime5ClusterManager.cxx:2213
RagTime5ClusterManager
basic class used to manage RagTime 5/6 zones
Definition: RagTime5ClusterManager.hxx:59
RagTime5ClusterManager::Cluster::C_TextStyles
@ C_TextStyles
Definition: RagTime5ClusterManager.hxx:225
RagTime5ClusterManagerInternal::ScriptCParser::m_cluster
shared_ptr< RagTime5ClusterManager::ClusterScript > m_cluster
the current cluster
Definition: RagTime5ClusterManager.cxx:1795
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
RagTime5ClusterManager::m_structManager
shared_ptr< RagTime5StructManager > m_structManager
the structure manager
Definition: RagTime5ClusterManager.hxx:409
RagTime5ClusterManager.hxx
RagTime5ClusterManager::readFieldHeader
bool readFieldHeader(RagTime5Zone &zone, long endPos, std::string const &headerName, long &endDataPos, long expectedLVal=-99999)
try to read a field header, if ok set the endDataPos positions
Definition: RagTime5ClusterManager.cxx:186
RagTime5ClusterManagerInternal::StyleCParser
low level: parser of script cluster : zone 480
Definition: RagTime5ClusterManager.cxx:1809
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
RagTime5ClusterManagerInternal::ColPatCParser::parseField
bool parseField(RagTime5StructManager::Field const &field, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5ClusterManager.cxx:736
RagTime5ClusterManagerInternal::UnknownCParser::getCluster
shared_ptr< RagTime5ClusterManager::Cluster > getCluster()
return the current cluster
Definition: RagTime5ClusterManager.cxx:2106
RagTime5ClusterManagerInternal::RootCParser::parseField
bool parseField(RagTime5StructManager::Field const &field, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5ClusterManager.cxx:862
RagTime5StructManager::Field::m_longValue
long m_longValue[2]
the long value
Definition: RagTime5StructManager.hxx:243
libmwaw_internal.hxx
RagTime5ClusterManager::ClusterRoot::m_listUnicodeLink
Link m_listUnicodeLink
a link to a list of unknown index+unicode string
Definition: RagTime5ClusterManager.hxx:291
MWAWPosition.hxx
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
RagTime5ClusterManager::readClusterMainList
bool readClusterMainList(ClusterRoot &root, std::vector< int > &list, std::vector< int > const &clusterIdList)
try to read the cluster root list (in general Data14)
Definition: RagTime5ClusterManager.cxx:228
RagTime5ClusterManagerInternal::ScriptCParser::ScriptCParser
ScriptCParser(RagTime5ClusterManager &parser, int type)
constructor
Definition: RagTime5ClusterManager.cxx:1583
RagTime5ClusterManagerInternal::RootChildCParser::endZone
void endZone()
end of a start zone call
Definition: RagTime5ClusterManager.cxx:1560
RagTime5ClusterManagerInternal::RootChildCParser::parseField
bool parseField(RagTime5StructManager::Field const &field, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5ClusterManager.cxx:1540
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
RagTime5ClusterManagerInternal::RootCParser::RootCParser
RootCParser(RagTime5ClusterManager &parser)
constructor
Definition: RagTime5ClusterManager.cxx:770
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
RagTime5ClusterManager::ClusterParser::m_dataId
int m_dataId
the actual zone id
Definition: RagTime5ClusterManager.hxx:396
RagTime5StructManager::Field::T_Long
@ T_Long
Definition: RagTime5StructManager.hxx:220
RagTime5ClusterManager::Cluster::C_GraphicZone
@ C_GraphicZone
Definition: RagTime5ClusterManager.hxx:223
RagTime5StructManager::Field::T_ZoneId
@ T_ZoneId
Definition: RagTime5StructManager.hxx:221
RagTime5ClusterManagerInternal::StyleCParser::m_cluster
shared_ptr< RagTime5ClusterManager::Cluster > m_cluster
the current cluster
Definition: RagTime5ClusterManager.cxx:2081
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
RagTime5ClusterManagerInternal::ColPatCParser::ColPatCParser
ColPatCParser(RagTime5ClusterManager &parser)
constructor
Definition: RagTime5ClusterManager.cxx:621
RagTime5StructManager::Field::m_string
librevenge::RVNGString m_string
small string use to store a string or a 4 char code
Definition: RagTime5StructManager.hxx:249
RagTime5ClusterManager::Cluster::m_hiLoEndian
bool m_hiLoEndian
the cluster hiLo endian
Definition: RagTime5ClusterManager.hxx:244
RagTime5ClusterManager::Cluster::~Cluster
virtual ~Cluster()
destructor
Definition: RagTime5ClusterManager.cxx:157
RagTime5Zone
main zone in a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:49
RagTime5ClusterManager::Cluster::C_TextZone
@ C_TextZone
Definition: RagTime5ClusterManager.hxx:223
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
RagTime5ClusterManager::m_mainParser
RagTime5Parser & m_mainParser
the main parser
Definition: RagTime5ClusterManager.hxx:407
RagTime5ClusterManager::ClusterParser::operator=
ClusterParser & operator=(ClusterParser const &orig)
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
RagTime5ClusterManagerInternal::UnknownCParser
low level: parser of unknown cluster
Definition: RagTime5ClusterManager.cxx:2095
RagTime5StructManager::Field::m_extra
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:263
RagTime5Zone::getInput
MWAWInputStreamPtr getInput()
returns the current input
Definition: RagTime5StructManager.hxx:77
MWAWDebug.hxx
RagTime5ClusterManager::Cluster::C_GraphicStyles
@ C_GraphicStyles
Definition: RagTime5ClusterManager.hxx:225
RagTime5ClusterManagerInternal::StyleCParser::getCluster
shared_ptr< RagTime5ClusterManager::Cluster > getCluster()
return the current cluster
Definition: RagTime5ClusterManager.cxx:1818
RagTime5ClusterManager::operator=
RagTime5ClusterManager operator=(RagTime5ClusterManager const &orig)
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
RagTime5ClusterManagerInternal::ColPatCParser::m_cluster
shared_ptr< RagTime5ClusterManager::Cluster > m_cluster
the current cluster
Definition: RagTime5ClusterManager.cxx:758
RagTime5ClusterManagerInternal::State::State
State()
constructor
Definition: RagTime5ClusterManager.cxx:133
RagTime5ClusterManagerInternal::ClusterInformation::m_name
librevenge::RVNGString m_name
the cluster name
Definition: RagTime5ClusterManager.cxx:128
RagTime5ClusterManager::ClusterScript::m_scriptName
librevenge::RVNGString m_scriptName
the scriptname if known
Definition: RagTime5ClusterManager.hxx:317
RagTime5ClusterManagerInternal::RootCParser::parseDataZone
bool parseDataZone(MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
parse a data block
Definition: RagTime5ClusterManager.cxx:976
RagTime5ClusterManager::Cluster::C_ColorStyles
@ C_ColorStyles
Definition: RagTime5ClusterManager.hxx:225
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
RagTime5Parser::getDataZone
shared_ptr< RagTime5Zone > getDataZone(int dataId) const
returns the zone corresponding to a data id (or 0)
Definition: RagTime5Parser.cxx:400
RagTime5ClusterManagerInternal::State::m_rootIdList
std::vector< int > m_rootIdList
the root id list
Definition: RagTime5ClusterManager.cxx:141
RagTime5ClusterManagerInternal::StyleCParser::parseZone
bool parseZone(MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
try to parse a zone
Definition: RagTime5ClusterManager.cxx:1823
RagTime5ClusterManagerInternal::StyleCParser::m_what
int m_what
a index to know which field is parsed : 0: main, 1, 2/3: field , 4: unicode list
Definition: RagTime5ClusterManager.cxx:2083
RagTime5ClusterManager::ClusterRoot::ClusterRoot
ClusterRoot()
constructor
Definition: RagTime5ClusterManager.hxx:271
RagTime5ClusterManager::ClusterRoot::m_graphicTypeLink
Link m_graphicTypeLink
the graphic type id
Definition: RagTime5ClusterManager.hxx:286
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
RagTime5ClusterManager::Cluster::m_linksList
std::vector< Link > m_linksList
the link list
Definition: RagTime5ClusterManager.hxx:258
RagTime5ClusterManager::Cluster::Type
Type
the cluster type
Definition: RagTime5ClusterManager.hxx:218
RagTime5StructManager::Field::m_longList
std::vector< long > m_longList
the list of long value
Definition: RagTime5StructManager.hxx:251
RagTime5ClusterManagerInternal::StyleCParser::endZone
void endZone()
end of a start zone call
Definition: RagTime5ClusterManager.cxx:2056
RagTime5ClusterManagerInternal::ColPatCParser
low level: parser of color pattern cluster : zone 0x8042
Definition: RagTime5ClusterManager.cxx:619
RagTime5ClusterManagerInternal::RootCParser::endZone
void endZone()
end of a start zone call
Definition: RagTime5ClusterManager.cxx:782
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
RagTime5ClusterManager::ClusterParser::getZoneName
virtual std::string getZoneName(int n, int m=-1) const
return the debug name corresponding to a cluster
Definition: RagTime5ClusterManager.hxx:341
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
RagTime5ClusterManager::Cluster::C_Script
@ C_Script
Definition: RagTime5ClusterManager.hxx:220
RagTime5ClusterManagerInternal::ScriptCParser::parseZone
bool parseZone(MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
parse a zone
Definition: RagTime5ClusterManager.cxx:1596
RagTime5ClusterManagerInternal::RootChildCParser::RootChildCParser
RootChildCParser(RagTime5ClusterManager &parser, int type)
constructor
Definition: RagTime5ClusterManager.cxx:1401
RagTime5ClusterManager::ClusterParser::getNewZoneToParse
virtual int getNewZoneToParse()
returns to new zone to parse.
Definition: RagTime5ClusterManager.hxx:369
RagTime5ClusterManager::RagTime5ClusterManager
RagTime5ClusterManager(RagTime5ClusterManager const &orig)
RagTime5ClusterManagerInternal::RootCParser::getCluster
shared_ptr< RagTime5ClusterManager::Cluster > getCluster()
return the current cluster
Definition: RagTime5ClusterManager.cxx:777
RagTime5ClusterManager::Cluster::m_name
librevenge::RVNGString m_name
the cluster name (if know)
Definition: RagTime5ClusterManager.hxx:246
RagTime5ClusterManagerInternal::RootChildCParser::getCluster
shared_ptr< RagTime5ClusterManager::Cluster > getCluster()
return the current cluster
Definition: RagTime5ClusterManager.cxx:1442
RagTime5ClusterManager::ClusterRoot
the cluster for root
Definition: RagTime5ClusterManager.hxx:269
RagTime5ClusterManagerInternal::ScriptCParser::parseField
bool parseField(RagTime5StructManager::Field const &field, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5ClusterManager.cxx:1734
RagTime5ClusterManager::ClusterRoot::m_docInfoLink
Link m_docInfoLink
the doc info link
Definition: RagTime5ClusterManager.hxx:289
RagTime5ClusterManagerInternal::StyleCParser::parseField
bool parseField(RagTime5StructManager::Field const &field, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5ClusterManager.cxx:1970
RagTime5ClusterManager::ClusterParser::m_parser
RagTime5ClusterManager & m_parser
the main parser
Definition: RagTime5ClusterManager.hxx:388
RagTime5ClusterManagerInternal::ClusterInformation
cluster information
Definition: RagTime5ClusterManager.cxx:51
RagTime5ClusterManager::Cluster::m_zoneId
int m_zoneId
the zone id
Definition: RagTime5ClusterManager.hxx:242
RagTime5ClusterManagerInternal::ColPatCParser::parseZone
bool parseZone(MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
parse a zone
Definition: RagTime5ClusterManager.cxx:633
RagTime5ClusterManagerInternal::ScriptCParser::getCluster
shared_ptr< RagTime5ClusterManager::Cluster > getCluster()
return the current cluster
Definition: RagTime5ClusterManager.cxx:1590
RagTime5ClusterManager::Cluster::C_ClusterGProp
@ C_ClusterGProp
Definition: RagTime5ClusterManager.hxx:220
RagTime5StructManager::Field::T_LongList
@ T_LongList
Definition: RagTime5StructManager.hxx:220
RagTime5ClusterManager::readCluster
bool readCluster(RagTime5Zone &zone, ClusterParser &parser, bool warnForUnparsed=true)
try to read a cluster zone
Definition: RagTime5ClusterManager.cxx:354
RagTime5ClusterManagerInternal::ScriptCParser::m_fieldName
std::string m_fieldName
the actual field name
Definition: RagTime5ClusterManager.cxx:1799
RagTime5ClusterManager::Cluster::C_SpreadsheetZone
@ C_SpreadsheetZone
Definition: RagTime5ClusterManager.hxx:223
RagTime5ClusterManager::ClusterParser::~ClusterParser
virtual ~ClusterParser()
destructor
Definition: RagTime5ClusterManager.cxx:161
RagTime5ClusterManager::ClusterParser::ClusterParser
ClusterParser(ClusterParser const &orig)
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
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
RagTime5ClusterManager::ClusterParser::endZone
virtual void endZone()
end of a start zone call
Definition: RagTime5ClusterManager.hxx:359
RagTime5ClusterManagerInternal::RootCParser::m_fieldName
std::string m_fieldName
the actual field name
Definition: RagTime5ClusterManager.cxx:1389
RagTime5ClusterManagerInternal::RootChildCParser::m_cluster
shared_ptr< RagTime5ClusterManager::Cluster > m_cluster
the current cluster
Definition: RagTime5ClusterManager.cxx:1571
RagTime5StructManager
basic class used to store RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:157
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
RagTime5ClusterManagerInternal::RootChildCParser
try to read a basic root child cluster: either fielddef or fieldpos or a first internal child of the ...
Definition: RagTime5ClusterManager.cxx:1399
RagTime5Zone::m_ids
int m_ids[3]
the zone id
Definition: RagTime5StructManager.hxx:124
RagTime5ClusterManager::Cluster::C_Empty
@ C_Empty
Definition: RagTime5ClusterManager.hxx:229
RagTime5StructManager::readCompressedLong
static bool readCompressedLong(MWAWInputStreamPtr &input, long endPos, long &val)
try to read a compressed long
Definition: RagTime5StructManager.cxx:66
RagTime5ClusterManager::Cluster::m_nameLink
Link m_nameLink
the name link
Definition: RagTime5ClusterManager.hxx:250
RagTime5ClusterManager::readClusterGObjProperties
bool readClusterGObjProperties(RagTime5Zone &zone)
try to read a level 2 child of a cluster (picture resizing, ...)
Definition: RagTime5ClusterManager.cxx:2263
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
RagTime5ClusterManager::Cluster
the cluster data
Definition: RagTime5ClusterManager.hxx:216
RagTime5ClusterManager::ClusterParser::m_hiLoEndian
bool m_hiLoEndian
zone endian
Definition: RagTime5ClusterManager.hxx:392
RagTime5ClusterManagerInternal::StyleCParser::m_fieldName
std::string m_fieldName
the actual field name
Definition: RagTime5ClusterManager.cxx:2085
RagTime5ClusterManager::Cluster::m_type
Type m_type
the cluster type
Definition: RagTime5ClusterManager.hxx:240
RagTime5ClusterManager::ClusterParser::m_type
int m_type
the cluster type
Definition: RagTime5ClusterManager.hxx:390
RagTime5ClusterManagerInternal::RootCParser::m_what
int m_what
a index to know which field is parsed : 0: main, 1: filename, 2: list, 3: graph type,...
Definition: RagTime5ClusterManager.cxx:1383
MWAWPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:254
RagTime5ClusterManagerInternal::ColPatCParser::getCluster
shared_ptr< RagTime5ClusterManager::Cluster > getCluster()
return the current cluster
Definition: RagTime5ClusterManager.cxx:628
RagTime5ClusterManager::ClusterParser::getCluster
virtual shared_ptr< Cluster > getCluster()=0
return the current cluster
RagTime5ClusterManagerInternal::RootChildCParser::parseZone
bool parseZone(MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
parse a zone
Definition: RagTime5ClusterManager.cxx:1447
RagTime5ClusterManagerInternal::ScriptCParser
low level: parser of script cluster : zone 2,a,4002,400a
Definition: RagTime5ClusterManager.cxx:1581
RagTime5ClusterManager::ClusterScript
the cluster script ( 2/a/4002/400a zone)
Definition: RagTime5ClusterManager.hxx:307
RagTime5Parser::readClusterZone
bool readClusterZone(RagTime5Zone &zone, int type=-1)
try to read a cluster zone
Definition: RagTime5Parser.cxx:1146
RagTime5ClusterManagerInternal::RootCParser::m_linkId
int m_linkId
the link id : 0: zone[names], 1: field5=doc[info]?, 2: field6, 3: settings, 4: formula,...
Definition: RagTime5ClusterManager.cxx:1387
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
RagTime5ClusterManagerInternal::RootCParser::m_expectedId
int m_expectedId
a index to known which field is expected : 0:data ... 7: filename, ...
Definition: RagTime5ClusterManager.cxx:1385
RagTime5ClusterManager::Cluster::C_Layout
@ C_Layout
Definition: RagTime5ClusterManager.hxx:219
RagTime5ClusterManagerInternal::ScriptCParser::m_what
int m_what
a index to know which field is parsed : 0: main, 1:scriptname, 2: list names, 3: list data
Definition: RagTime5ClusterManager.cxx:1797
RagTime5ClusterManager::ClusterRoot::m_clusterIds
int m_clusterIds[1]
other cluster id (unknown cluster b, )
Definition: RagTime5ClusterManager.hxx:283
RagTime5ClusterManager::ClusterRoot::~ClusterRoot
virtual ~ClusterRoot()
destructor
Definition: RagTime5ClusterManager.cxx:165
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
RagTime5StructManager::Field::m_type
Type m_type
the field type
Definition: RagTime5StructManager.hxx:237
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
RagTime5ClusterManagerInternal::RootCParser::m_cluster
shared_ptr< RagTime5ClusterManager::ClusterRoot > m_cluster
the current cluster
Definition: RagTime5ClusterManager.cxx:1381
RagTime5Parser.hxx
RagTime5ClusterManager::Cluster::C_Root
@ C_Root
Definition: RagTime5ClusterManager.hxx:220
RagTime5ClusterManager::ClusterParser::ClusterParser
ClusterParser(RagTime5ClusterManager &parser, int type, std::string const &zoneName)
constructor
Definition: RagTime5ClusterManager.hxx:327
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
RagTime5ClusterManagerInternal::RootCParser
try to read a root cluster: 4001
Definition: RagTime5ClusterManager.cxx:768
RagTime5ClusterManagerInternal::State
Internal: the state of a RagTime5ClusterManager.
Definition: RagTime5ClusterManager.cxx:131
RagTime5ClusterManager::ClusterScript::ClusterScript
ClusterScript()
constructor
Definition: RagTime5ClusterManager.hxx:309
RagTime5ClusterManager::Cluster::m_clusterIdsList
std::vector< int > m_clusterIdsList
the cluster ids
Definition: RagTime5ClusterManager.hxx:260

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