MacWrtProParser.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 
35 #ifndef MAC_WRT_PRO_PARSER
36 # define MAC_WRT_PRO_PARSER
37 
38 #include <list>
39 #include <string>
40 #include <vector>
41 
42 #include "MWAWDebug.hxx"
43 #include "MWAWEntry.hxx"
44 #include "MWAWGraphicStyle.hxx"
45 #include "MWAWInputStream.hxx"
46 
47 #include "MWAWParser.hxx"
48 
50 {
51 struct State;
52 struct TextZoneData;
53 struct TextZone;
54 struct Token;
55 struct Zone;
56 class SubDocument;
57 }
58 
61 
67 class MacWrtProParser final : public MWAWTextParser
68 {
69  friend class MacWrtProStructures;
72 
73 public:
75  MacWrtProParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
77  ~MacWrtProParser() final;
78 
80  bool checkHeader(MWAWHeader *header, bool strict=false) final;
81 
82  // the main parse function
83  void parse(librevenge::RVNGTextInterface *documentInterface) final;
84 
85 protected:
87  void init();
88 
90  void createDocument(librevenge::RVNGTextInterface *documentInterface);
91 
93  bool createZones();
94 
96  bool getZoneData(librevenge::RVNGBinaryData &data, int blockId);
97 
99  bool getFreeZoneList(std::vector<int> &blockLists);
100 
105  bool parseDataZone(int blockId, int type);
106 
108  bool parseTextZone(std::shared_ptr<MacWrtProParserInternal::Zone> zone);
109 
111  bool readTextEntries(std::shared_ptr<MacWrtProParserInternal::Zone> zone,
112  std::vector<MWAWEntry> &res, int textLength);
114  bool readTextIds(std::shared_ptr<MacWrtProParserInternal::Zone> zone,
115  std::vector<MacWrtProParserInternal::TextZoneData> &res,
116  int textLength, int type);
118  bool readTextTokens(std::shared_ptr<MacWrtProParserInternal::Zone> zone,
119  std::vector<MacWrtProParserInternal::Token> &res,
120  int textLength);
121 
124  std::vector<int> const &getBlocksCalledByToken() const;
125 
127  float pageHeight() const;
129  int numColumns(double &sep) const;
130 
132  void newPage(int number, bool softBreak=false);
134  bool hasTitlePage() const;
136  std::shared_ptr<MWAWSubDocument> getSubDocument(int blockId);
137 
138  //
139  // interface with MacWrtProParserStructures
140  //
141 
143  bool sendTextZone(int blockId, bool mainZone = false);
144 
146  int findNumHardBreaks(int blockId);
147 
149  bool sendPictureZone(int blockId, MWAWPosition const &pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle());
150 
152  bool sendTextBoxZone(int blockId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle());
154  bool sendEmptyFrameZone(MWAWPosition const &pos, MWAWGraphicStyle const &style);
155 
156  //
157  // low level
158  //
159 
161  bool readPrintInfo();
162 
164  bool readDocHeader();
165 
166 #ifdef DEBUG
167  void saveOriginal(MWAWInputStreamPtr input);
169 #endif
170 
172  bool sendPicture(std::shared_ptr<MacWrtProParserInternal::Zone> zone, MWAWPosition pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle());
173 
175  bool sendText(std::shared_ptr<MacWrtProParserInternal::TextZone> zone, bool mainZone = false);
176 
178  int findNumHardBreaks(std::shared_ptr<MacWrtProParserInternal::TextZone> zone);
179 
181  void checkUnparsed();
182 
183 protected:
184  //
185  // data
186  //
188  std::shared_ptr<MacWrtProParserInternal::State> m_state;
189 
191  std::shared_ptr<MacWrtProStructures> m_structures;
192 };
193 #endif
194 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MacWrtProParserInternal::Zone::m_input
MWAWInputStreamPtr m_input
the main input
Definition: MacWrtProParser.cxx:96
MWAWTextListenerPtr
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:565
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
MacWrtProParserInternal::Token::m_blockId
int m_blockId
the block id
Definition: MacWrtProParser.cxx:196
MacWrtProParserInternal::SubDocument::SubDocument
SubDocument(MacWrtProParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: MacWrtProParser.cxx:270
MWAWField::Time
Definition: libmwaw_internal.hxx:401
MacWrtProParserInternal::TextZoneData::TextZoneData
TextZoneData()
Definition: MacWrtProParser.cxx:107
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:549
MWAWTextParser
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:298
MacWrtProParserInternal::State
Internal: the state of a MacWrtProParser.
Definition: MacWrtProParser.cxx:232
MWAWInputStream::get
static std::shared_ptr< MWAWInputStream > get(librevenge::RVNGBinaryData const &data, bool inverted)
returns a new input stream corresponding to a librevenge::RVNGBinaryData
Definition: MWAWInputStream.cxx:102
MacWrtProParserInternal::Token::Token
Token()
Definition: MacWrtProParser.cxx:139
MWAWNote
a note
Definition: libmwaw_internal.hxx:445
MacWrtProParserInternal::TextZone::m_parsed
bool m_parsed
true if the zone is sended
Definition: MacWrtProParser.cxx:226
MacWrtProParser::parseTextZone
bool parseTextZone(std::shared_ptr< MacWrtProParserInternal::Zone > zone)
parse a text zone
Definition: MacWrtProParser.cxx:996
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:840
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MacWrtProParserInternal::TextZoneData::m_length
int m_length
the text length
Definition: MacWrtProParser.cxx:132
MacWrtProParserInternal::State::m_dataMap
std::map< int, std::shared_ptr< Zone > > m_dataMap
the list of blockId->data zone
Definition: MacWrtProParser.cxx:251
MacWrtProParser::pageHeight
float pageHeight() const
returns the page height, ie. paper size less margin (in inches)
MacWrtProParser::readDocHeader
bool readDocHeader()
try to read the doc header zone
Definition: MacWrtProParser.cxx:768
MacWrtProParserInternal::Zone::m_asciiFile
libmwaw::DebugFile m_asciiFile
the debug file
Definition: MacWrtProParser.cxx:99
MWAWPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:236
MacWrtProParserInternal::DataPosition::m_pos
long m_pos
the position
Definition: MacWrtProParser.cxx:1407
MacWrtProParserInternal::Zone::Zone
Zone()
Definition: MacWrtProParser.cxx:66
MacWrtProParserInternal::Zone::m_blockId
int m_blockId
the first block id
Definition: MacWrtProParser.cxx:90
MacWrtProParserInternal::State::m_col
int m_col
the number of columns in MWII
Definition: MacWrtProParser.cxx:259
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:64
MacWrtProParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MacWrtProParser.cxx:634
MacWrtProParserInternal::TextZone::m_ids
std::vector< TextZoneData > m_ids[2]
two vector list of id ( charIds, paragraphIds)
Definition: MacWrtProParser.cxx:220
MWAWDocument::MWAW_T_MACWRITEPRO
MacWrite II/Pro.
Definition: MWAWDocument.hxx:135
MacWrtProParserInternal::Token::operator<<
friend std::ostream & operator<<(std::ostream &o, Token const &tkn)
operator<<
Definition: MacWrtProParser.cxx:148
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MacWrtProParser::newPage
void newPage(int number, bool softBreak=false)
adds a new page
Definition: MacWrtProParser.cxx:360
MacWrtProStructuresListenerState::numSection
int numSection() const
returns the actual section
Definition: MacWrtProStructures.hxx:96
MWAWEntry.hxx
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:206
MWAWFontConverter.hxx
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWSubDocumentPtr
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:563
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
MacWrtProParserInternal::Token::m_length
int m_length
the text length
Definition: MacWrtProParser.cxx:194
MacWrtProParser::readTextEntries
bool readTextEntries(std::shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MWAWEntry > &res, int textLength)
try to read the text block entries
Definition: MacWrtProParser.cxx:1046
MWAWPosition::setUnit
void setUnit(librevenge::RVNGUnit newUnit)
sets the dimension unit
Definition: MWAWPosition.hxx:224
MacWrtProParserInternal::TextZone::m_tokens
std::vector< Token > m_tokens
the tokens list
Definition: MacWrtProParser.cxx:223
MacWrtProStructuresListenerState::getFontDebugString
std::string getFontDebugString(int fontId)
debug function which returns a string corresponding to a fontId
Definition: MacWrtProStructures.cxx:2977
MWAWPrinter.hxx
MacWrtProParser::checkUnparsed
void checkUnparsed()
a debug function which can be used to save the unparsed block
Definition: MacWrtProParser.cxx:1770
MacWrtProParser::numColumns
int numColumns(double &sep) const
returns the document number of columns and the column separator width in inch( filed in MWII)
Definition: MacWrtProParser.cxx:350
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:191
MacWrtProParserInternal::DataPosition::Compare::operator()
bool operator()(DataPosition const &p1, DataPosition const &p2) const
comparaison function
Definition: MacWrtProParser.cxx:1411
MWAWPictData::get
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MacWrtProParserInternal::DataPosition::DataPosition
DataPosition(int type=-1, int id=-1, long pos=0)
constructor
Definition: MacWrtProParser.cxx:1396
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MacWrtProParserInternal::DataPosition::m_type
int m_type
the type
Definition: MacWrtProParser.cxx:1403
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:41
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
MacWrtProParser::sendText
bool sendText(std::shared_ptr< MacWrtProParserInternal::TextZone > zone, bool mainZone=false)
try to send a text
Definition: MacWrtProParser.cxx:1424
MWAWPosition::size
const MWAWVec2f & size() const
returns the frame size
Definition: MWAWPosition.hxx:134
MacWrtProParser::parseDataZone
bool parseDataZone(int blockId, int type)
parse a data zone
Definition: MacWrtProParser.cxx:953
MacWrtProParser.hxx
MacWrtProParserInternal::Zone
Internal: a struct used to store a zone.
Definition: MacWrtProParser.cxx:65
MWAWPosition::setNaturalSize
void setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:219
MacWrtProParser::getSubDocument
std::shared_ptr< MWAWSubDocument > getSubDocument(int blockId)
returns a subdocument corresponding to a blockid
Definition: MacWrtProParser.cxx:389
MacWrtProParser::MacWrtProStructures
friend class MacWrtProStructures
Definition: MacWrtProParser.hxx:69
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MacWrtProParserInternal::State::m_blocksMap
std::map< int, long > m_blocksMap
the list of retrieved block : block -> new address
Definition: MacWrtProParser.cxx:248
MacWrtProParser::sendEmptyFrameZone
bool sendEmptyFrameZone(MWAWPosition const &pos, MWAWGraphicStyle const &style)
try to send an empty zone (can exist in MacWrtPro1.5)
Definition: MacWrtProParser.cxx:1325
MacWrtProParserInternal::TextZoneData::operator<<
friend std::ostream & operator<<(std::ostream &o, TextZoneData const &tData)
Definition: MacWrtProParser.cxx:113
MacWrtProParserInternal::TextZone::m_textLength
int m_textLength
the text length
Definition: MacWrtProParser.cxx:214
MacWrtProParserInternal::TextZoneData
Internal: a struct used to store a text zone.
Definition: MacWrtProParser.cxx:106
MWAWField::Date
Definition: libmwaw_internal.hxx:401
MWAWListener::SoftPageBreak
Definition: MWAWListener.hxx:58
MWAWSubDocument.hxx
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:176
MWAWPageSpan::getPageSpan
int getPageSpan() const
Definition: MWAWPageSpan.hxx:168
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MacWrtProStructuresListenerState::resendAll
bool resendAll()
force resent data : font + paragraph
Definition: MacWrtProStructures.cxx:2945
MacWrtProParser::readTextIds
bool readTextIds(std::shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MacWrtProParserInternal::TextZoneData > &res, int textLength, int type)
try to read the text id entries
Definition: MacWrtProParser.cxx:1121
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
MacWrtProParser::readTextTokens
bool readTextTokens(std::shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MacWrtProParserInternal::Token > &res, int textLength)
try to read the text token entries
Definition: MacWrtProParser.cxx:1185
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWGraphicStyle::emptyStyle
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:308
MacWrtProParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MacWrtProParser.cxx:277
MWAWParser::setTextListener
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
MacWrtProParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MacWrtProParser.cxx:290
MacWrtProParser::findNumHardBreaks
int findNumHardBreaks(int blockId)
compute the number of hard page break
Definition: MacWrtProParser.cxx:1337
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:671
MacWrtProParser::sendTextBoxZone
bool sendTextBoxZone(int blockId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
send a textbox zone
Definition: MacWrtProParser.cxx:1382
MWAWParser::getPageSpan
const MWAWPageSpan & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
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
MacWrtProParser::readPrintInfo
bool readPrintInfo()
read the print info zone
Definition: MacWrtProParser.cxx:715
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:181
MWAWPosition.hxx
MWAWPosition::setSize
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:214
MacWrtProParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacWrtProParser.cxx:568
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:666
MacWrtProParserInternal::Zone::~Zone
~Zone()
Definition: MacWrtProParser.cxx:75
MacWrtProParser::init
void init()
inits all internal variables
Definition: MacWrtProParser.cxx:335
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:47
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:66
MacWrtProParser::MacWrtProParser
MacWrtProParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MacWrtProParser.cxx:323
MWAWParser::asciiName
const std::string & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:559
MacWrtProParserInternal::Token::m_box
MWAWBox2f m_box
the bdbox ( filled in MWII for figure)
Definition: MacWrtProParser.cxx:198
MacWrtProParser::getFreeZoneList
bool getFreeZoneList(std::vector< int > &blockLists)
return the chain list of block ( used to get free blocks): MWPro only
Definition: MacWrtProParser.cxx:528
MacWrtProParserInternal::State::m_blocksCallByTokens
std::vector< int > m_blocksCallByTokens
the list of blockId called by tokens
Definition: MacWrtProParser.cxx:257
MWAWListener::PageBreak
Definition: MWAWListener.hxx:58
MacWrtProParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MacWrtProParser.cxx:309
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWVec2< int >
MacWrtProParser::getZoneData
bool getZoneData(librevenge::RVNGBinaryData &data, int blockId)
retrieve the data which corresponds to a zone
Definition: MacWrtProParser.cxx:448
MWAWPictMac.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:143
MWAWDebug.hxx
MWAWPosition::setOrigin
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:209
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:56
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:71
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1191
MacWrtProParser::sendPictureZone
bool sendPictureZone(int blockId, MWAWPosition const &pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: MacWrtProParser.cxx:1613
MacWrtProParserInternal::State::m_colSeparator
double m_colSeparator
the columns separator in inch MWII
Definition: MacWrtProParser.cxx:260
MacWrtProParser::createZones
bool createZones()
finds the different objects zones
Definition: MacWrtProParser.cxx:603
MacWrtProParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: MacWrtProParser.cxx:397
MacWrtProParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: MacWrtProParser.cxx:261
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:168
MacWrtProParserInternal::DataPosition::Compare
the comparison structure
Definition: MacWrtProParser.cxx:1409
MWAWField
a field
Definition: libmwaw_internal.hxx:399
MWAWField::PageNumber
Definition: libmwaw_internal.hxx:401
MacWrtProParser::~MacWrtProParser
~MacWrtProParser() final
destructor
Definition: MacWrtProParser.cxx:331
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:201
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
MWAWPosition::Char
Definition: MWAWPosition.hxx:51
MacWrtProStructuresListenerState::getPageBreaksPos
std::vector< int > getPageBreaksPos() const
return a list of page break position ( as some page break are soft )
Definition: MacWrtProStructures.cxx:2858
MacWrtProParserInternal::Zone::m_type
int m_type
the type : 0(text), 1(graphic)
Definition: MacWrtProParser.cxx:87
MacWrtProParser::sendTextZone
bool sendTextZone(int blockId, bool mainZone=false)
send a text box
Definition: MacWrtProParser.cxx:1371
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
MacWrtProParser::m_structures
std::shared_ptr< MacWrtProStructures > m_structures
the structures parser
Definition: MacWrtProParser.hxx:191
MacWrtProParserInternal::SubDocument
Internal: the subdocument of a MacWrtProParser.
Definition: MacWrtProParser.cxx:267
MacWrtProParserInternal::TextZoneData::m_type
int m_type
the type
Definition: MacWrtProParser.cxx:130
MacWrtProStructuresListenerState::sendChar
void sendChar(char c)
send a character
Definition: MacWrtProStructures.cxx:2870
MacWrtProParserInternal::State::State
State()
constructor
Definition: MacWrtProParser.cxx:234
MWAWGraphicStyle.hxx
MacWrtProStructuresListenerState::sendParagraph
bool sendParagraph(int id)
try to send a paragraph
Definition: MacWrtProStructures.cxx:3000
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MacWrtProStructuresListenerState::getParagraphDebugString
std::string getParagraphDebugString(int paraId)
debug function which returns a string corresponding to a paragrapId
Definition: MacWrtProStructures.cxx:3023
MacWrtProParserInternal::Zone::m_parsed
bool m_parsed
true if the zone is sended
Definition: MacWrtProParser.cxx:102
MWAWTextListener.hxx
MacWrtProParser::sendPicture
bool sendPicture(std::shared_ptr< MacWrtProParserInternal::Zone > zone, MWAWPosition pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: MacWrtProParser.cxx:1625
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MacWrtProParserInternal::TextZone
Internal: a struct used to store a text zone.
Definition: MacWrtProParser.cxx:204
MacWrtProStructures
the main class to read the structures part of MacWrite Pro file
Definition: MacWrtProStructures.hxx:154
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MacWrtProParserInternal::Zone::m_data
librevenge::RVNGBinaryData m_data
the storage
Definition: MacWrtProParser.cxx:93
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:196
MacWrtProStructuresListenerState::isSent
bool isSent(int blockId)
returns true if the block is already sent ( or does not exists)
Definition: MacWrtProStructures.cxx:2808
MacWrtProStructuresListenerState
an interface to transmit the info of MacWrtProStructures to a listener
Definition: MacWrtProStructures.hxx:70
MacWrtProParserInternal::TextZone::m_entries
std::vector< MWAWEntry > m_entries
the list of entries
Definition: MacWrtProParser.cxx:217
MacWrtProParserInternal::State::m_textMap
std::map< int, std::shared_ptr< TextZone > > m_textMap
the list of blockId->text zone
Definition: MacWrtProParser.cxx:254
MacWrtProParserInternal::Token
Internal: a struct used to store a text zone.
Definition: MacWrtProParser.cxx:138
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:65
MWAWNote::FootNote
Definition: libmwaw_internal.hxx:447
MacWrtProParser::hasTitlePage
bool hasTitlePage() const
returns true if the document has a title page
Definition: MacWrtProParser.cxx:379
MacWrtProParserInternal::TextZone::TextZone
TextZone()
Definition: MacWrtProParser.cxx:205
MWAWPosition::XLeft
Definition: MWAWPosition.hxx:55
MWAWPosition::YBottom
Definition: MWAWPosition.hxx:57
MWAWInputStream.hxx
MacWrtProParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: MacWrtProParser.cxx:261
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:551
MacWrtProParserInternal::State::m_hasTitlePage
bool m_hasTitlePage
flag to know if we have a title page
Definition: MacWrtProParser.cxx:262
librevenge
Definition: MWAWDocument.hxx:56
MacWrtProParser::getBlocksCalledByToken
const std::vector< int > & getBlocksCalledByToken() const
return the list of blockid called by token.
Definition: MacWrtProParser.cxx:384
MacWrtProParserInternal::TextZoneData::m_id
int m_id
an id
Definition: MacWrtProParser.cxx:134
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:211
MacWrtProStructuresListenerState::sendFont
bool sendFont(int id)
try to send a character style
Definition: MacWrtProStructures.cxx:2954
MacWrtProParserInternal::Token::m_type
int m_type
the type
Definition: MacWrtProParser.cxx:192
MWAWBox2< float >
MacWrtProParserInternal
Internal: the structures of a MacWrtProParser.
Definition: MacWrtProParser.cxx:61
MWAWField::Title
Definition: libmwaw_internal.hxx:401
MacWrtProParserInternal::Zone::ascii
libmwaw::DebugFile & ascii()
returns the debug file
Definition: MacWrtProParser.cxx:81
MacWrtProParserInternal::DataPosition::m_id
int m_id
an id
Definition: MacWrtProParser.cxx:1405
MacWrtProParserInternal::Token::m_flags
unsigned int m_flags[4]
some flags
Definition: MacWrtProParser.cxx:200
MacWrtProStructuresListenerState::send
bool send(int blockId)
try to send a block which corresponds to blockid
Definition: MacWrtProStructures.cxx:2814
MacWrtProStructuresListenerState::insertSoftPageBreak
void insertSoftPageBreak()
insert a page break ( if we are not on a new page )
Definition: MacWrtProStructures.cxx:2821
MacWrtProParserInternal::DataPosition
Internal and low level: structure used to sort the position of data.
Definition: MacWrtProParser.cxx:1394
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:836
MacWrtProParser
the main class to read a MacWrite II and MacWrite Pro file
Definition: MacWrtProParser.hxx:67
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:97
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
MacWrtProParser::m_state
std::shared_ptr< MacWrtProParserInternal::State > m_state
the state
Definition: MacWrtProParser.hxx:188
MacWrtProStructures.hxx
MacWrtProParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MacWrtProParser.cxx:287

Generated on Mon Aug 19 2019 21:07:32 for libmwaw by doxygen 1.8.16