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:113
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:562
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
bool readPage(MWAWEntry const &entry)
read the Windows Page RSRC: v3
Definition: CanvasParser.cxx:2199
int m_numViews
the number of views
Definition: CanvasParser.cxx:510
friend class CanvasStyleManager
Definition: CanvasParser.hxx:64
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:1770
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:555
bool readPrinterSST(MWAWEntry const &entry)
read the Windows PSST RSRC: v3 (the printer, device name, ...)
Definition: CanvasParser.cxx:2318
bool readWindows(MWAWInputStreamPtr input, MWAWEntry const &entry, libmwaw::DebugFile &ascFile)
read the RSRC Windows zone: v3
Definition: CanvasParser.cxx:1974
@ 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
Internal: the structures of a CanvasParser.
Definition: CanvasParser.cxx:61
std::shared_ptr< CanvasGraph > m_graphParser
the graph parser
Definition: CanvasParser.hxx:193
bool readViews()
try to read the views
Definition: CanvasParser.cxx:1559
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
Layer()
constructor
Definition: CanvasParser.cxx:65
int id() const
returns the id
Definition: MWAWEntry.hxx:164
bool readUnknownZone2()
read an unknown zone
Definition: CanvasParser.cxx:1473
int m_numShapes
the number of shapes
Definition: CanvasParser.cxx:508
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
bool readUnknownZoneHeader()
read the first unknown zone
Definition: CanvasParser.cxx:1090
State()
constructor
Definition: CanvasParser.cxx:471
bool readRSRCWindowsFile()
read the resource file which ends the file
Definition: CanvasParser.cxx:2005
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:267
std::vector< Layer > m_layers
the layer
Definition: CanvasParser.cxx:523
int version() const
returns the works version
Definition: MWAWParser.hxx:108
friend class CanvasGraph
Definition: CanvasParser.hxx:63
@ 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:526
bool isWindowsFile() const
returns true if the file is a windows file
Definition: CanvasParser.cxx:574
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:74
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:500
int m_numColors
the number of colors
Definition: CanvasParser.cxx:512
bool readDocumentHeader()
read the document header
Definition: CanvasParser.cxx:968
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:178
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
Internal: the state of a CanvasParser.
Definition: CanvasParser.cxx:469
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
Decoder()
constructor
Definition: CanvasParser.cxx:83
bool readEndV3()
try to read the end zone: v3
Definition: CanvasParser.cxx:1609
the main class to read the style part of Canvas file
Definition: CanvasStyleManager.hxx:67
MWAWInputStreamPtr m_input
the uncompressed input
Definition: CanvasParser.cxx:502
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:81
the main class to read a Canvas 2 and 3 files
Definition: CanvasParser.hxx:62
~CanvasParser() final
destructor
Definition: CanvasParser.cxx:551
Decoder m_decoder
the main decoder
Definition: CanvasParser.cxx:504
MWAWVec2i m_pageDimension
the page dimension
Definition: CanvasParser.cxx:521
std::vector< unsigned long > m_lengths
the file header first 4+1 lengths
Definition: CanvasParser.cxx:496
bool readUsers(MWAWInputStreamPtr input, MWAWEntry const &entry, libmwaw::DebugFile &ascFile)
read the RSRC user zone: v3
Definition: CanvasParser.cxx:1909
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:750
bool readMacroNames()
read the macro names
Definition: CanvasParser.cxx:1057
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:1494
T x() const
first element
Definition: libmwaw_internal.hxx:668
static bool s_showData
Definition: CanvasParser.cxx:265
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:1317
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:1291
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:494
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:94
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:1107
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:111
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:516
long m_inputPos
the input current position
Definition: CanvasParser.cxx:115
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
std::shared_ptr< CanvasStyleManager > m_styleManager
the style manager
Definition: CanvasParser.hxx:195
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: CanvasParser.cxx:843
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWVec2i m_numPages
the number of pages
Definition: CanvasParser.cxx:519
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
bool createZones()
finds the different objects zones
Definition: CanvasParser.cxx:655
bool readGrids()
read the grid: or a list which begins by a grid
Definition: CanvasParser.cxx:1354
bool readLPOL(MWAWInputStreamPtr input, MWAWEntry const &entry, libmwaw::DebugFile &ascFile)
read the RSRC LPol zone: v3
Definition: CanvasParser.cxx:1835
bool decode(long length=-1)
try to decode a part of the input
Definition: CanvasParser.cxx:208
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:514
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: CanvasParser.cxx:626
bool readBrushes()
try to read the brush
Definition: CanvasParser.cxx:1213
std::shared_ptr< CanvasParserInternal::State > m_state
the state
Definition: CanvasParser.hxx:191
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:1867
bool send(CanvasParserInternal::Layer const &layer)
tries to send a layer
Definition: CanvasParser.cxx:2360
bool readFileHeader()
read the file header: list of unknown numbers
Definition: CanvasParser.cxx:897
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:582
Internal: the layer of a CanvasParser.
Definition: CanvasParser.cxx:63
librevenge::RVNGString m_name
the layer name
Definition: CanvasParser.cxx:72
bool readCSet(MWAWEntry const &entry)
read the Windows CSet RSRC: v3 (contains the string Default)
Definition: CanvasParser.cxx:2174
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:1715
Definition: MWAWDocument.hxx:57
bool readPrinterDev(MWAWEntry const &entry)
read the Windows DevM RSRC: v3 (main data of the printer device)
Definition: CanvasParser.cxx:2286
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:1520
std::vector< unsigned long > m_brushLengths
the brush lengths
Definition: CanvasParser.cxx:498
bool readUnknownZone1()
read an unknown zone
Definition: CanvasParser.cxx:1421
std::vector< int > m_shapesId
the shape id
Definition: CanvasParser.cxx:76
bool readCNam(MWAWEntry const &entry)
read the Windows CNam RSRC: v3 (always 256 0's bytes)
Definition: CanvasParser.cxx:2143
bool initOutput(MWAWInputStreamPtr &input, unsigned long const headerSize=0x89c)
first function to init the output (and copy the first headerSize characters)
Definition: CanvasParser.cxx:158
double getFormLength() const
returns the page length
Definition: MWAWPageSpan.hxx:117
CanvasParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: CanvasParser.cxx:534
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:506
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:117
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:120
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:109
Generated on Mon Jul 26 2021 00:00:00 for libmwaw by
doxygen 1.8.20