MacDraftParser.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 MACDRAFT_PARSER
35 # define MACDRAFT_PARSER
36 
37 #include <string>
38 #include <vector>
39 
40 #include <librevenge/librevenge.h>
41 
42 #include "MWAWDebug.hxx"
43 #include "MWAWInputStream.hxx"
44 
45 #include "MWAWParser.hxx"
46 
47 namespace MacDraftParserInternal
48 {
49 struct Shape;
50 struct State;
51 
52 class SubDocument;
53 }
54 
58 class MacDraftParser final : public MWAWGraphicParser
59 {
61 public:
63  MacDraftParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
65  ~MacDraftParser() final;
66 
68  bool checkHeader(MWAWHeader *header, bool strict=false) final;
69 
70  // the main parse function
71  void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
72 
73 protected:
75  void init();
76 
78  void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
79 
80 protected:
82  bool createZones();
83 
84  // Intermediate level
85 
87  bool readObject();
89  bool readLabel();
91  bool readPattern();
93  bool readBitmapDefinition(MacDraftParserInternal::Shape &bitmap);
95  bool readBitmapData();
97  bool readZone();
99  bool readPrintInfo();
101  bool readDocHeader();
102 
103  //
104  // low level
105  //
106 
108  bool send(MacDraftParserInternal::Shape const &shape);
110  bool sendBitmap(MacDraftParserInternal::Shape const &bitmap, MWAWPosition const &position);
112  bool sendText(int zoneId);
113 
114  //
115  // data
116  //
118  std::shared_ptr<MacDraftParserInternal::State> m_state;
119 };
120 #endif
121 // 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
MWAWParagraph::m_justify
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
MWAWGraphicStyle::Pattern::getUniqueColor
bool getUniqueColor(MWAWColor &col) const
check if the pattern has only one color; if so returns true...
Definition: MWAWGraphicStyle.cxx:86
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MacDraftParserInternal::Shape::Text
@ Text
Definition: MacDraftParser.cxx:88
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
MWAWFont::smallCapsBit
@ smallCapsBit
Definition: MWAWFont.hxx:192
MWAWGraphicShape::getBdBox
MWAWBox2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:197
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MacDraftParserInternal::Shape::m_font
MWAWFont m_font
the font ( for a text box)
Definition: MacDraftParser.cxx:193
MacDraftParser::readPattern
bool readPattern()
try to read a pattern
Definition: MacDraftParser.cxx:1195
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MacDraftParserInternal::Shape::Unknown
@ Unknown
Definition: MacDraftParser.cxx:88
MWAWParser::getGraphicListener
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
MWAWGraphicStyle::setSurfaceColor
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:415
MacDraftParserInternal::Shape::transform
void transform(float rotate, bool flipX, MWAWVec2f const &center)
transform a shape
Definition: MacDraftParser.cxx:126
MacDraftParser::readZone
bool readZone()
try to a unknown zone
Definition: MacDraftParser.cxx:562
MacDraftParserInternal::Shape::m_labelWidth
float m_labelWidth
the 1D label width in point
Definition: MacDraftParser.cxx:199
MWAWGraphicShape::pie
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
MWAWGraphicShape::translate
void translate(MWAWVec2f const &delta)
translate all the coordinate by delta
Definition: MWAWGraphicShape.cxx:356
MacDraftParser::~MacDraftParser
~MacDraftParser() final
destructor
Definition: MacDraftParser.cxx:344
MWAWGraphicStyle::Arrow::plain
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MWAWGraphicStyle::m_surfaceOpacity
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:520
MacDraftParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MacDraftParser.cxx:296
MWAWEmbeddedObject::m_dataList
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:512
MacDraftParser::MacDraftParser
MacDraftParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MacDraftParser.cxx:337
MWAWColor::white
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MacDraftParserInternal::Shape::m_childList
std::vector< size_t > m_childList
the child list ( for a group )
Definition: MacDraftParser.cxx:201
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
MacDraftParserInternal::Shape::m_id
int m_id
the shape id
Definition: MacDraftParser.cxx:189
MacDraftParserInternal::Shape::Label
@ Label
Definition: MacDraftParser.cxx:88
MacDraftParserInternal::BitmapFileData::m_entry
MWAWEntry m_entry
the data position
Definition: MacDraftParser.cxx:82
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
MWAWGraphicShape
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
MacDraftParserInternal::BitmapFileData::m_id
unsigned long m_id
the bitmap id
Definition: MacDraftParser.cxx:76
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
MacDraftParserInternal::Shape::Shape
Shape()
constructor
Definition: MacDraftParser.cxx:91
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWGraphicShape::line
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
MacDraftParser::createZones
bool createZones()
finds the different objects zones
Definition: MacDraftParser.cxx:418
MWAWPrinter.hxx
MacDraftParserInternal::Shape::m_nextId
int m_nextId
the following id (if set)
Definition: MacDraftParser.cxx:191
MWAWDocument::MWAW_K_DRAW
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MWAWPictBitmap::getBinary
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
MacDraftParserInternal::State::m_shapeList
std::vector< Shape > m_shapeList
the shapes list
Definition: MacDraftParser.cxx:240
MacDraftParserInternal::State::m_patternList
std::vector< MWAWGraphicStyle::Pattern > m_patternList
the patterns list
Definition: MacDraftParser.cxx:238
MacDraftParserInternal::Shape::m_bitmapIdList
std::vector< unsigned long > m_bitmapIdList
the list of bitmap id ( for a bitmap)
Definition: MacDraftParser.cxx:203
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MacDraftParserInternal::State::m_version
int m_version
the file version
Definition: MacDraftParser.cxx:236
MacDraftParserInternal::SubDocument::SubDocument
SubDocument(MacDraftParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: MacDraftParser.cxx:286
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWGraphicShape::m_bdBox
MWAWBox2f m_bdBox
the shape bdbox
Definition: MWAWGraphicShape.hxx:218
MWAWGraphicStyle::Pattern::m_data
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
MWAWPictBitmapColor::set
void set(int i, int j, MWAWColor const &v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:529
MacDraftParserInternal::Shape::m_patternId
int m_patternId
the pattern id
Definition: MacDraftParser.cxx:183
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MWAWFont::embossBit
@ embossBit
Definition: MWAWFont.hxx:190
MacDraftParser::m_state
std::shared_ptr< MacDraftParserInternal::State > m_state
the state
Definition: MacDraftParser.hxx:118
MWAWFont::uppercaseBit
@ uppercaseBit
Definition: MWAWFont.hxx:192
MWAWGraphicShape::circle
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
MacDraftParserInternal::Shape::m_style
MWAWGraphicStyle m_style
the graphic style
Definition: MacDraftParser.cxx:181
MacDraftParser::send
bool send(MacDraftParserInternal::Shape const &shape)
try to send a shape
Definition: MacDraftParser.cxx:1684
MWAWPictBitmapColor::setRow
void setRow(int j, MWAWColor const *val)
sets all cell contents of a row
Definition: MWAWPictBitmap.hxx:534
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MacDraftParserInternal::Shape::m_paragraph
MWAWParagraph m_paragraph
the paragraph ( for a text box)
Definition: MacDraftParser.cxx:195
MWAWGraphicStyle::Pattern
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
MWAWSubDocument.hxx
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWGraphicShape::Polygon
@ Polygon
Definition: MWAWGraphicShape.hxx:49
MWAWBox2::getUnion
MWAWBox2< T > getUnion(MWAWBox2< T > const &box) const
returns the union between this and box
Definition: libmwaw_internal.hxx:1129
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MacDraftParserInternal::State::getPattern
bool getPattern(int id, MWAWGraphicStyle::Pattern &pat)
returns a pattern if posible
Definition: MacDraftParser.cxx:222
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWParagraph.hxx
MacDraftParserInternal::State::m_idToBitmapMap
std::map< unsigned long, BitmapFileData > m_idToBitmapMap
map id to bitmap file data
Definition: MacDraftParser.cxx:242
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
MacDraftParserInternal::Shape::m_type
Type m_type
the graphic type
Definition: MacDraftParser.cxx:175
MWAWDocument::MWAW_T_MACDRAFT
@ MWAW_T_MACDRAFT
MacDraft: v1, v4-v5.
Definition: MWAWDocument.hxx:123
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
MacDraftParserInternal::Shape::translate
void translate(MWAWVec2f const &dir)
translate a shape
Definition: MacDraftParser.cxx:118
MacDraftParserInternal::Shape::m_shape
MWAWGraphicShape m_shape
the graphic shape ( for basic geometric form )
Definition: MacDraftParser.cxx:185
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
MacDraftParser::readLabel
bool readLabel()
try to read a label
Definition: MacDraftParser.cxx:1249
MacDraftParser::sendBitmap
bool sendBitmap(MacDraftParserInternal::Shape const &bitmap, MWAWPosition const &position)
try to send a bitmap
Definition: MacDraftParser.cxx:1773
MWAWGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
MacDraftParser::createDocument
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacDraftParser.cxx:396
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
MacDraftParserInternal::Shape::getBdBox
MWAWBox2f getBdBox() const
return the shape bdbox
Definition: MacDraftParser.cxx:113
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MacDraftParser::readBitmapData
bool readBitmapData()
try to read bitmap data
Definition: MacDraftParser.cxx:1066
MacDraftParserInternal::Shape::m_box
MWAWBox2f m_box
the shape bdbox
Definition: MacDraftParser.cxx:177
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MacDraftParser::readBitmapDefinition
bool readBitmapDefinition(MacDraftParserInternal::Shape &bitmap)
try to read bitmap definition
Definition: MacDraftParser.cxx:1123
MWAWGraphicShape::m_vertices
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:226
MWAWGraphicStyle::m_flip
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: MWAWGraphicStyle.hxx:560
MacDraftParserInternal::Shape::m_isLine
bool m_isLine
flag to know if the shape is a line
Definition: MacDraftParser.cxx:187
MWAWParser::setGraphicListener
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
M_PI
#define M_PI
Definition: libmwaw_internal.hxx:52
MWAWGraphicStyle::Pattern::m_dim
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
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
MacDraftParserInternal::BitmapFileData
low level: bitmap file position in a MacDraft file
Definition: MacDraftParser.cxx:59
MacDraftParser::readPrintInfo
bool readPrintInfo()
try to read the print info zone
Definition: MacDraftParser.cxx:1622
MacDraftParserInternal::Shape::rotateBox
static MWAWBox2f rotateBox(MWAWBox2f const &box, float angle, MWAWVec2f const &center)
returns the rotation of a box
Definition: MacDraftParser.cxx:159
MWAWGraphicShape::m_type
Type m_type
the type
Definition: MWAWGraphicShape.hxx:216
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWVec2< float >
MWAWGraphicListener.hxx
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
MWAWFont::getDebugString
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MWAWPosition::setOrigin
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:210
MacDraftParserInternal::SubDocument
Internal: the subdocument of a MacDraftParser.
Definition: MacDraftParser.cxx:284
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
MWAWGraphicShape::rotate
MWAWGraphicShape rotate(float angle, MWAWVec2f const &center) const
return a new shape corresponding to a rotation from center.
Definition: MWAWGraphicShape.cxx:381
MWAWGraphicStyle::m_arrows
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
MacDraftParserInternal::SubDocument::SubDocument
SubDocument(SubDocument const &orig)=delete
MWAWGraphicStyle::setPattern
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:426
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
MacDraftParserInternal::BitmapFileData::m_dimension
MWAWBox2i m_dimension
the bitmap dimension
Definition: MacDraftParser.cxx:80
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
MacDraftParserInternal::Shape::m_textEntry
MWAWEntry m_textEntry
the textbox entry (main text)
Definition: MacDraftParser.cxx:197
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
MacDraftParserInternal::Shape::Basic
@ Basic
Definition: MacDraftParser.cxx:88
MacDraftParserInternal::BitmapFileData::ok
bool ok() const
check is the entry is coherent
Definition: MacDraftParser.cxx:69
MacDraftParserInternal::Shape
generic class used to store shape in MWAWDraftParser
Definition: MacDraftParser.cxx:86
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
MWAWGraphicShape::m_cornerWidth
MWAWVec2f m_cornerWidth
the rectangle round corner
Definition: MWAWGraphicShape.hxx:222
MacDraftParserInternal::Shape::m_isSent
bool m_isSent
a flag used to know if the object is sent to the listener or not
Definition: MacDraftParser.cxx:207
MWAWGraphicShape::arc
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
MacDraftParser::readObject
bool readObject()
try to read an object
Definition: MacDraftParser.cxx:593
MacDraftParserInternal::Shape::Bitmap
@ Bitmap
Definition: MacDraftParser.cxx:88
MWAWGraphicStyle::Pattern::m_colors
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
MacDraftParserInternal::Shape::m_bitmapDimensionList
std::vector< MWAWBox2i > m_bitmapDimensionList
the list of bitmap dimension ( for a bitmap)
Definition: MacDraftParser.cxx:205
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MacDraftParser::parse
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: MacDraftParser.cxx:361
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
MacDraftParserInternal::Shape::Type
Type
the different shape
Definition: MacDraftParser.cxx:88
MacDraftParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MacDraftParser.cxx:293
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWFont::setSize
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MacDraftParserInternal::Shape::Group
@ Group
Definition: MacDraftParser.cxx:88
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
MacDraftParserInternal::State::initPatterns
void initPatterns()
init the patterns list
Definition: MacDraftParser.cxx:245
MWAWBox2::center
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
MWAWGraphicStyle.hxx
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MacDraftParserInternal::BitmapFileData::m_rowSize
int m_rowSize
the row size
Definition: MacDraftParser.cxx:78
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MacDraftParser::init
void init()
inits all internal variables
Definition: MacDraftParser.cxx:348
MacDraftParser::readDocHeader
bool readDocHeader()
try to the doc header zone ( mainly unknown )
Definition: MacDraftParser.cxx:1444
MacDraftParserInternal::BitmapFileData::BitmapFileData
BitmapFileData()
constructor
Definition: MacDraftParser.cxx:61
MacDraftParser.hxx
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MacDraftParserInternal::Shape::m_origin
MWAWVec2f m_origin
the shape origin
Definition: MacDraftParser.cxx:179
MacDraftParserInternal::SubDocument::operator=
SubDocument & operator=(SubDocument const &orig)=delete
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
MacDraftParserInternal
Internal: the structures of a MacDraftParser.
Definition: MacDraftParser.cxx:57
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
MWAWGraphicShape::scale
void scale(MWAWVec2f const &factor)
rescale all the coordinate
Definition: MWAWGraphicShape.cxx:368
MWAWInputStream.hxx
MacDraftParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MacDraftParser.cxx:316
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:84
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
MWAWPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
librevenge
Definition: MWAWDocument.hxx:57
MWAWGraphicStyle::m_rotate
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
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
MacDraftParser
the main class to read a MacDraft v1 file
Definition: MacDraftParser.hxx:59
MacDraftParserInternal::State
Internal: the state of a MacDraftParser.
Definition: MacDraftParser.cxx:212
MWAWBox2< int >
MWAWPictBitmapColor
a bitmap of MWAWColor to store true color bitmap
Definition: MWAWPictBitmap.hxx:469
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MacDraftParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MacDraftParser.cxx:1363
MacDraftParserInternal::State::State
State()
constructor
Definition: MacDraftParser.cxx:214
MWAWGraphicShape::rectangle
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
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
MWAWParser.hxx
MacDraftParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MacDraftParser.cxx:310
MWAWFont::setUnderlineStyle
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
MWAWParser::resetGraphicListener
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
MacDraftParser::sendText
bool sendText(int zoneId)
try to send a text zone to the listener
Definition: MacDraftParser.cxx:1853
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
MWAWGraphicListener
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
MWAWGraphicShape::m_formBox
MWAWBox2f m_formBox
the internal shape bdbox ( used for arc, circle to store the circle bdbox )
Definition: MWAWGraphicShape.hxx:220
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
MWAWFont::lowercaseBit
@ lowercaseBit
Definition: MWAWFont.hxx:193

Generated on Fri Sep 18 2020 18:14:52 for libmwaw by doxygen 1.8.20