Go to the documentation of this file.
35 # define CANVAS_PARSER
40 #include <librevenge/librevenge.h>
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWInputStreamPtr m_input
the initial input
Definition: CanvasParser.cxx:117
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
bool decode(long length)
try to decode some data: length==-1 means decode end of input
Definition: CanvasParser.cxx:565
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
bool readPage(MWAWEntry const &entry)
read the Windows Page RSRC: v3
Definition: CanvasParser.cxx:2202
int m_numViews
the number of views
Definition: CanvasParser.cxx:513
friend class CanvasStyleManager
Definition: CanvasParser.hxx:66
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
bool readPrintInfo(MWAWInputStreamPtr input, MWAWEntry const &entry, libmwaw::DebugFile &ascFile)
read the print info zone
Definition: CanvasParser.cxx:1773
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
MWAWInputStreamPtr & getInput()
returns the current input
Definition: CanvasParser.cxx:558
bool readPrinterSST(MWAWEntry const &entry)
read the Windows PSST RSRC: v3 (the printer, device name, ...)
Definition: CanvasParser.cxx:2321
bool readWindows(MWAWInputStreamPtr input, MWAWEntry const &entry, libmwaw::DebugFile &ascFile)
read the RSRC Windows zone: v3
Definition: CanvasParser.cxx:1977
@ MWAW_T_CANVAS
Deneba Canvas: v2-v3.
Definition: MWAWDocument.hxx:228
Internal: the structures of a CanvasParser.
Definition: CanvasParser.cxx:65
std::shared_ptr< CanvasGraph > m_graphParser
the graph parser
Definition: CanvasParser.hxx:195
bool readViews()
try to read the views
Definition: CanvasParser.cxx:1562
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
Layer()
constructor
Definition: CanvasParser.cxx:69
int id() const
returns the id
Definition: MWAWEntry.hxx:164
bool readUnknownZone2()
read an unknown zone
Definition: CanvasParser.cxx:1476
int m_numShapes
the number of shapes
Definition: CanvasParser.cxx:511
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
bool readUnknownZoneHeader()
read the first unknown zone
Definition: CanvasParser.cxx:1093
State()
constructor
Definition: CanvasParser.cxx:474
bool readRSRCWindowsFile()
read the resource file which ends the file
Definition: CanvasParser.cxx:2008
the class to store a color
Definition: libmwaw_internal.hxx:192
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
bool decode3(long length)
try to decode a part of the input: v3
Definition: CanvasParser.cxx:270
std::vector< Layer > m_layers
the layer
Definition: CanvasParser.cxx:526
int version() const
returns the works version
Definition: MWAWParser.hxx:108
friend class CanvasGraph
Definition: CanvasParser.hxx:65
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
librevenge::RVNGPropertyList m_metaData
the meta data
Definition: CanvasParser.cxx:529
bool isWindowsFile() const
returns true if the file is a windows file
Definition: CanvasParser.cxx:577
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
int m_numShapes
the number of shape
Definition: CanvasParser.cxx:78
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
long m_bitmapSize
the file bitmap size (Windows v3)
Definition: CanvasParser.cxx:503
int m_numColors
the number of colors
Definition: CanvasParser.cxx:515
bool readDocumentHeader()
read the document header
Definition: CanvasParser.cxx:971
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
bool append(long length)
try to read the following sz bytes and append them to the output
Definition: CanvasParser.cxx:182
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
Internal: the state of a CanvasParser.
Definition: CanvasParser.cxx:472
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
Decoder()
constructor
Definition: CanvasParser.cxx:87
bool readEndV3()
try to read the end zone: v3
Definition: CanvasParser.cxx:1612
the main class to read the style part of Canvas file
Definition: CanvasStyleManager.hxx:67
MWAWInputStreamPtr m_input
the uncompressed input
Definition: CanvasParser.cxx:505
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
Internal and low level: the decoder of a canvas file.
Definition: CanvasParser.cxx:85
the main class to read a Canvas 2 and 3 files
Definition: CanvasParser.hxx:64
~CanvasParser() final
destructor
Definition: CanvasParser.cxx:554
Decoder m_decoder
the main decoder
Definition: CanvasParser.cxx:507
MWAWVec2i m_pageDimension
the page dimension
Definition: CanvasParser.cxx:524
std::vector< unsigned long > m_lengths
the file header first 4+1 lengths
Definition: CanvasParser.cxx:499
bool readUsers(MWAWInputStreamPtr input, MWAWEntry const &entry, libmwaw::DebugFile &ascFile)
read the RSRC user zone: v3
Definition: CanvasParser.cxx:1912
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
bool readLayers()
try to read the layers
Definition: CanvasParser.cxx:753
bool readMacroNames()
read the macro names
Definition: CanvasParser.cxx:1060
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
bool readUnknownZone3()
read an unknown zone
Definition: CanvasParser.cxx:1497
T x() const
first element
Definition: libmwaw_internal.hxx:668
static bool s_showData
Definition: CanvasParser.cxx:268
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
bool readFormats()
read the formats' zone, mainly an unit's conversion table
Definition: CanvasParser.cxx:1320
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
double getFormWidth() const
returns the page width
Definition: MWAWPageSpan.hxx:122
bool readSprays()
try to read the spray
Definition: CanvasParser.cxx:1294
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
bool m_isWindowsFile
true if this is a windows file
Definition: CanvasParser.cxx:497
Definition: libmwaw_internal.hxx:144
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
bool isEnd() const
returns true if the input is completly decoded
Definition: CanvasParser.cxx:98
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
bool readUnknownZone0()
read an unknown zone: contains a layer name, some font id,sz, ...
Definition: CanvasParser.cxx:1110
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
bool m_isWindows
a flag to know if the file is a windows file
Definition: CanvasParser.cxx:115
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
std::vector< unsigned long > m_sprayLengths
the list of spray size
Definition: CanvasParser.cxx:519
long m_inputPos
the input current position
Definition: CanvasParser.cxx:119
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
std::shared_ptr< CanvasStyleManager > m_styleManager
the style manager
Definition: CanvasParser.hxx:197
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: CanvasParser.cxx:846
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWVec2i m_numPages
the number of pages
Definition: CanvasParser.cxx:522
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
bool createZones()
finds the different objects zones
Definition: CanvasParser.cxx:658
bool readGrids()
read the grid: or a list which begins by a grid
Definition: CanvasParser.cxx:1357
bool readLPOL(MWAWInputStreamPtr input, MWAWEntry const &entry, libmwaw::DebugFile &ascFile)
read the RSRC LPol zone: v3
Definition: CanvasParser.cxx:1838
bool decode(long length=-1)
try to decode a part of the input
Definition: CanvasParser.cxx:212
a basic gradient used in a MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:139
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
int m_numPatterns
the number of patterns
Definition: CanvasParser.cxx:517
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: CanvasParser.cxx:629
bool readBrushes()
try to read the brush
Definition: CanvasParser.cxx:1216
std::shared_ptr< CanvasParserInternal::State > m_state
the state
Definition: CanvasParser.hxx:193
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
the main class to read the graphic part of Canvas file
Definition: CanvasGraph.hxx:71
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
bool readRSRCFileHeader(MWAWInputStreamPtr input, MWAWEntry const &entry, libmwaw::DebugFile &ascFile)
read the RSRC HeAd(a copy of file header) zone: v3
Definition: CanvasParser.cxx:1870
bool send(CanvasParserInternal::Layer const &layer)
tries to send a layer
Definition: CanvasParser.cxx:2363
bool readFileHeader()
read the file header: list of unknown numbers
Definition: CanvasParser.cxx:900
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: CanvasParser.cxx:585
Internal: the layer of a CanvasParser.
Definition: CanvasParser.cxx:67
librevenge::RVNGString m_name
the layer name
Definition: CanvasParser.cxx:76
bool readCSet(MWAWEntry const &entry)
read the Windows CSet RSRC: v3 (contains the string Default)
Definition: CanvasParser.cxx:2177
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:51
bool readString(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: CanvasParser.cxx:1718
Definition: MWAWDocument.hxx:57
bool readPrinterDev(MWAWEntry const &entry)
read the Windows DevM RSRC: v3 (main data of the printer device)
Definition: CanvasParser.cxx:2289
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
bool readUnknownZone4()
read an unknown zone: the last zone of a v2 files
Definition: CanvasParser.cxx:1523
std::vector< unsigned long > m_brushLengths
the brush lengths
Definition: CanvasParser.cxx:501
bool readUnknownZone1()
read an unknown zone
Definition: CanvasParser.cxx:1424
std::vector< int > m_shapesId
the shape id
Definition: CanvasParser.cxx:80
bool readCNam(MWAWEntry const &entry)
read the Windows CNam RSRC: v3 (always 256 0's bytes)
Definition: CanvasParser.cxx:2146
bool initOutput(MWAWInputStreamPtr &input, unsigned long const headerSize=0x89c)
first function to init the output (and copy the first headerSize characters)
Definition: CanvasParser.cxx:162
double getFormLength() const
returns the page length
Definition: MWAWPageSpan.hxx:117
CanvasParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: CanvasParser.cxx:537
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
int m_numLayers
the number of layer
Definition: CanvasParser.cxx:509
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
std::shared_ptr< MWAWStringStream > m_stream
the current stream
Definition: CanvasParser.cxx:121
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
bool unpackBits(unsigned char const(&buffer)[256], int n, unsigned char(&buffer2)[256], int &n2) const
try to unpack some bits from buffer into buffer2, assuming buffer and buffer2 differs
Definition: CanvasParser.cxx:124
internal class used to create a RVNGInputStream from a unsigned char's pointer
Definition: MWAWStringStream.hxx:37
int m_version
the file version
Definition: CanvasParser.cxx:113
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20