Go to the documentation of this file.
34 #ifndef DRAWTABLE_PARSER
35 # define DRAWTABLE_PARSER
40 #include <librevenge/librevenge.h>
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
MWAWParagraph m_para
the paragraph style
Definition: DrawTableParser.cxx:196
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
State()
constructor
Definition: DrawTableParser.cxx:68
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
~DrawTableParser() final
destructor
Definition: DrawTableParser.cxx:252
MWAWVec2f m_maxDim
the max dimensions
Definition: DrawTableParser.cxx:86
MWAWBox2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:197
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
bool getBitmap(MWAWBox2i const &box, MWAWEmbeddedObject &obj, long endPos)
try to read a bitmap
Definition: DrawTableParser.cxx:1209
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:446
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
Internal: the subdocument of a DrawTableParser.
Definition: DrawTableParser.cxx:176
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:228
void set(int i, int j, int v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:425
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
@ boldBit
Definition: MWAWFont.hxx:190
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: DrawTableParser.cxx:259
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: DrawTableParser.cxx:289
@ Simple
Definition: MWAWFont.hxx:49
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
~SubDocument() final
destructor
Definition: DrawTableParser.cxx:187
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
MWAWColor getColor(int id) const
try to return a color
Definition: DrawTableParser.cxx:89
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
std::vector< unsigned char > m_data
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1],...
Definition: MWAWGraphicStyle.hxx:363
SubDocument & operator=(SubDocument const &orig)=delete
std::shared_ptr< DrawTableParserInternal::State > m_state
the state
Definition: DrawTableParser.hxx:112
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ embossBit
Definition: MWAWFont.hxx:190
bool getPattern(int id, MWAWGraphicStyle::Pattern &pat) const
try to init a patterns
Definition: DrawTableParser.cxx:102
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:165
int m_openedGroup
the number of opened groups
Definition: DrawTableParser.cxx:82
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:401
@ shadowBit
Definition: MWAWFont.hxx:191
bool sendShapes()
try to send the different shape
Definition: DrawTableParser.cxx:684
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
T y() const
second element
Definition: libmwaw_internal.hxx:673
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
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
T x() const
first element
Definition: libmwaw_internal.hxx:668
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:226
Internal: the state of a DrawTableParser.
Definition: DrawTableParser.cxx:66
MWAWFont m_font
the font style
Definition: DrawTableParser.cxx:194
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
bool sendShape()
try to send a shape
Definition: DrawTableParser.cxx:713
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
#define M_PI
Definition: libmwaw_internal.hxx:52
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
double getFormWidth() const
returns the page width
Definition: MWAWPageSpan.hxx:122
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
SubDocument(DrawTableParser &parser, MWAWInputStreamPtr const &input, MWAWEntry const &entry, MWAWFont const &font, MWAWParagraph const ¶)
constructor from a zoneId
Definition: DrawTableParser.cxx:179
Definition: libmwaw_internal.hxx:144
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
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
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:426
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
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
Internal: the structures of a DrawTableParser.
Definition: DrawTableParser.cxx:62
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
std::vector< MWAWGraphicStyle::Pattern > m_patternList
the patterns list
Definition: DrawTableParser.cxx:84
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
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
static ReadResult check(MWAWInputStreamPtr const &input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
bool readFonts()
try to read the font zones
Definition: DrawTableParser.cxx:420
@ italicBit
Definition: MWAWFont.hxx:190
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:357
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:173
the main class to read a DrawingTable v1 file
Definition: DrawTableParser.hxx:58
SubDocument(SubDocument const &orig)=delete
DrawTableParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: DrawTableParser.cxx:240
void initPatterns()
init the patterns list
Definition: DrawTableParser.cxx:114
@ Page
Definition: MWAWPosition.hxx:51
bool createZones()
finds the different objects zones
Definition: DrawTableParser.cxx:322
@ JustificationRight
Definition: MWAWParagraph.hxx:91
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
bool computeMaxDimension()
try to compute the max dimension
Definition: DrawTableParser.cxx:337
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 readPrintInfo()
read the print info zone
Definition: DrawTableParser.cxx:483
#define MWAW_N_ELEMENTS(m)
Definition: libmwaw_internal.hxx:111
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
bool readPrefs()
read the preferences zone
Definition: DrawTableParser.cxx:523
static MWAWGraphicShape polyline(MWAWBox2f const &box)
static constructor to create a polyline
Definition: MWAWGraphicShape.hxx:157
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
Definition: MWAWDocument.hxx:57
@ MWAW_T_DRAWINGTABLE
Drawing Table: v1.
Definition: MWAWDocument.hxx:232
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
Class to store font.
Definition: MWAWFont.hxx:44
a simple path component
Definition: MWAWGraphicShape.hxx:53
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: DrawTableParser.cxx:647
bool hasSurface() const
returns true if the interior surface is defined
Definition: MWAWGraphicStyle.hxx:442
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
double getFormLength() const
returns the page length
Definition: MWAWPageSpan.hxx:117
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: DrawTableParser.cxx:202
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
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20