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;
61 
62 namespace Canvas5Structure
63 {
64 struct Stream;
65 }
66 
70 class Canvas5Parser final : public MWAWGraphicParser
71 {
72  friend class Canvas5Graph;
73  friend class Canvas5StyleManager;
74 public:
76  Canvas5Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
78  ~Canvas5Parser() final;
79 
81  bool checkHeader(MWAWHeader *header, bool strict=false) final;
82 
83  // the main parse function
84  void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
85 
87  static std::string getString(unsigned val);
88 
89 protected:
91  void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
92 
93  //
94  // interface
95  //
96 
98  bool isWindowsFile() const;
99 
100 protected:
102  bool createZones();
104  bool readMainBlock(std::shared_ptr<Canvas5Structure::Stream> stream);
106  bool readFileRSRCs(Canvas5Structure::Stream &stream);
108  bool readFileDesc(Canvas5Structure::Stream &stream);
109 
110  // Intermediate level
111 
112  //
113  // first block
114  //
115 
117  bool readFileHeader(Canvas5Structure::Stream &stream);
118 
120  bool readDocumentSettings(Canvas5Structure::Stream &stream);
122  bool readLayers(Canvas5Structure::Stream &stream);
124  bool readPreview(Canvas5Structure::Stream &stream);
126  bool readSlides(Canvas5Structure::Stream &stream);
128  bool readTextLinks(Canvas5Structure::Stream &stream);
129 
130  //
131  // second block
132  //
133 
135  bool readBitmap(Canvas5Structure::Stream &stream, MWAWEmbeddedObject &object, MWAWColor *avgColor=nullptr);
136 
137  //
138  // third block
139  //
140 
142  bool readPrinterRsrc(Canvas5Structure::Stream &stream);
143 
144  //
145  // Mac RSRC
146  //
148  bool readPnot(Canvas5Structure::Stream &stream, MWAWEntry const &entry);
150  bool readPicture(Canvas5Structure::Stream &stream, MWAWEntry const &entry);
151 
152  //
153  // Windows RSRC
154  //
155 
156  //
157  // send data to the listener
158  //
159 
161  bool send(Canvas5ParserInternal::Slide const &slide);
163  bool send(Canvas5ParserInternal::Layer const &layer);
164 
165  //
166  // low level
167  //
168 
170  bool readString(Canvas5Structure::Stream &stream, librevenge::RVNGString &string, int maxSize, bool canBeCString=false);
172  bool readDouble(Canvas5Structure::Stream &stream, double &val, bool &isNaN) const;
174  typedef std::function<void(Canvas5Structure::Stream &, int, std::string const &, long)> DataFunction;
176  static void defDataFunction(Canvas5Structure::Stream &, int, std::string const &, long) {}
178  static void stringDataFunction(Canvas5Structure::Stream &stream, int id, std::string const &what, long len);
179 
181  bool readDataHeader(Canvas5Structure::Stream &stream, int expectedSize, int &N);
186  bool readExtendedHeader(Canvas5Structure::Stream &stream, int expectedValue, std::string const &what, DataFunction const &func);
188  bool readUnknownHeader(Canvas5Structure::Stream &stream, MWAWEntry(&entries)[2], long len, std::string const &what);
189 
191  bool readUsed(Canvas5Structure::Stream &stream, std::string const &what);
193  bool readDefined(Canvas5Structure::Stream &stream, std::vector<bool> &defined, std::string const &what);
194 
196  bool readIndexMap(Canvas5Structure::Stream &stream, std::string const &what, DataFunction const &func=&Canvas5Parser::defDataFunction);
197 
199  bool readSpecialData(long len, unsigned type, std::string &extra);
200 
203 
204  //
205  // data
206  //
208  std::shared_ptr<Canvas5ParserInternal::State> m_state;
210  std::shared_ptr<Canvas5Graph> m_graphParser;
212  std::shared_ptr<Canvas5StyleManager> m_styleManager;
213 };
214 #endif
215 // 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
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:88
MWAWParser::getFontConverter
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
Canvas5Parser::readSlides
bool readSlides(Canvas5Structure::Stream &stream)
try to read the list of slides
Definition: Canvas5Parser.cxx:1666
Canvas5Parser::~Canvas5Parser
~Canvas5Parser() final
destructor
Definition: Canvas5Parser.cxx:181
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
Canvas5ParserInternal::State::m_idToLayer
std::map< int, Layer > m_idToLayer
the layer data
Definition: Canvas5Parser.cxx:154
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:185
MWAWParser::getGraphicListener
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
Canvas5Parser::readLayers
bool readLayers(Canvas5Structure::Stream &stream)
try to read the different layers
Definition: Canvas5Parser.cxx:1251
MWAWDocument::MWAW_T_CANVAS
@ MWAW_T_CANVAS
Deneba Canvas: v2-v3 and v5.
Definition: MWAWDocument.hxx:228
Canvas5Parser::readFileDesc
bool readFileDesc(Canvas5Structure::Stream &stream)
try to read the last block: some pathes, ...
Definition: Canvas5Parser.cxx:750
Canvas5Parser::readExtendedHeader
bool readExtendedHeader(Canvas5Structure::Stream &stream, int expectedValue, std::string const &what, DataFunction const &func)
try to read an extended data header, ie.
Definition: Canvas5Parser.cxx:2119
MWAWInputStream
Internal class used to read the file stream Internal class used to read the file stream,...
Definition: MWAWInputStream.hxx:54
MWAWEmbeddedObject::m_dataList
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:512
MWAWColor::white
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
Canvas5ParserInternal::State::State
State()
constructor
Definition: Canvas5Parser.cxx:111
Canvas5Parser::readTextLinks
bool readTextLinks(Canvas5Structure::Stream &stream)
try to read the text links
Definition: Canvas5Parser.cxx:1565
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
Canvas5Parser::readPreview
bool readPreview(Canvas5Structure::Stream &stream)
try to read the preview picture
Definition: Canvas5Parser.cxx:1356
MWAWFontConverter.hxx
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
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
Canvas5Graph
the main class to read the graphic part of Canvas5 file
Definition: Canvas5Graph.hxx:83
MWAWPrinter.hxx
Canvas5Parser.hxx
MWAWDocument::MWAW_K_DRAW
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
Canvas5Parser::readIndexMap
bool readIndexMap(Canvas5Structure::Stream &stream, std::string const &what, DataFunction const &func=&Canvas5Parser::defDataFunction)
try to read a index map
Definition: Canvas5Parser.cxx:2288
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MWAWColor::str
std::string str() const
print the color in the form #rrggbb
Definition: libmwaw_internal.cxx:232
MWAWPictData::get
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
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:102
Canvas5Structure::Stream::input
MWAWInputStreamPtr input()
returns the input file
Definition: Canvas5Structure.hxx:62
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:164
MWAWPictBitmap::getBinary
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
Canvas5Parser::createDocument
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: Canvas5Parser.cxx:230
Canvas5Parser::readPnot
bool readPnot(Canvas5Structure::Stream &stream, MWAWEntry const &entry)
read the RSRC 0 pnot zone
Definition: Canvas5Parser.cxx:1918
MWAWPictBitmapColor::set
void set(int i, int j, MWAWColor const &v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:537
Canvas5ParserInternal::State::m_numShapes
int m_numShapes
the number of shapes
Definition: Canvas5Parser.cxx:156
Canvas5ParserInternal::Layer::m_name
librevenge::RVNGString m_name
the layer name
Definition: Canvas5Parser.cxx:98
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::readFileRSRCs
bool readFileRSRCs(Canvas5Structure::Stream &stream)
try to read the third big block: a list of resource?, font, ...
Definition: Canvas5Parser.cxx:432
Canvas5ParserInternal::State::m_documentSetup
int m_documentSetup
the document setup: 0 full page, 1: two page bottom/down, 2: four page
Definition: Canvas5Parser.cxx:140
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
Canvas5ParserInternal::State
Internal: the state of a Canvas5Parser.
Definition: Canvas5Parser.cxx:109
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWParagraph.hxx
MWAWRSRCParser.hxx
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWParser::getRSRCParser
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
Canvas5Parser::decode
static MWAWInputStreamPtr decode(MWAWInputStreamPtr input)
try to decode the input stream
Definition: Canvas5Parser.cxx:2505
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
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
Canvas5ParserInternal::Slide::m_dim
MWAWVec2f m_dim
the slide dimension
Definition: Canvas5Parser.cxx:80
Canvas5Parser::readSpecialData
bool readSpecialData(long len, unsigned type, std::string &extra)
try to read a special shape data (internal helper to understand vkfl structure)
Definition: Canvas5Parser.cxx:190
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:67
MWAWParser::setGraphicListener
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
Canvas5Structure
a namespace used to define basic structure to read a Canvas 5 file
Definition: Canvas5Graph.hxx:60
Canvas5ParserInternal::State::m_numLayers
int m_numLayers
the number of layer
Definition: Canvas5Parser.cxx:152
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:198
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 files
Definition: Canvas5Parser.hxx:71
MWAWPageSpan::getFormWidth
double getFormWidth() const
returns the page width
Definition: MWAWPageSpan.hxx:122
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
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:2391
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
Canvas5ParserInternal::Slide::m_layers
std::vector< int > m_layers
the layer id
Definition: Canvas5Parser.cxx:84
Canvas5ParserInternal::State::m_idToSlide
std::map< int, Slide > m_idToSlide
the slide data
Definition: Canvas5Parser.cxx:149
MWAWGraphicParser
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
MWAWColor::black
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
Canvas5Parser::readMainBlock
bool readMainBlock(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the first big block
Definition: Canvas5Parser.cxx:399
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
Canvas5ParserInternal::State::m_stream
std::shared_ptr< Canvas5Structure::Stream > m_stream
the current stream
Definition: Canvas5Parser.cxx:133
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
Canvas5Parser::defDataFunction
static void defDataFunction(Canvas5Structure::Stream &, int, std::string const &, long)
the default function to parse the data of a index map/a extended header
Definition: Canvas5Parser.hxx:176
Canvas5ParserInternal::State::m_fileFlags
int m_fileFlags
the file flags
Definition: Canvas5Parser.cxx:138
Canvas5ParserInternal::State::m_numSlides
int m_numSlides
the number of slides
Definition: Canvas5Parser.cxx:145
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::m_styleManager
std::shared_ptr< Canvas5StyleManager > m_styleManager
the style manager
Definition: Canvas5Parser.hxx:212
Canvas5Graph.hxx
Canvas5ParserInternal::Layer::m_type
int m_type
the layer type (unknonw)
Definition: Canvas5Parser.cxx:104
Canvas5Parser::createZones
bool createZones()
finds the different objects zones
Definition: Canvas5Parser.cxx:342
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
Canvas5Parser::getString
static std::string getString(unsigned val)
very low level: debug print some uint32_t either at char4 or sample int
Definition: Canvas5Parser.cxx:2570
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
Canvas5Parser::readDocumentSettings
bool readDocumentSettings(Canvas5Structure::Stream &stream)
read the document settings
Definition: Canvas5Parser.cxx:914
Canvas5ParserInternal
Internal: the structures of a Canvas5Parser.
Definition: Canvas5Parser.cxx:69
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:142
Canvas5ParserInternal::State::m_isWindowsFile
bool m_isWindowsFile
true if this is a windows file
Definition: Canvas5Parser.cxx:131
Canvas5Parser::stringDataFunction
static void stringDataFunction(Canvas5Structure::Stream &stream, int id, std::string const &what, long len)
the default function to parse the data of a index map/a extended header
Definition: Canvas5Parser.cxx:2272
Canvas5ParserInternal::State::m_slideIds
std::vector< int > m_slideIds
the slides id
Definition: Canvas5Parser.cxx:147
Canvas5Parser::Canvas5StyleManager
friend class Canvas5StyleManager
Definition: Canvas5Parser.hxx:73
Canvas5Parser::readPicture
bool readPicture(Canvas5Structure::Stream &stream, MWAWEntry const &entry)
read the RSRC Pict zone
Definition: Canvas5Parser.cxx:1946
Canvas5Structure::decodeZone
bool decodeZone(MWAWInputStreamPtr input, long endPos, int type, unsigned long finalLength, std::shared_ptr< MWAWStringStream > &stream)
try to decode a zone
Definition: Canvas5Structure.cxx:304
MWAWGraphicStyle.hxx
Canvas5ParserInternal::State::m_type
int m_type
the document type 1: graphic, 2: list of pages, 3: slides
Definition: Canvas5Parser.cxx:136
Canvas5Parser::readFileHeader
bool readFileHeader(Canvas5Structure::Stream &stream)
try to read the file header
Definition: Canvas5Parser.cxx:811
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWPictBitmapIndexed
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:361
Canvas5Parser::readUsed
bool readUsed(Canvas5Structure::Stream &stream, std::string const &what)
try to read the used list
Definition: Canvas5Parser.cxx:2445
Canvas5Structure::Stream
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:46
Canvas5Parser::send
bool send(Canvas5ParserInternal::Slide const &slide)
try to send a page/slide
Definition: Canvas5Parser.cxx:1990
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:71
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:2098
Canvas5ParserInternal::Slide::Slide
Slide()
Definition: Canvas5Parser.cxx:72
Canvas5ParserInternal::Layer::m_numShapes
int m_numShapes
the number of shape
Definition: Canvas5Parser.cxx:100
Canvas5Parser::readUnknownHeader
bool readUnknownHeader(Canvas5Structure::Stream &stream, MWAWEntry(&entries)[2], long len, std::string const &what)
try to read an unknown structure which defined some position and two entries
Definition: Canvas5Parser.cxx:2187
MWAWStringStream.hxx
MWAWInputStream.hxx
Canvas5Parser::Canvas5Graph
friend class Canvas5Graph
Definition: Canvas5Parser.hxx:72
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:84
Canvas5Parser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: Canvas5Parser.cxx:1866
librevenge
Definition: MWAWDocument.hxx:57
Canvas5Parser::m_state
std::shared_ptr< Canvas5ParserInternal::State > m_state
the state
Definition: Canvas5Parser.hxx:208
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
MWAWPictBitmapColor
a bitmap of MWAWColor to store true color bitmap
Definition: MWAWPictBitmap.hxx:475
Canvas5Parser::DataFunction
std::function< void(Canvas5Structure::Stream &, int, std::string const &, long)> DataFunction
a function used to parse the data of a index map/a extended header
Definition: Canvas5Parser.hxx:174
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:2051
Canvas5ParserInternal::Slide::m_numLayers
int m_numLayers
the number of layer
Definition: Canvas5Parser.cxx:82
Canvas5StyleManager
the main class to read the style part of Canvas 5 file
Definition: Canvas5StyleManager.hxx:77
Canvas5Parser::readPrinterRsrc
bool readPrinterRsrc(Canvas5Structure::Stream &stream)
try to read a printer rsrc
Definition: Canvas5Parser.cxx:1426
Canvas5Parser::m_graphParser
std::shared_ptr< Canvas5Graph > m_graphParser
the graph parser
Definition: Canvas5Parser.hxx:210
MWAWPageSpan::getFormLength
double getFormLength() const
returns the page length
Definition: MWAWPageSpan.hxx:117
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:90
MWAWParser.hxx
MWAWParser::resetGraphicListener
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
Canvas5Parser::readBitmap
bool readBitmap(Canvas5Structure::Stream &stream, MWAWEmbeddedObject &object, MWAWColor *avgColor=nullptr)
try to read a bitmap
Definition: Canvas5Parser.cxx:1032
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:2039

Generated on Wed Apr 7 2021 00:00:00 for libmwaw by doxygen 1.8.20