MacDrawProParser.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 MACDRAWPRO_PARSER
35 # define MACDRAWPRO_PARSER
36 
37 #include <map>
38 #include <string>
39 #include <vector>
40 
41 #include <librevenge/librevenge.h>
42 
43 #include "MWAWDebug.hxx"
44 #include "MWAWInputStream.hxx"
45 
46 #include "MWAWParser.hxx"
47 
49 {
50 struct Layer;
51 struct Library;
52 struct Shape;
53 struct State;
54 
55 class SubDocument;
56 }
57 
59 
63 class MacDrawProParser final : public MWAWGraphicParser
64 {
65  friend class MacDrawProStyleManager;
67 public:
69  MacDrawProParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
71  ~MacDrawProParser() final;
72 
74  bool checkHeader(MWAWHeader *header, bool strict=false) final;
75 
76  // the main parse function
77  void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
78 
79 protected:
81  void init();
82 
84  void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
85 
86 protected:
88  bool createZones();
89 
90  // Intermediate level
91 
93  bool readPrintInfo();
95  bool readHeaderInfo();
97  bool readLayersInfo();
101  bool readLibrariesInfo();
103  bool findObjectPositions(bool dataZone);
106 
108  bool readStructuredHeaderZone(MWAWEntry const &entry, std::map<int, long> &idToDeltaPosMap);
109 
110  //
111  // low level
112  //
113 
115  int readObject();
117  bool readObjectData(MacDrawProParserInternal::Shape &shape, int zId);
119  bool readRotationInObjectData(MacDrawProParserInternal::Shape &shape, long endPos, std::string &extra);
121  bool updateGeometryShape(MacDrawProParserInternal::Shape &shape, float cornerWidth);
123  bool readBitmap(MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry);
125  bool readTextII(MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry);
127  bool readTextPro(MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry);
129  bool readGeometryShapeData(MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry);
130 
131  // send functions
132 
134  bool sendMasterPage();
136  bool sendPage(int page);
138  bool send(MacDrawProParserInternal::Library const &library);
140  bool send(MacDrawProParserInternal::Layer const &layer);
142  bool send(MacDrawProParserInternal::Shape const &shape, MWAWVec2f const &orig);
144  bool sendBitmap(MacDrawProParserInternal::Shape const &shape, MWAWPosition const &pos);
146  bool sendText(int zoneId);
148  bool sendMeasure(MWAWEntry const &entry);
150  void flushExtra();
151 
152  //
153  // data
154  //
156  std::shared_ptr<MacDrawProParserInternal::State> m_state;
157 
160 };
161 #endif
162 // 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
MacDrawProParser::readLibrariesInfo
bool readLibrariesInfo()
tries to read the library name info zone
Definition: MacDrawProParser.cxx:880
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
MacDrawProParserInternal::Shape::Type
Type
the different shape
Definition: MacDrawProParser.cxx:116
MacDrawProParserInternal::Shape::m_bitmapEntry
MWAWEntry m_bitmapEntry
the bitmap entry (data)
Definition: MacDrawProParser.cxx:217
MWAWFont::setFont
void setFont(int newId)
sets the font id and resets size to the previous size for this font
Definition: MWAWFont.hxx:252
MacDrawProParser::readObject
int readObject()
tries to read an object and returns the object id (-1 if error )
Definition: MacDrawProParser.cxx:1245
MacDrawProParserInternal::Shape::m_nextId
int m_nextId
the following id (if set)
Definition: MacDrawProParser.cxx:176
MWAWGraphicListenerPtr
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
MWAWEntry::setName
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:148
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
MacDrawProParser
the main class to read a MacDraw II file
Definition: MacDrawProParser.hxx:64
MacDrawProParserInternal::SubDocument
Internal: the subdocument of a MacDrawProParser.
Definition: MacDrawProParser.cxx:369
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
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
MacDrawProParserInternal::Shape::m_textZoneId
int m_textZoneId
the text zone ( for a text box or a note)
Definition: MacDrawProParser.cxx:183
libmwaw::rotateBoxFromCenter
MWAWBox2f rotateBoxFromCenter(MWAWBox2f const &box, float angle)
rotate a bdox and returns the final bdbox, angle is given in degree
Definition: libmwaw_internal.cxx:708
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MacDrawProParserInternal::Shape::Basic
@ Basic
Definition: MacDrawProParser.cxx:116
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
MWAWGraphicStyle::setShadowColor
void setShadowColor(MWAWColor const &col, float opacity=1)
set the shadow color
Definition: MWAWGraphicStyle.hxx:458
MacDrawProParserInternal::Layer::m_box
MWAWBox2f m_box
the layer bounding box (if computed)
Definition: MacDrawProParser.cxx:84
MacDrawProParserInternal::Shape::m_measureBox
MWAWBox2f m_measureBox
Definition: MacDrawProParser.cxx:202
MacDrawProParserInternal::Shape::m_isSent
bool m_isSent
a flag used to know if the object is sent to the listener or not
Definition: MacDrawProParser.cxx:221
MacDrawProParserInternal::Shape::m_flags
int m_flags
the main shape flag
Definition: MacDrawProParser.cxx:178
MacDrawProParserInternal::Shape::m_shape
MWAWGraphicShape m_shape
the graphic shape ( for basic geometric form )
Definition: MacDrawProParser.cxx:172
MWAWGraphicShape::pie
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
MacDrawProParser.hxx
MacDrawProParser::sendMeasure
bool sendMeasure(MWAWEntry const &entry)
tries to send a line measure to the listener
Definition: MacDrawProParser.cxx:3162
MWAWGraphicStyle::Arrow::plain
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
MacDrawProParserInternal::Layer::m_name
librevenge::RVNGString m_name
the layer name
Definition: MacDrawProParser.cxx:90
MWAWEmbeddedObject::m_dataList
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:512
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
libmwaw::BottomBit
@ BottomBit
Definition: libmwaw_internal.hxx:178
MacDrawProParserInternal::Shape
Definition: MacDrawProParser.cxx:114
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
MacDrawProParserInternal::Shape::getBdBox
MWAWBox2f getBdBox() const
return the shape bdbox
Definition: MacDrawProParser.cxx:151
MacDrawProParserInternal::Shape::Text
@ Text
Definition: MacDrawProParser.cxx:116
MacDrawProParserInternal::Shape::Bitmap
@ Bitmap
Definition: MacDrawProParser.cxx:116
MacDrawProParserInternal::State::m_objectDataList
std::vector< MWAWEntry > m_objectDataList
the list of entries which stores the object's data
Definition: MacDrawProParser.cxx:359
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
MacDrawProParserInternal::Layer::m_numShapes
int m_numShapes
the number of shape
Definition: MacDrawProParser.cxx:78
MacDrawProParserInternal::Shape::m_bitmapDim
MWAWBox2i m_bitmapDim
the bitmap dimension (in page)
Definition: MacDrawProParser.cxx:213
MWAWFontConverter.hxx
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
libmwaw::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MacDrawProParserInternal::Layer::Layer
Layer()
constructor
Definition: MacDrawProParser.cxx:67
MacDrawProParserInternal::Shape::m_lineBreakSet
std::set< int > m_lineBreakSet
the list of line break position ( for a text box or a note)
Definition: MacDrawProParser.cxx:189
MWAWGraphicShape::line
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
MacDrawProParser::readRotationInObjectData
bool readRotationInObjectData(MacDrawProParserInternal::Shape &shape, long endPos, std::string &extra)
tries to read the rotation
Definition: MacDrawProParser.cxx:1686
MWAWPrinter.hxx
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
MacDrawProParser::init
void init()
inits all internal variables
Definition: MacDrawProParser.cxx:449
MacDrawProParserInternal::State::m_isStationery
bool m_isStationery
flag to know if the file is a stationery document
Definition: MacDrawProParser.cxx:327
MWAW_FALLTHROUGH
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
MWAWBorder::m_width
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MacDrawProParser::updateGeometryShape
bool updateGeometryShape(MacDrawProParserInternal::Shape &shape, float cornerWidth)
tries to update the basic geometric data
Definition: MacDrawProParser.cxx:1717
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWDocument::MWAW_T_MACDRAWPRO
@ MWAW_T_MACDRAWPRO
MacDraw II: v1.0-v1.1, MacDraw Pro: v1.
Definition: MWAWDocument.hxx:125
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
MacDrawProParserInternal::Library::m_box
MWAWBox2f m_box
the bounding box (if computed)
Definition: MacDrawProParser.cxx:108
MWAWGraphicShape::m_bdBox
MWAWBox2f m_bdBox
the shape bdbox
Definition: MWAWGraphicShape.hxx:218
MacDrawProParserInternal::State::m_numShapes
int m_numShapes
the total number of shapes
Definition: MacDrawProParser.cxx:345
MacDrawProParser::sendMasterPage
bool sendMasterPage()
tries to create a master page if needed
Definition: MacDrawProParser.cxx:2758
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MacDrawProParserInternal::Shape::m_box
MWAWBox2f m_box
the shape bdbox
Definition: MacDrawProParser.cxx:168
MacDrawProParserInternal::State::State
State()
constructor
Definition: MacDrawProParser.cxx:301
MWAWGraphicShape::circle
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
MacDrawProParserInternal::State::m_sizeFZones
long m_sizeFZones[4]
the size of the zoneF
Definition: MacDrawProParser.cxx:353
MacDrawProParserInternal::State::m_numHiddenLayers
int m_numHiddenLayers
the number of hidden layer
Definition: MacDrawProParser.cxx:335
MacDrawProParserInternal::Library
Definition: MacDrawProParser.cxx:94
MacDrawProParserInternal::State::m_sizeStyleZones
long m_sizeStyleZones[6]
the size of the header zones
Definition: MacDrawProParser.cxx:347
MacDrawProParserInternal::operator<<
std::ostream & operator<<(std::ostream &o, Shape const &shape)
Definition: MacDrawProParser.cxx:225
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MacDrawProParserInternal::SubDocument::operator=
SubDocument & operator=(SubDocument const &orig)=delete
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
MWAWPageSpan::setMasterPageName
void setMasterPageName(librevenge::RVNGString const &name)
set the page master name
Definition: MWAWPageSpan.hxx:243
MWAWGraphicShape::Polygon
@ Polygon
Definition: MWAWGraphicShape.hxx:49
MWAWColor::barycenter
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
MWAWBox2::getUnion
MWAWBox2< T > getUnion(MWAWBox2< T > const &box) const
returns the union between this and box
Definition: libmwaw_internal.hxx:1129
MWAWGraphicShape::Rectangle
@ Rectangle
Definition: MWAWGraphicShape.hxx:49
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MacDrawProParser::sendText
bool sendText(int zoneId)
tries to send a text zone to the listener
Definition: MacDrawProParser.cxx:3073
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
MWAWParagraph::AtLeast
@ AtLeast
Definition: MWAWParagraph.hxx:94
MacDrawProParser::readStructuredHeaderZone
bool readStructuredHeaderZone(MWAWEntry const &entry, std::map< int, long > &idToDeltaPosMap)
tries to read a structured zone header
Definition: MacDrawProParser.cxx:974
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MacDrawProParserInternal::SubDocument::m_measureEntry
MWAWEntry m_measureEntry
the measure entry
Definition: MacDrawProParser.cxx:407
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MacDrawProParserInternal::Shape::m_id
int m_id
the shape id
Definition: MacDrawProParser.cxx:174
MacDrawProParserInternal::State::m_version
int m_version
the file version
Definition: MacDrawProParser.cxx:325
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWParagraph.hxx
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
MWAWRSRCParser.hxx
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWParser::getRSRCParser
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
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
MacDrawProParserInternal::Shape::m_numBytesByRow
int m_numBytesByRow
the number of bytes by row (for a bitmap)
Definition: MacDrawProParser.cxx:209
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
MWAWParser::getFormLength
double getFormLength() const
returns the form length
Definition: MWAWParser.hxx:170
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
MacDrawProParser::readBitmap
bool readBitmap(MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry)
tries to read a bitmap data
Definition: MacDrawProParser.cxx:2358
MacDrawProParserInternal::Shape::Shape
Shape()
constructor
Definition: MacDrawProParser.cxx:119
MacDrawProParserInternal::Shape::m_fontMap
std::map< int, int > m_fontMap
a map position to font id ( for a text box or a note)
Definition: MacDrawProParser.cxx:187
MWAWColor::getBlue
unsigned char getBlue() const
returns the green value
Definition: libmwaw_internal.hxx:269
MacDrawProParser::readLayerLibraryCorrespondance
bool readLayerLibraryCorrespondance()
tries to the layer library correspondance zone
Definition: MacDrawProParser.cxx:778
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MacDrawProParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MacDrawProParser.cxx:405
MWAWEntry::name
std::string const & name() const
name of the entry
Definition: MWAWEntry.hxx:153
MWAWBorder
a border
Definition: libmwaw_internal.hxx:333
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MWAWGraphicStyle::m_flip
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: MWAWGraphicStyle.hxx:560
MWAWColor::isBlack
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
MacDrawProParserInternal::Shape::Unknown
@ Unknown
Definition: MacDrawProParser.cxx:116
MWAWParser::setGraphicListener
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
MacDrawProParser::flushExtra
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: MacDrawProParser.cxx:3201
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
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
MWAWGraphicStyle::setBorders
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWGraphicStyle.cxx:232
MacDrawProParser::MacDrawProParser
MacDrawProParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MacDrawProParser.cxx:437
MWAWGraphicShape::Path
@ Path
Definition: MWAWGraphicShape.hxx:49
MacDrawProParser::m_state
std::shared_ptr< MacDrawProParserInternal::State > m_state
the state
Definition: MacDrawProParser.hxx:156
MacDrawProParserInternal::Shape::m_measureEntry
MWAWEntry m_measureEntry
Definition: MacDrawProParser.cxx:204
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MWAWGraphicShape::m_type
Type m_type
the type
Definition: MWAWGraphicShape.hxx:216
MacDrawProParser::createZones
bool createZones()
finds the different objects zones
Definition: MacDrawProParser.cxx:564
MacDrawProParser::readObjectData
bool readObjectData(MacDrawProParserInternal::Shape &shape, int zId)
tries to read an object data
Definition: MacDrawProParser.cxx:1620
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
libmwaw::RightBit
@ RightBit
Definition: libmwaw_internal.hxx:178
MWAWPict::MWAW_R_BAD
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
MWAWVec2< float >
MWAWGraphicListener.hxx
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
MacDrawProStyleManager
the main class to read a MacDraw II file
Definition: MacDrawProStyleManager.hxx:60
MacDrawProParserInternal::Shape::m_fileType
int m_fileType
the file type
Definition: MacDrawProParser.cxx:166
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
MWAWParser::getFormWidth
double getFormWidth() const
returns the form width
Definition: MWAWParser.hxx:175
MacDrawProParserInternal::State::m_layerList
std::vector< Layer > m_layerList
the layer list
Definition: MacDrawProParser.cxx:357
MWAWGraphicShape::Polyline
@ Polyline
Definition: MWAWGraphicShape.hxx:49
MacDrawProParser::readLayersInfo
bool readLayersInfo()
tries to the layer info zone
Definition: MacDrawProParser.cxx:634
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
MacDrawProParserInternal::Layer::m_N
long m_N[3]
some unknown number find in the beginning of the header
Definition: MacDrawProParser.cxx:88
MacDrawProParserInternal::State::m_sendAsLibraries
bool m_sendAsLibraries
flag to know if we create a page by library or not
Definition: MacDrawProParser.cxx:341
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
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
MacDrawProParserInternal::Library::m_name
librevenge::RVNGString m_name
the library name
Definition: MacDrawProParser.cxx:110
MacDrawProParserInternal::State::m_createMasterPage
bool m_createMasterPage
flag to know if we need or not to create a master
Definition: MacDrawProParser.cxx:339
MacDrawProParserInternal::Shape::m_bitmapFileDim
MWAWBox2i m_bitmapFileDim
the bitmap dimension (in the file)
Definition: MacDrawProParser.cxx:215
MacDrawProParserInternal::Shape::GroupEnd
@ GroupEnd
Definition: MacDrawProParser.cxx:116
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
MacDrawProParserInternal::State::m_numVisibleLayers
int m_numVisibleLayers
the number of visible layer
Definition: MacDrawProParser.cxx:337
MacDrawProParserInternal::SubDocument::SubDocument
SubDocument(SubDocument const &orig)=delete
MWAWGraphicShape::Pie
@ Pie
Definition: MWAWGraphicShape.hxx:49
MacDrawProParserInternal::Layer::m_libraryToObjectMap
std::map< int, int > m_libraryToObjectMap
map library to pos
Definition: MacDrawProParser.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
MacDrawProParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MacDrawProParser.cxx:387
MWAWGraphicShape::arc
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
MWAWPageSpan::setPageName
void setPageName(librevenge::RVNGString const &name)
set the page name
Definition: MWAWPageSpan.hxx:228
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
MacDrawProParser::readHeaderInfo
bool readHeaderInfo()
tries to the header info zone ( print info + some information about content + prefs ?...
Definition: MacDrawProParser.cxx:2549
MWAWPictData::check
static ReadResult check(MWAWInputStreamPtr const &input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
MacDrawProParserInternal::State::m_sizeLibraryZones
long m_sizeLibraryZones[2]
the size of the library zones(checkme)
Definition: MacDrawProParser.cxx:351
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MacDrawProParserInternal::Shape::Group
@ Group
Definition: MacDrawProParser.cxx:116
MacDrawProParser::m_styleManager
std::shared_ptr< MacDrawProStyleManager > m_styleManager
the style manager state
Definition: MacDrawProParser.hxx:159
MacDrawProParser::send
bool send(MacDrawProParserInternal::Library const &library)
tries to send a library (not functionnal)
Definition: MacDrawProParser.cxx:2812
MacDrawProParserInternal::Layer::m_firstShape
int m_firstShape
the first shape
Definition: MacDrawProParser.cxx:80
MacDrawProParserInternal::Shape::isLine
bool isLine() const
returns true if the object is a line
Definition: MacDrawProParser.cxx:159
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
MWAWGraphicShape::Line
@ Line
Definition: MWAWGraphicShape.hxx:49
libmwaw::LeftBit
@ LeftBit
Definition: libmwaw_internal.hxx:178
MacDrawProParserInternal::State::m_libraryList
std::vector< Library > m_libraryList
the library list
Definition: MacDrawProParser.cxx:355
MWAWGraphicStyle.hxx
MWAWGraphicShape::ShapeUnknown
@ ShapeUnknown
Definition: MWAWGraphicShape.hxx:49
MacDrawProParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MacDrawProParser.cxx:413
MacDrawProParser::findObjectPositions
bool findObjectPositions(bool dataZone)
finds the objet's data/text positions
Definition: MacDrawProParser.cxx:1027
MacDrawProParser::parse
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: MacDrawProParser.cxx:463
MacDrawProParserInternal::Shape::m_paragraphMap
std::map< int, int > m_paragraphMap
the paragraphMap ( for a text box or a note) and a Pro file
Definition: MacDrawProParser.cxx:191
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MacDrawProParser::readPrintInfo
bool readPrintInfo()
tries to read the print info zone
Definition: MacDrawProParser.cxx:2696
MacDrawProParserInternal::State::m_numPages
int m_numPages
the final number of pages
Definition: MacDrawProParser.cxx:329
MacDrawProParserInternal::State::m_objectTextList
std::vector< MWAWEntry > m_objectTextList
the list of entries which stores the object's text
Definition: MacDrawProParser.cxx:361
MacDrawProParser::sendPage
bool sendPage(int page)
tries to send the layer corresponding a page
Definition: MacDrawProParser.cxx:2784
MacDrawProParserInternal::SubDocument::SubDocument
SubDocument(MacDrawProParser &pars, MWAWInputStreamPtr const &input, int zoneId)
constructor given an zone id
Definition: MacDrawProParser.cxx:372
MacDrawProParserInternal::State::m_numLibraries
int m_numLibraries
the number of library
Definition: MacDrawProParser.cxx:343
MacDrawProStyleManager.hxx
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MacDrawProParserInternal::State::m_actualLayer
int m_actualLayer
the actual layer
Definition: MacDrawProParser.cxx:331
libmwaw::TopBit
@ TopBit
Definition: libmwaw_internal.hxx:178
MacDrawProParserInternal::Shape::m_style
MWAWGraphicStyle m_style
the graphic style
Definition: MacDrawProParser.cxx:170
MacDrawProParserInternal::Layer::m_isHidden
bool m_isHidden
true if the layer is hidden
Definition: MacDrawProParser.cxx:82
MacDrawProParser::MacDrawProStyleManager
friend class MacDrawProStyleManager
Definition: MacDrawProParser.hxx:65
MWAWGraphicShape::Measure
@ Measure
Definition: MWAWGraphicShape.hxx:49
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MacDrawProParserInternal::Shape::m_bitmapClutId
int m_bitmapClutId
the bitmap clut rsrc id
Definition: MacDrawProParser.cxx:219
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MacDrawProParser::readGeometryShapeData
bool readGeometryShapeData(MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry)
tries to read a basic geometric object data ( line, rect, arc,... )
Definition: MacDrawProParser.cxx:2050
MacDrawProParserInternal::Library::m_id
int m_id
the library id
Definition: MacDrawProParser.cxx:104
MacDrawProParserInternal::Shape::Note
@ Note
Definition: MacDrawProParser.cxx:116
MacDrawProParserInternal::SubDocument::SubDocument
SubDocument(MacDrawProParser &pars, MWAWInputStreamPtr const &input, MWAWEntry const &measureEntry)
constructor given a measure entry
Definition: MacDrawProParser.cxx:379
MacDrawProParser::computeLayersAndLibrariesBoundingBox
bool computeLayersAndLibrariesBoundingBox()
computes the layers and libraries bounding box
Definition: MacDrawProParser.cxx:1112
MacDrawProParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MacDrawProParser.cxx:2465
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
MWAWGraphicShape::Arc
@ Arc
Definition: MWAWGraphicShape.hxx:49
MacDrawProParserInternal::State::m_numLayers
int m_numLayers
the number of layer
Definition: MacDrawProParser.cxx:333
MacDrawProParserInternal::Shape::operator<<
friend std::ostream & operator<<(std::ostream &o, Shape const &shape)
basic operator<<
Definition: MacDrawProParser.cxx:225
MacDrawProParserInternal::Shape::m_numChars
int m_numChars
the number of caracters ( for a text box or a note)
Definition: MacDrawProParser.cxx:185
MacDrawProParser::readTextPro
bool readTextPro(MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry)
tries to read a text object data in MacDraw pro file
Definition: MacDrawProParser.cxx:1927
MacDrawProParserInternal::Shape::m_type
Type m_type
the graphic type
Definition: MacDrawProParser.cxx:164
MacDrawProParser::readTextII
bool readTextII(MacDrawProParserInternal::Shape &shape, MWAWEntry const &entry)
tries to read a text object data in MacDraw II file
Definition: MacDrawProParser.cxx:1758
MWAWInputStream.hxx
MWAWGraphicShape::Circle
@ Circle
Definition: MWAWGraphicShape.hxx:49
MacDrawProParserInternal::Layer
Definition: MacDrawProParser.cxx:65
MWAWColor::isWhite
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
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
MacDrawProParserInternal::Shape::m_childList
std::vector< size_t > m_childList
the child list ( for a group )
Definition: MacDrawProParser.cxx:198
MWAWPictBitmap.hxx
MacDrawProParserInternal::Shape::m_bitmapIsColor
bool m_bitmapIsColor
true if the bitmap is a color bitmap
Definition: MacDrawProParser.cxx:211
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
MacDrawProParserInternal::Library::Library
Library(int id=-1)
constructor
Definition: MacDrawProParser.cxx:96
MacDrawProParser::sendBitmap
bool sendBitmap(MacDrawProParserInternal::Shape const &shape, MWAWPosition const &pos)
tries to send a bitmap to the listener
Definition: MacDrawProParser.cxx:2946
MWAWBox2< float >
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MacDrawProParserInternal::State::m_shapeList
std::vector< Shape > m_shapeList
the shape list
Definition: MacDrawProParser.cxx:363
MWAWGraphicShape::PathData
a simple path component
Definition: MWAWGraphicShape.hxx:53
MWAWGraphicStyle::m_shadowOffset
MWAWVec2f m_shadowOffset
the shadow offset
Definition: MWAWGraphicStyle.hxx:527
MacDrawProParser::createDocument
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacDrawProParser.cxx:496
MWAWGraphicShape::rectangle
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
MacDrawProParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MacDrawProParser.cxx:390
MacDrawProParserInternal::State
Internal: the state of a MacDrawProParser.
Definition: MacDrawProParser.cxx:299
MacDrawProParserInternal::Shape::m_paragraph
MWAWParagraph m_paragraph
the paragraph ( for a text box or a note) and a II file
Definition: MacDrawProParser.cxx:193
MWAWBorder::m_color
MWAWColor m_color
the border color
Definition: libmwaw_internal.hxx:393
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
MWAWParser::resetGraphicListener
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
MacDrawProParserInternal
Internal: the structures of a MacDrawProParser.
Definition: MacDrawProParser.cxx:63
MacDrawProParserInternal::State::m_sizeLayerZones
long m_sizeLayerZones[2]
the size of the layer zones
Definition: MacDrawProParser.cxx:349
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
MacDrawProParserInternal::Library::m_layerList
std::vector< int > m_layerList
the list of layer id
Definition: MacDrawProParser.cxx:106
MacDrawProParser::~MacDrawProParser
~MacDrawProParser() final
destructor
Definition: MacDrawProParser.cxx:445

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