MacDraft5Parser.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 MACDRAFT5_PARSER
35 # define MACDRAFT5_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 
48 {
49 struct Image;
50 struct Layout;
51 struct Shape;
52 struct State;
53 
54 class SubDocument;
55 }
56 
61 class MacDraft5Parser final : public MWAWGraphicParser
62 {
63  friend class MacDraft5StyleManager;
65 public:
67  MacDraft5Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
69  ~MacDraft5Parser() final;
70 
72  bool checkHeader(MWAWHeader *header, bool strict=false) final;
73 
74  // the main parse function
75  void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
76 
77 protected:
79  void init();
80 
82  void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
83 
85  bool send(MacDraft5ParserInternal::Image const &image);
87  bool send(MacDraft5ParserInternal::Layout const &layout);
89  bool send(MacDraft5ParserInternal::Shape const &shape,
90  MacDraft5ParserInternal::Layout const &layout);
92  bool sendBitmap(MacDraft5ParserInternal::Shape const &bitmap, MWAWPosition const &position);
94  bool sendText(int layoutId, long shapeId);
95 
96 protected:
98  bool createZones();
99 
100  // Intermediate level
101 
103  bool readPrintInfo();
105  bool readDocHeader();
107  bool readDocFooter();
109  bool readLibraryHeader();
111  bool readLibraryFooter();
112 
113  //
114  // low level
115  //
116 
118  bool readObject(MacDraft5ParserInternal::Layout &layout);
120  bool readText(MacDraft5ParserInternal::Shape &shape);
122  bool readModifier(MacDraft5ParserInternal::Shape &shape);
124  bool readStringList();
125 
127  bool readLayout(MacDraft5ParserInternal::Layout &layout);
128 
129  //
130  // read resource
131  //
132 
134  bool readLayoutDefinitions(MWAWEntry const &entry, bool inRsrc);
136  bool readLinks(MWAWEntry const &entry, bool inRsrc);
138  bool readPICT(MWAWEntry const &entry, librevenge::RVNGBinaryData &pict);
140  bool readPICTList(MWAWEntry const &entry, bool inRsrc);
142  bool readViews(MWAWEntry const &entry, bool inRsrc);
143 
144  //
145  // data
146  //
147 
151  std::shared_ptr<MacDraft5ParserInternal::State> m_state;
152 };
153 #endif
154 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MacDraft5ParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MacDraft5Parser.cxx:445
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MacDraft5Parser::parse
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: MacDraft5Parser.cxx:492
MacDraft5ParserInternal::Shape::m_childList
std::vector< int > m_childList
the child list id ( for a group )
Definition: MacDraft5Parser.cxx:185
MacDraft5ParserInternal::State::m_origin
MWAWVec2f m_origin
the origin of the picture
Definition: MacDraft5Parser.cxx:399
MWAWFont::set
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
MWAWRSRCParser::Version
a public structure used to return the version
Definition: MWAWRSRCParser.hxx:133
MWAWRSRCParser::Version::m_string
std::string m_string
the major string
Definition: MWAWRSRCParser.hxx:150
MacDraft5ParserInternal::Shape::getBdBox
MWAWBox2f getBdBox() const
return the shape bdbox
Definition: MacDraft5Parser.cxx:95
MWAWGraphicListenerPtr
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
MacDraft5ParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MacDraft5Parser.cxx:422
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
MacDraft5Parser::MacDraft5Parser
MacDraft5Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MacDraft5Parser.cxx:466
MacDraft5ParserInternal::Shape::m_bitmapIdList
std::vector< int > m_bitmapIdList
the list of bitmap id ( for a bitmap)
Definition: MacDraft5Parser.cxx:187
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
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MacDraft5ParserInternal::Image
Internal and low level: a image of a library used in MacDraf5Parser.
Definition: MacDraft5Parser.cxx:357
MWAWParser::getGraphicListener
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
MacDraft5ParserInternal::Shape
generic class used to store shape in MWAWDraftParser
Definition: MacDraft5Parser.cxx:65
MacDraft5Parser::MacDraft5StyleManager
friend class MacDraft5StyleManager
Definition: MacDraft5Parser.hxx:63
MacDraft5ParserInternal::Shape::m_parentId
long m_parentId
the parent id
Definition: MacDraft5Parser.cxx:173
MacDraft5ParserInternal::Shape::m_paragraph
MWAWParagraph m_paragraph
the paragraph ( for a text box)
Definition: MacDraft5Parser.cxx:181
MacDraft5Parser::readText
bool readText(MacDraft5ParserInternal::Shape &shape)
try to read the text data corresponding to a text shape
Definition: MacDraft5Parser.cxx:2128
MacDraft5ParserInternal::Image::operator<<
friend std::ostream & operator<<(std::ostream &o, Image const &im)
operator<<
Definition: MacDraft5Parser.cxx:366
MWAWEntry::isParsed
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
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
MacDraft5ParserInternal::State::State
State()
constructor
Definition: MacDraft5Parser.cxx:386
MWAWGraphicStyle::Arrow::plain
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MacDraft5Parser::readPICTList
bool readPICTList(MWAWEntry const &entry, bool inRsrc)
try to read the PICT unknown entry: pnot:0
Definition: MacDraft5Parser.cxx:2547
MWAWGraphicStyle::m_surfaceOpacity
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:520
MacDraft5ParserInternal::Layout::m_name
librevenge::RVNGString m_name
the layout name
Definition: MacDraft5Parser.cxx:245
MWAWFont::setColor
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MacDraft5ParserInternal::Shape::translate
void translate(MWAWVec2f const &dir)
translate a shape
Definition: MacDraft5Parser.cxx:100
MacDraft5ParserInternal::Shape::m_posToFontMap
std::map< long, MWAWFont > m_posToFontMap
the font ( for a text box)
Definition: MacDraft5Parser.cxx:179
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
MacDraft5ParserInternal::Shape::m_otherShapeList
std::vector< MWAWGraphicShape > m_otherShapeList
other graphic shapes ( for complex basic geometric form )
Definition: MacDraft5Parser.cxx:167
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
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
MacDraft5ParserInternal::Shape::m_modifierId
long m_modifierId
the modifier id
Definition: MacDraft5Parser.cxx:175
MWAWGraphicShape::line
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
MacDraft5ParserInternal::Image::m_extra
std::string m_extra
extra data
Definition: MacDraft5Parser.cxx:379
MacDraft5ParserInternal::Layout::m_id
int m_id
the layout id
Definition: MacDraft5Parser.cxx:237
MWAWEntry::type
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
MacDraft5ParserInternal::Layout::isEmpty
bool isEmpty() const
returns true if the layout contains no shape
Definition: MacDraft5Parser.cxx:210
MacDraft5Parser::m_styleManager
std::shared_ptr< MacDraft5StyleManager > m_styleManager
the style manager
Definition: MacDraft5Parser.hxx:149
MacDraft5ParserInternal::Shape::m_box
MWAWBox2f m_box
the shape bdbox
Definition: MacDraft5Parser.cxx:157
MacDraft5ParserInternal::Layout::Layout
Layout(int id)
constructor
Definition: MacDraft5Parser.cxx:197
MacDraft5ParserInternal::Layout::m_objectId
int m_objectId
the object number
Definition: MacDraft5Parser.cxx:243
MacDraft5ParserInternal::Layout::m_entry
MWAWEntry m_entry
the layout position in the data fork
Definition: MacDraft5Parser.cxx:239
MWAWPrinter.hxx
MacDraft5ParserInternal::Shape::Unknown
@ Unknown
Definition: MacDraft5Parser.cxx:67
MacDraft5Parser::m_state
std::shared_ptr< MacDraft5ParserInternal::State > m_state
the state
Definition: MacDraft5Parser.hxx:151
MacDraft5ParserInternal::SubDocument::m_layoutId
int m_layoutId
the layout id
Definition: MacDraft5Parser.cxx:437
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
MWAW_FALLTHROUGH
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
libmwaw::rotatePointAroundCenter
MWAWVec2f rotatePointAroundCenter(MWAWVec2f const &point, MWAWVec2f const &center, float angle)
rotate a point around center, angle is given in degree
Definition: libmwaw_internal.cxx:700
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MacDraft5ParserInternal::Shape::transform
void transform(float rotate, bool flipX, MWAWVec2f const &center)
transform a shape
Definition: MacDraft5Parser.cxx:108
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
MacDraft5Parser::readLibraryFooter
bool readLibraryFooter()
try to read last library zone
Definition: MacDraft5Parser.cxx:939
MacDraft5StyleManager
class to read/store MacDraft5 v4-v5 styles
Definition: MacDraft5StyleManager.hxx:58
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
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::hasLine
bool hasLine() const
returns true if the border is defined
Definition: MWAWGraphicStyle.hxx:410
MWAWGraphicShape::measure
static MWAWGraphicShape measure(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a measure
Definition: MWAWGraphicShape.cxx:246
MacDraft5ParserInternal::Shape::m_origin
MWAWVec2f m_origin
the shape origin
Definition: MacDraft5Parser.cxx:159
MacDraft5Parser::~MacDraft5Parser
~MacDraft5Parser() final
destructor
Definition: MacDraft5Parser.cxx:474
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MacDraft5Parser::readLayoutDefinitions
bool readLayoutDefinitions(MWAWEntry const &entry, bool inRsrc)
try to read a LAYI:0 resource
Definition: MacDraft5Parser.cxx:2587
MWAWGraphicStyle::m_lineOpacity
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:514
MacDraft5ParserInternal::Layout::m_shapeList
std::vector< std::shared_ptr< Shape > > m_shapeList
the shapes list
Definition: MacDraft5Parser.cxx:247
MWAWGraphicShape::circle
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
MacDraft5ParserInternal::Shape::Group
@ Group
Definition: MacDraft5Parser.cxx:67
MacDraft5ParserInternal::Shape::m_textEntry
MWAWEntry m_textEntry
the textbox entry (main text)
Definition: MacDraft5Parser.cxx:183
MacDraft5ParserInternal::State::m_imageList
std::vector< std::shared_ptr< Image > > m_imageList
the image list
Definition: MacDraft5Parser.cxx:403
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MacDraft5ParserInternal::Shape::m_id
long m_id
the shape id
Definition: MacDraft5Parser.cxx:171
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
MacDraft5Parser::sendText
bool sendText(int layoutId, long shapeId)
try to send text with given id
Definition: MacDraft5Parser.cxx:2848
MacDraft5ParserInternal::Shape::m_nameId
long m_nameId
the name id
Definition: MacDraft5Parser.cxx:177
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
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
MacDraft5ParserInternal::Layout
Internal and low level: a class used to store layout definition of a MacDraf5Parser.
Definition: MacDraft5Parser.cxx:195
MacDraft5ParserInternal::Layout::operator<<
friend std::ostream & operator<<(std::ostream &o, Layout const &lay)
operator<<
Definition: MacDraft5Parser.cxx:229
MacDraft5ParserInternal::Shape::m_otherStyleList
std::vector< MWAWGraphicStyle > m_otherStyleList
the other graphic style ( for complex basic geometric form )
Definition: MacDraft5Parser.cxx:165
MacDraft5ParserInternal::Image::m_name
librevenge::RVNGString m_name
the image name
Definition: MacDraft5Parser.cxx:377
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
MWAWDocument::MWAW_T_MACDRAFT
@ MWAW_T_MACDRAFT
MacDraft: v1, v4-v5.
Definition: MWAWDocument.hxx:123
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
MWAWGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
MacDraft5ParserInternal::Shape::Type
Type
the different shape
Definition: MacDraft5Parser.cxx:67
MacDraft5Parser::readObject
bool readObject(MacDraft5ParserInternal::Layout &layout)
try to read an object
Definition: MacDraft5Parser.cxx:1024
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
MacDraft5ParserInternal::Shape::m_bitmapDimensionList
std::vector< MWAWBox2i > m_bitmapDimensionList
the list of bitmap dimension ( for a bitmap)
Definition: MacDraft5Parser.cxx:189
MacDraft5ParserInternal::Shape::m_shape
MWAWGraphicShape m_shape
the graphic shape ( for basic geometric form )
Definition: MacDraft5Parser.cxx:163
MacDraft5ParserInternal::Image::Image
Image()
constructor
Definition: MacDraft5Parser.cxx:359
MacDraft5Parser::readStringList
bool readStringList()
try to read a list of strings
Definition: MacDraft5Parser.cxx:2280
MacDraft5ParserInternal::Shape::Shape
Shape()
constructor
Definition: MacDraft5Parser.cxx:70
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MacDraft5Parser::readPrintInfo
bool readPrintInfo()
try to read the print info zone
Definition: MacDraft5Parser.cxx:2326
MacDraft5Parser::readViews
bool readViews(MWAWEntry const &entry, bool inRsrc)
try to read a list of views : VIEW:1
Definition: MacDraft5Parser.cxx:2471
MacDraft5ParserInternal::State::m_isLibrary
bool m_isLibrary
flag to know if we read a library
Definition: MacDraft5Parser.cxx:397
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
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
MWAWParser::setGraphicListener
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
MacDraft5ParserInternal::Layout::m_idToShapePosMap
std::map< long, size_t > m_idToShapePosMap
a map id to position in shapeList
Definition: MacDraft5Parser.cxx:251
MacDraft5Parser::readDocFooter
bool readDocFooter()
try to read last doc zone
Definition: MacDraft5Parser.cxx:873
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
MWAWGraphicShape::Path
@ Path
Definition: MWAWGraphicShape.hxx:49
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
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
MacDraft5ParserInternal::State::m_layoutList
std::vector< std::shared_ptr< Layout > > m_layoutList
the layer list
Definition: MacDraft5Parser.cxx:401
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
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
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
MacDraft5StyleManager.hxx
MWAWGraphicParser
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
MacDraft5Parser
the main class to read a MacDraft5 v4-v5 file
Definition: MacDraft5Parser.hxx:62
MacDraft5ParserInternal::Layout::m_rootList
std::vector< size_t > m_rootList
the root position list
Definition: MacDraft5Parser.cxx:249
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
MacDraft5ParserInternal::Shape::rotateBox
static MWAWBox2f rotateBox(MWAWBox2f const &box, float angle, MWAWVec2f const &center)
returns the rotation of a box
Definition: MacDraft5Parser.cxx:136
MacDraft5ParserInternal::Shape::Bitmap
@ Bitmap
Definition: MacDraft5Parser.cxx:67
MacDraft5Parser::readModifier
bool readModifier(MacDraft5ParserInternal::Shape &shape)
try to read a modifier
Definition: MacDraft5Parser.cxx:2204
MacDraft5Parser::readDocHeader
bool readDocHeader()
try to read the doc header zone ( mainly unknown )
Definition: MacDraft5Parser.cxx:708
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
MacDraft5ParserInternal::Shape::Basic
@ Basic
Definition: MacDraft5Parser.cxx:67
MacDraft5Parser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MacDraft5Parser.cxx:650
MacDraft5Parser::createZones
bool createZones()
finds the different objects zones
Definition: MacDraft5Parser.cxx:567
MacDraft5ParserInternal::Shape::m_isLine
bool m_isLine
flag to know if the shape is a line
Definition: MacDraft5Parser.cxx:169
MacDraft5ParserInternal::Shape::m_style
MWAWGraphicStyle m_style
the graphic style
Definition: MacDraft5Parser.cxx:161
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)
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
MWAWGraphicStyle::m_lineColor
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
MacDraft5ParserInternal::Shape::m_isSent
bool m_isSent
a flag used to know if the object is sent to the listener or not
Definition: MacDraft5Parser.cxx:191
MWAWGraphicStyle.hxx
MacDraft5ParserInternal::Layout::m_extra
std::string m_extra
extra data
Definition: MacDraft5Parser.cxx:253
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MacDraft5Parser.hxx
MacDraft5ParserInternal::Image::m_id
long m_id
the first shape id ( in general a group )
Definition: MacDraft5Parser.cxx:375
MacDraft5Parser::readLibraryHeader
bool readLibraryHeader()
try to read the library header zone ( mainly unknown )
Definition: MacDraft5Parser.cxx:908
MacDraft5ParserInternal::SubDocument::m_id
long m_id
the subdocument id
Definition: MacDraft5Parser.cxx:439
MacDraft5ParserInternal::Layout::m_N
int m_N
the number of elements
Definition: MacDraft5Parser.cxx:241
MacDraft5ParserInternal::Layout::findShape
std::shared_ptr< Shape > findShape(long id, bool normallyExist=true) const
returns a child corresponding to an id
Definition: MacDraft5Parser.cxx:215
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
MacDraft5ParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MacDraft5Parser.cxx:419
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWGraphicStyle::m_lineDashWidth
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:506
MacDraft5ParserInternal::Shape::m_fileType
int m_fileType
the file type
Definition: MacDraft5Parser.cxx:155
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
MacDraft5ParserInternal::SubDocument
Internal: the subdocument of a MacDraft5Parser.
Definition: MacDraft5Parser.cxx:409
MWAWFont::Script::super
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:130
MacDraft5ParserInternal::State
Internal: the state of a MacDraft5Parser.
Definition: MacDraft5Parser.cxx:384
MacDraft5Parser::createDocument
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacDraft5Parser.cxx:535
MacDraft5Parser::readPICT
bool readPICT(MWAWEntry const &entry, librevenge::RVNGBinaryData &pict)
try to read a PICT entry (in data fork)
Definition: MacDraft5Parser.cxx:2441
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
MacDraft5ParserInternal::SubDocument::SubDocument
SubDocument(SubDocument const &orig)=delete
MacDraft5ParserInternal::SubDocument::SubDocument
SubDocument(MacDraft5Parser &pars, MWAWInputStreamPtr const &input, int layoutId, long zoneId)
Definition: MacDraft5Parser.cxx:411
MacDraft5ParserInternal::SubDocument::operator=
SubDocument & operator=(SubDocument const &orig)=delete
MacDraft5ParserInternal::State::m_version
int m_version
the file version
Definition: MacDraft5Parser.cxx:395
libmwaw::DebugFile
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
MacDraft5ParserInternal::Shape::m_type
Type m_type
the graphic type
Definition: MacDraft5Parser.cxx:153
MWAWGraphicShape::scale
void scale(MWAWVec2f const &factor)
rescale all the coordinate
Definition: MWAWGraphicShape.cxx:368
MacDraft5Parser::readLayout
bool readLayout(MacDraft5ParserInternal::Layout &layout)
try to read the layout zone
Definition: MacDraft5Parser.cxx:2385
MWAWInputStream.hxx
MacDraft5ParserInternal
Internal: the structures of a MacDraft5Parser.
Definition: MacDraft5Parser.cxx:63
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
MacDraft5Parser::init
void init()
inits all internal variables
Definition: MacDraft5Parser.cxx:478
MWAWGraphicStyle::m_rotate
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
MWAWPictBitmap.hxx
MacDraft5ParserInternal::Shape::Text
@ Text
Definition: MacDraft5Parser.cxx:67
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
MacDraft5ParserInternal::Layout::updateRelations
void updateRelations()
try to check/update the parent relations are compatible with group childs, no loop exist,...
Definition: MacDraft5Parser.cxx:256
MacDraft5Parser::sendBitmap
bool sendBitmap(MacDraft5ParserInternal::Shape const &bitmap, MWAWPosition const &position)
try to send a bitmap
Definition: MacDraft5Parser.cxx:2825
MWAWBox2< float >
MacDraft5ParserInternal::Shape::QuotationSurface
@ QuotationSurface
Definition: MacDraft5Parser.cxx:67
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MacDraft5Parser::readLinks
bool readLinks(MWAWEntry const &entry, bool inRsrc)
try to read Link:128 resource
Definition: MacDraft5Parser.cxx:2674
MWAWGraphicShape::PathData
a simple path component
Definition: MWAWGraphicShape.hxx:53
MacDraft5Parser::send
bool send(MacDraft5ParserInternal::Image const &image)
try to send all shapes in an image
Definition: MacDraft5Parser.cxx:2705
MWAWGraphicStyle::hasSurface
bool hasSurface() const
returns true if the interior surface is defined
Definition: MWAWGraphicStyle.hxx:442
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
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
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

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