Canvas5Parser.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 CANVAS5_PARSER
35 # define CANVAS5_PARSER
36 
37 #include <functional>
38 #include <map>
39 #include <string>
40 #include <utility>
41 #include <vector>
42 
43 #include <librevenge/librevenge.h>
44 
45 #include "MWAWDebug.hxx"
46 #include "MWAWInputStream.hxx"
47 #include "MWAWPosition.hxx"
48 
49 #include "MWAWParser.hxx"
50 
51 namespace Canvas5ParserInternal
52 {
53 struct Layer;
54 struct Slide;
55 
56 struct State;
57 }
58 
59 class Canvas5Graph;
60 class Canvas5Image;
62 
63 namespace Canvas5Structure
64 {
65 struct Stream;
66 }
67 
71 class Canvas5Parser final : public MWAWGraphicParser
72 {
73  friend class Canvas5Graph;
74  friend class Canvas5Image;
75  friend class Canvas5StyleManager;
76 public:
78  Canvas5Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
80  ~Canvas5Parser() final;
81 
83  bool checkHeader(MWAWHeader *header, bool strict=false) final;
84 
85  // the main parse function
86  void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
87 
88 protected:
90  void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
91 
92  //
93  // interface
94  //
95 
97  bool isWindowsFile() const;
99  librevenge::RVNGString getTextLink(int textLinkId) const;
100 
101 protected:
103  bool createZones();
105  bool readMainBlock(std::shared_ptr<Canvas5Structure::Stream> stream);
107  bool readMainBlock9(std::shared_ptr<Canvas5Structure::Stream> stream);
109  bool readFileRSRCs(std::shared_ptr<Canvas5Structure::Stream> stream);
111  bool readSI200(Canvas5Structure::Stream &stream);
113  bool readFileDesc(Canvas5Structure::Stream &stream);
114 
115  // Intermediate level
116 
117  //
118  // first block
119  //
120 
122  bool readFileHeader(std::shared_ptr<Canvas5Structure::Stream> stream);
123 
125  bool readDocumentSettings(std::shared_ptr<Canvas5Structure::Stream> stream);
127  bool readLayers(std::shared_ptr<Canvas5Structure::Stream> stream);
129  bool readSlides(std::shared_ptr<Canvas5Structure::Stream> stream);
131  bool readTextLinks(std::shared_ptr<Canvas5Structure::Stream> stream);
132 
133  //
134  // second block
135  //
136 
137  //
138  // third block
139  //
140 
142  bool readPrinterRsrc(Canvas5Structure::Stream &stream);
144  bool readOLnkRsrc(std::shared_ptr<Canvas5Structure::Stream> stream);
146  bool readObjectDBRsrc(std::shared_ptr<Canvas5Structure::Stream> stream);
147 
148  //
149  // Mac RSRC
150  //
152  bool readPnot(Canvas5Structure::Stream &stream, MWAWEntry const &entry);
154  bool readPicture(Canvas5Structure::Stream &stream, MWAWEntry const &entry);
155 
156  //
157  // Windows RSRC
158  //
159 
160  //
161  // send data to the listener
162  //
163 
165  bool send(Canvas5ParserInternal::Slide const &slide);
167  bool send(Canvas5ParserInternal::Layer const &layer);
168 
169  //
170  // low level
171  //
172 
174  bool readString(Canvas5Structure::Stream &stream, librevenge::RVNGString &string, int maxSize, bool canBeCString=false);
176  bool readDouble(Canvas5Structure::Stream &stream, double &val, bool &isNaN) const;
178  double readDouble(Canvas5Structure::Stream &stream, int fieldSize) const;
180  int readInteger(Canvas5Structure::Stream &stream, int fieldSize) const;
181 
183  struct Item {
186  : m_id(-1)
187  , m_type(unsigned(-1))
188  , m_length(0)
189  , m_pos(-1)
190  , m_decal(0)
191  {
192  }
193 
195  int m_id;
197  unsigned m_type;
199  long m_length;
201  long m_pos;
203  int m_decal;
204  };
206  typedef std::function<void(std::shared_ptr<Canvas5Structure::Stream>, Item const &, std::string const &)> DataFunction;
208  static void defDataFunction(std::shared_ptr<Canvas5Structure::Stream>, Item const &, std::string const &) {}
210  static void stringDataFunction(std::shared_ptr<Canvas5Structure::Stream> stream, Item const &item, std::string const &what);
211 
213  bool readDataHeader(Canvas5Structure::Stream &stream, int expectedSize, int &N);
218  bool readExtendedHeader(std::shared_ptr<Canvas5Structure::Stream> stream, int expectedValue, std::string const &what, DataFunction const &func);
219 
221  bool readUsed(Canvas5Structure::Stream &stream, std::string const &what);
223  bool readDefined(Canvas5Structure::Stream &stream, std::vector<bool> &defined, std::string const &what);
224 
226  bool readIndexMap(std::shared_ptr<Canvas5Structure::Stream> stream, std::string const &what, DataFunction const &func=&Canvas5Parser::defDataFunction);
227 
229  // v9 new structures
231 
233  bool readArray9(std::shared_ptr<Canvas5Structure::Stream> stream, std::string const &what,
236  bool readItemHeader9(Canvas5Structure::Stream &stream, int &id, int &used);
237 
239  bool getTAG9(Canvas5Structure::Stream &stream, std::string &tag, int &type);
241  bool checkTAG9(Canvas5Structure::Stream &stream, std::string const &tag, int type);
242 
245 
246  //
247  // data
248  //
250  std::shared_ptr<Canvas5ParserInternal::State> m_state;
252  std::shared_ptr<Canvas5Graph> m_graphParser;
254  std::shared_ptr<Canvas5Image> m_imageParser;
256  std::shared_ptr<Canvas5StyleManager> m_styleManager;
257 };
258 #endif
259 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Canvas5Image
the main class to read/convert the image or movie inside of Canvas 5-11 files
Definition: Canvas5Image.hxx:78
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
Canvas5Parser::checkTAG9
bool checkTAG9(Canvas5Structure::Stream &stream, std::string const &tag, int type)
try to check is the following is a tag: v9
Definition: Canvas5Parser.cxx:3509
Canvas5Parser::readLayers
bool readLayers(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the different layers
Definition: Canvas5Parser.cxx:1908
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
Canvas5ParserInternal::Layer
Internal: the layer of a Canvas5Parser.
Definition: Canvas5Parser.cxx:90
Canvas5Parser::defDataFunction
static void defDataFunction(std::shared_ptr< Canvas5Structure::Stream >, Item const &, std::string const &)
the default function to parse the data of a index map/a extended header
Definition: Canvas5Parser.hxx:208
MWAWParser::getFontConverter
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
Canvas5Parser::~Canvas5Parser
~Canvas5Parser() final
destructor
Definition: Canvas5Parser.cxx:198
MWAWGraphicListenerPtr
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
Canvas5Structure::readPreview
bool readPreview(Stream &stream, bool hasPreviewBitmap)
try to read the preview bitmap
Definition: Canvas5Structure.cxx:546
Canvas5ParserInternal::State::m_idToLayer
std::map< int, Layer > m_idToLayer
the layer data
Definition: Canvas5Parser.cxx:161
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
Canvas5Parser::isWindowsFile
bool isWindowsFile() const
returns true if the file is a windows file
Definition: Canvas5Parser.cxx:202
Canvas5Parser::Item::m_id
int m_id
the identifier
Definition: Canvas5Parser.hxx:195
MWAWParser::getGraphicListener
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
MWAWDocument::MWAW_T_CANVAS
@ MWAW_T_CANVAS
Deneba Canvas mac: v2-v3 and v5-v8, windows: v3 and v5-v6 and probably v7-v8 ADC Canvas mac: v9-v10,...
Definition: MWAWDocument.hxx:229
Canvas5Parser::readFileDesc
bool readFileDesc(Canvas5Structure::Stream &stream)
try to read the last block: some pathes, ...
Definition: Canvas5Parser.cxx:1592
MWAWInputStream
Internal class used to read the file stream Internal class used to read the file stream,...
Definition: MWAWInputStream.hxx:54
Canvas5ParserInternal::State::State
State()
constructor
Definition: Canvas5Parser.cxx:113
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
Canvas5ParserInternal::State::m_metaData
librevenge::RVNGPropertyList m_metaData
the meta data
Definition: Canvas5Parser.cxx:171
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
MWAWFontConverter.hxx
libmwaw::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
Canvas5Graph
the main class to read the graphic part of Canvas v5-v11 file
Definition: Canvas5Graph.hxx:85
MWAWPrinter.hxx
Canvas5Parser.hxx
MWAWDocument::MWAW_K_DRAW
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MWAWOLEParser
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: MWAWOLEParser.hxx:86
MWAWPictData::get
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
Canvas5Parser::Item::Item
Item()
constructor
Definition: Canvas5Parser.hxx:185
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
Canvas5ParserInternal::Layer::m_shapesId
std::vector< int > m_shapesId
the shape id
Definition: Canvas5Parser.cxx:104
Canvas5Structure::Stream::input
MWAWInputStreamPtr input()
returns the input file
Definition: Canvas5Structure.hxx:65
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
Canvas5Parser::Canvas5Parser
Canvas5Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: Canvas5Parser.cxx:179
Canvas5Parser::createDocument
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: Canvas5Parser.cxx:253
Canvas5Parser::readPnot
bool readPnot(Canvas5Structure::Stream &stream, MWAWEntry const &entry)
read the RSRC 0 pnot zone
Definition: Canvas5Parser.cxx:2784
Canvas5ParserInternal::State::m_numShapes
int m_numShapes
the number of shapes
Definition: Canvas5Parser.cxx:165
Canvas5ParserInternal::Layer::m_name
librevenge::RVNGString m_name
the layer name
Definition: Canvas5Parser.cxx:100
Canvas5Parser::readObjectDBRsrc
bool readObjectDBRsrc(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the object database: XOBD v6
Definition: Canvas5Parser.cxx:2234
Canvas5Parser::readFileRSRCs
bool readFileRSRCs(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the third big block: a list of resource?, font, ...
Definition: Canvas5Parser.cxx:619
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
Canvas5StyleManager.hxx
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWPageSpan::setMasterPageName
void setMasterPageName(librevenge::RVNGString const &name)
set the page master name
Definition: MWAWPageSpan.hxx:243
Canvas5Parser::Item::m_pos
long m_pos
the data beginning position (may be before the current position: v9)
Definition: Canvas5Parser.hxx:201
Canvas5Parser::getTAG9
bool getTAG9(Canvas5Structure::Stream &stream, std::string &tag, int &type)
try to return a tag, type:0 means begin, type:1 means end: v9
Definition: Canvas5Parser.cxx:3542
Canvas5Parser::readSlides
bool readSlides(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the list of slides
Definition: Canvas5Parser.cxx:2392
Canvas5ParserInternal::State::m_documentSetup
int m_documentSetup
the document setup: 0 full page, 1: two page bottom/down, 2: four page
Definition: Canvas5Parser.cxx:147
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
Canvas5Parser::Item::m_decal
int m_decal
the decal position
Definition: Canvas5Parser.hxx:203
Canvas5Parser::readArray9
bool readArray9(std::shared_ptr< Canvas5Structure::Stream > stream, std::string const &what, DataFunction const &func=&Canvas5Parser::defDataFunction)
try to read an array: v9
Definition: Canvas5Parser.cxx:3357
Canvas5Parser::readIndexMap
bool readIndexMap(std::shared_ptr< Canvas5Structure::Stream > stream, std::string const &what, DataFunction const &func=&Canvas5Parser::defDataFunction)
try to read a index map
Definition: Canvas5Parser.cxx:3139
Canvas5ParserInternal::State
Internal: the state of a Canvas5Parser.
Definition: Canvas5Parser.cxx:111
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
Canvas5Parser::stringDataFunction
static void stringDataFunction(std::shared_ptr< Canvas5Structure::Stream > stream, Item const &item, std::string const &what)
the default function to parse a string
Definition: Canvas5Parser.cxx:3120
MWAWParagraph.hxx
Canvas5Structure::decodeZone5
bool decodeZone5(MWAWInputStreamPtr input, long endPos, int type, unsigned long finalLength, std::shared_ptr< MWAWStringStream > &stream)
try to decode a zone v5-v6
Definition: Canvas5Structure.cxx:879
MWAWRSRCParser.hxx
MWAWParser::getRSRCParser
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
libmwaw::Debug::dumpFile
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
Canvas5ParserInternal::Slide::m_dim
MWAWVec2f m_dim
the slide dimension
Definition: Canvas5Parser.cxx:82
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
Canvas5Structure::Stream::ascii
libmwaw::DebugFile & ascii()
return the ascii file
Definition: Canvas5Structure.hxx:70
MWAWParser::setGraphicListener
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
Canvas5Parser::readSI200
bool readSI200(Canvas5Structure::Stream &stream)
try to read the SI200 zone: v6
Definition: Canvas5Parser.cxx:1518
Canvas5Structure
a namespace used to define basic function or structure to read a Canvas v5-v11 file
Definition: Canvas5BMParser.hxx:64
Canvas5ParserInternal::State::m_numLayers
int m_numLayers
the number of layer
Definition: Canvas5Parser.cxx:159
Canvas5Parser::readItemHeader9
bool readItemHeader9(Canvas5Structure::Stream &stream, int &id, int &used)
try to read an array item header: v9
Definition: Canvas5Parser.cxx:3484
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
Canvas5Parser::parse
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: Canvas5Parser.cxx:221
Canvas5Parser::readMainBlock9
bool readMainBlock9(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the first big block: v9
Definition: Canvas5Parser.cxx:492
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
MWAWPictData.hxx
Canvas5Parser
the main class to read a Canvas 5-10 files (and probably some not password protected Windows 11 files...
Definition: Canvas5Parser.hxx:72
MWAWPageSpan::getFormWidth
double getFormWidth() const
returns the page width
Definition: MWAWPageSpan.hxx:122
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MWAWOLEParser.hxx
MWAWVec2< float >
MWAWGraphicListener.hxx
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
Canvas5Parser::readDefined
bool readDefined(Canvas5Structure::Stream &stream, std::vector< bool > &defined, std::string const &what)
try to read the defined list
Definition: Canvas5Parser.cxx:3246
Canvas5Parser::DataFunction
std::function< void(std::shared_ptr< Canvas5Structure::Stream >, Item const &, std::string const &)> DataFunction
a function used to parse the data of a index map/a extended header
Definition: Canvas5Parser.hxx:206
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:83
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
Canvas5Structure.hxx
Canvas5Parser::readTextLinks
bool readTextLinks(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the text links
Definition: Canvas5Parser.cxx:2288
Canvas5ParserInternal::Slide::m_layers
std::vector< int > m_layers
the layer id
Definition: Canvas5Parser.cxx:86
Canvas5ParserInternal::State::m_idToSlide
std::map< int, Slide > m_idToSlide
the slide data
Definition: Canvas5Parser.cxx:156
MWAWGraphicParser
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
Canvas5Parser::readMainBlock
bool readMainBlock(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the first big block
Definition: Canvas5Parser.cxx:458
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
Canvas5ParserInternal::State::m_idToTextLink
std::map< int, librevenge::RVNGString > m_idToTextLink
the id the text link map
Definition: Canvas5Parser.cxx:168
Canvas5Parser::Item::m_type
unsigned m_type
the type (if known)
Definition: Canvas5Parser.hxx:197
Canvas5ParserInternal::State::m_stream
std::shared_ptr< Canvas5Structure::Stream > m_stream
the current stream
Definition: Canvas5Parser.cxx:140
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
Canvas5ParserInternal::State::m_fileFlags
int m_fileFlags
the file flags
Definition: Canvas5Parser.cxx:145
Canvas5ParserInternal::State::m_numSlides
int m_numSlides
the number of slides
Definition: Canvas5Parser.cxx:152
Canvas5Parser::readFileHeader
bool readFileHeader(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the file header
Definition: Canvas5Parser.cxx:1653
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
Canvas5Parser::readInteger
int readInteger(Canvas5Structure::Stream &stream, int fieldSize) const
try to read a int: either a cast a double: fieldSize=8 or a int32/int16
Definition: Canvas5Parser.cxx:2906
Canvas5Parser::m_styleManager
std::shared_ptr< Canvas5StyleManager > m_styleManager
the style manager
Definition: Canvas5Parser.hxx:256
Canvas5Parser::readOLnkRsrc
bool readOLnkRsrc(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the OLnk rsrc block: v6
Definition: Canvas5Parser.cxx:2176
Canvas5Parser::readExtendedHeader
bool readExtendedHeader(std::shared_ptr< Canvas5Structure::Stream > stream, int expectedValue, std::string const &what, DataFunction const &func)
try to read an extended data header, ie.
Definition: Canvas5Parser.cxx:3039
Canvas5Graph.hxx
Canvas5ParserInternal::Layer::m_type
int m_type
the layer type (unknonw)
Definition: Canvas5Parser.cxx:106
Canvas5Parser::createZones
bool createZones()
finds the different objects zones
Definition: Canvas5Parser.cxx:381
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
Canvas5Parser::Item
a structure used to store the item data of a Canvas5Parser
Definition: Canvas5Parser.hxx:183
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
Canvas5ParserInternal
Internal: the structures of a Canvas5Parser.
Definition: Canvas5Parser.cxx:71
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
Canvas5ParserInternal::State::m_facingPages
bool m_facingPages
true if the document uses facing page
Definition: Canvas5Parser.cxx:149
Canvas5ParserInternal::State::m_isWindowsFile
bool m_isWindowsFile
true if this is a windows file
Definition: Canvas5Parser.cxx:138
Canvas5ParserInternal::State::m_slideIds
std::vector< int > m_slideIds
the slides id
Definition: Canvas5Parser.cxx:154
Canvas5ParserInternal::State::m_layerIdInMasterSet
std::set< int > m_layerIdInMasterSet
the list of layer present in the master page
Definition: Canvas5Parser.cxx:163
Canvas5Parser::Canvas5StyleManager
friend class Canvas5StyleManager
Definition: Canvas5Parser.hxx:75
Canvas5Parser::readPicture
bool readPicture(Canvas5Structure::Stream &stream, MWAWEntry const &entry)
read the RSRC Pict zone
Definition: Canvas5Parser.cxx:2812
MWAWGraphicStyle.hxx
Canvas5Structure::getString
std::string getString(unsigned val)
very low level: debug print some uint32_t either at char4 or sample int
Definition: Canvas5Structure.cxx:47
Canvas5ParserInternal::State::m_type
int m_type
the document type 1: graphic, 2: list of pages, 3: slides
Definition: Canvas5Parser.cxx:143
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWOLEParser::readSummaryInformation
bool readSummaryInformation(MWAWInputStreamPtr input, std::string const &oleName, int &encoding, librevenge::RVNGPropertyList &pList, libmwaw::DebugFile &ascii, long endPos=-1) const
the summary information and the doc summary information
Definition: MWAWOLEParser.cxx:772
Canvas5Parser::Item::m_length
long m_length
the data length (from current position)
Definition: Canvas5Parser.hxx:199
Canvas5Parser::readUsed
bool readUsed(Canvas5Structure::Stream &stream, std::string const &what)
try to read the used list
Definition: Canvas5Parser.cxx:3300
Canvas5Structure::Stream
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:49
Canvas5Parser::send
bool send(Canvas5ParserInternal::Slide const &slide)
try to send a page/slide
Definition: Canvas5Parser.cxx:2856
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
Canvas5ParserInternal::Slide
Internal: the slide data of a Canvas5Parser.
Definition: Canvas5Parser.cxx:73
Canvas5Parser::decode
static MWAWInputStreamPtr decode(MWAWInputStreamPtr input, int version)
try to decode the input stream
Definition: Canvas5Parser.cxx:3598
Canvas5Parser::readDataHeader
bool readDataHeader(Canvas5Structure::Stream &stream, int expectedSize, int &N)
try to read a data header, ie. N fields with a given size
Definition: Canvas5Parser.cxx:3018
Canvas5ParserInternal::Slide::Slide
Slide()
Definition: Canvas5Parser.cxx:74
Canvas5Parser::readDocumentSettings
bool readDocumentSettings(std::shared_ptr< Canvas5Structure::Stream > stream)
read the document settings
Definition: Canvas5Parser.cxx:1774
Canvas5ParserInternal::Layer::m_numShapes
int m_numShapes
the number of shape
Definition: Canvas5Parser.cxx:102
MWAWStringStream.hxx
MWAWInputStream.hxx
Canvas5Image.hxx
Canvas5Parser::Canvas5Graph
friend class Canvas5Graph
Definition: Canvas5Parser.hxx:73
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:84
Canvas5Parser::m_imageParser
std::shared_ptr< Canvas5Image > m_imageParser
the image parser
Definition: Canvas5Parser.hxx:254
Canvas5Parser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: Canvas5Parser.cxx:2718
librevenge
Definition: MWAWDocument.hxx:57
Canvas5Parser::m_state
std::shared_ptr< Canvas5ParserInternal::State > m_state
the state
Definition: Canvas5Parser.hxx:250
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:213
Canvas5Parser::getTextLink
librevenge::RVNGString getTextLink(int textLinkId) const
returns the link corresponding to a text id
Definition: Canvas5Parser.cxx:208
Canvas5Parser::readString
bool readString(Canvas5Structure::Stream &stream, librevenge::RVNGString &string, int maxSize, bool canBeCString=false)
try to read a pascal string in the data fork or a Pascal/C string depending on the file type
Definition: Canvas5Parser.cxx:2971
Canvas5ParserInternal::Slide::m_numLayers
int m_numLayers
the number of layer
Definition: Canvas5Parser.cxx:84
Canvas5StyleManager
the main class to read the style part of Canvas 5 file
Definition: Canvas5StyleManager.hxx:86
Canvas5Parser::readPrinterRsrc
bool readPrinterRsrc(Canvas5Structure::Stream &stream)
try to read a printer rsrc
Definition: Canvas5Parser.cxx:2015
Canvas5Parser::m_graphParser
std::shared_ptr< Canvas5Graph > m_graphParser
the graph parser
Definition: Canvas5Parser.hxx:252
MWAWPageSpan::getFormLength
double getFormLength() const
returns the page length
Definition: MWAWPageSpan.hxx:117
Canvas5StyleManager::CharStyle
a structure use to store a character style
Definition: Canvas5StyleManager.hxx:92
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
Canvas5ParserInternal::Layer::Layer
Layer()
constructor
Definition: Canvas5Parser.cxx:92
MWAWParser.hxx
Canvas5Parser::Canvas5Image
friend class Canvas5Image
Definition: Canvas5Parser.hxx:74
MWAWParser::resetGraphicListener
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
MWAWGraphicListener
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
Canvas5Parser::readDouble
bool readDouble(Canvas5Structure::Stream &stream, double &val, bool &isNaN) const
try to read a double 8
Definition: Canvas5Parser.cxx:2959

Generated on Mon Jul 26 2021 00:00:00 for libmwaw by doxygen 1.8.20