34 #ifndef CANVAS5_PARSER 35 # define CANVAS5_PARSER 43 #include <librevenge/librevenge.h> 187 , m_type(unsigned(-1))
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);
233 bool readArray9(std::shared_ptr<Canvas5Structure::Stream> stream, std::string
const &what,
250 std::shared_ptr<Canvas5ParserInternal::State>
m_state;
bool readSI200(Canvas5Structure::Stream &stream)
try to read the SI200 zone: v6
Definition: Canvas5Parser.cxx:1518
unsigned m_type
the type (if known)
Definition: Canvas5Parser.hxx:197
std::shared_ptr< Canvas5Graph > m_graphParser
the graph parser
Definition: Canvas5Parser.hxx:252
bool send(Canvas5ParserInternal::Slide const &slide)
try to send a page/slide
Definition: Canvas5Parser.cxx:2856
bool readItemHeader9(Canvas5Structure::Stream &stream, int &id, int &used)
try to read an array item header: v9
Definition: Canvas5Parser.cxx:3484
bool readObjectDBRsrc(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the object database: XOBD v6
Definition: Canvas5Parser.cxx:2234
bool readOLnkRsrc(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the OLnk rsrc block: v6
Definition: Canvas5Parser.cxx:2176
Definition: MWAWDocument.hxx:56
bool readDocumentSettings(std::shared_ptr< Canvas5Structure::Stream > stream)
read the document settings
Definition: Canvas5Parser.cxx:1774
bool readFileHeader(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the file header
Definition: Canvas5Parser.cxx:1653
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
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
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
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
bool readDefined(Canvas5Structure::Stream &stream, std::vector< bool > &defined, std::string const &what)
try to read the defined list
Definition: Canvas5Parser.cxx:3246
long m_length
the data length (from current position)
Definition: Canvas5Parser.hxx:199
bool isWindowsFile() const
returns true if the file is a windows file
Definition: Canvas5Parser.cxx:202
static MWAWInputStreamPtr decode(MWAWInputStreamPtr input, int version)
try to decode the input stream
Definition: Canvas5Parser.cxx:3598
Internal: the structures of a Canvas5Parser.
Definition: Canvas5Parser.cxx:70
the main class to read the graphic part of Canvas v5-v11 file
Definition: Canvas5Graph.hxx:84
bool readMainBlock9(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the first big block: v9
Definition: Canvas5Parser.cxx:492
bool readFileDesc(Canvas5Structure::Stream &stream)
try to read the last block: some pathes, ...
Definition: Canvas5Parser.cxx:1592
std::shared_ptr< Canvas5ParserInternal::State > m_state
the state
Definition: Canvas5Parser.hxx:250
bool readUsed(Canvas5Structure::Stream &stream, std::string const &what)
try to read the used list
Definition: Canvas5Parser.cxx:3300
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
bool readDouble(Canvas5Structure::Stream &stream, double &val, bool &isNaN) const
try to read a double 8
Definition: Canvas5Parser.cxx:2959
bool readLayers(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the different layers
Definition: Canvas5Parser.cxx:1908
bool readSlides(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the list of slides
Definition: Canvas5Parser.cxx:2392
int version() const
returns the works version
Definition: MWAWParser.hxx:108
a structure used to store the item data of a Canvas5Parser
Definition: Canvas5Parser.hxx:183
bool readPrinterRsrc(Canvas5Structure::Stream &stream)
try to read a printer rsrc
Definition: Canvas5Parser.cxx:2015
~Canvas5Parser() final
destructor
Definition: Canvas5Parser.cxx:198
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:49
int m_id
the identifier
Definition: Canvas5Parser.hxx:195
bool readMainBlock(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the first big block
Definition: Canvas5Parser.cxx:458
std::shared_ptr< Canvas5StyleManager > m_styleManager
the style manager
Definition: Canvas5Parser.hxx:256
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: Canvas5Parser.cxx:221
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
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:250
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: Canvas5Parser.cxx:2718
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
librevenge::RVNGString getTextLink(int textLinkId) const
returns the link corresponding to a text id
Definition: Canvas5Parser.cxx:208
the main class to read the style part of Canvas 5 file
Definition: Canvas5StyleManager.hxx:85
Item()
constructor
Definition: Canvas5Parser.hxx:185
the main class to read a Canvas 5-10 files (and probably some not password protected Windows 11 files...
Definition: Canvas5Parser.hxx:71
bool readFileRSRCs(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the third big block: a list of resource?, font, ...
Definition: Canvas5Parser.cxx:619
bool readPicture(Canvas5Structure::Stream &stream, MWAWEntry const &entry)
read the RSRC Pict zone
Definition: Canvas5Parser.cxx:2812
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
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
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
bool readTextLinks(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the text links
Definition: Canvas5Parser.cxx:2288
std::shared_ptr< Canvas5Image > m_imageParser
the image parser
Definition: Canvas5Parser.hxx:254
bool createZones()
finds the different objects zones
Definition: Canvas5Parser.cxx:381
long m_pos
the data beginning position (may be before the current position: v9)
Definition: Canvas5Parser.hxx:201
int m_decal
the decal position
Definition: Canvas5Parser.hxx:203
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
a namespace used to define basic function or structure to read a Canvas v5-v11 file ...
Definition: Canvas5BMParser.hxx:63
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
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
bool readPnot(Canvas5Structure::Stream &stream, MWAWEntry const &entry)
read the RSRC 0 pnot zone
Definition: Canvas5Parser.cxx:2784
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: Canvas5Parser.cxx:253
the main class to read/convert the image or movie inside of Canvas 5-11 files
Definition: Canvas5Image.hxx:77
Canvas5Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: Canvas5Parser.cxx:179