MacWrtProParser.hxx Source File documentation

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
49 namespace MacWrtProParserInternal
50 {
51 struct State;
52 struct TextZoneData;
53 struct TextZone;
54 struct Token;
55 struct Zone;
56 class SubDocument;
57 }
58
59 class MacWrtProStructures;
60 class MacWrtProStructuresListenerState;
61
67 class MacWrtProParser final : public MWAWTextParser
68 {
69 friend class MacWrtProStructures;
70 friend class MacWrtProStructuresListenerState;
71 friend class MacWrtProParserInternal::SubDocument;
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 std::shared_ptr<MWAWStream> getStreamForBlock(int bId);
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 &getGraphicIdCalledByToken() 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
167 bool sendPicture(std::shared_ptr<MacWrtProParserInternal::Zone> zone, MWAWPosition pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle());
168
170 bool sendText(std::shared_ptr<MacWrtProParserInternal::TextZone> zone, bool mainZone = false);
171
173 int findNumHardBreaks(std::shared_ptr<MacWrtProParserInternal::TextZone> zone);
174
176 static std::string convertDateToDebugString(unsigned date);
178 void checkUnparsed();
179
180 protected:
181 //
182 // data
183 //
185 std::shared_ptr<MacWrtProParserInternal::State> m_state;
186
188 std::shared_ptr<MacWrtProStructures> m_structures;
189 };
190 #endif
191 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWTextListenerPtr
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
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:181
MacWrtProParserInternal::SubDocument::SubDocument
SubDocument(MacWrtProParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: MacWrtProParser.cxx:257
MWAWField::Time
@ Time
Definition: libmwaw_internal.hxx:401
MacWrtProParserInternal::TextZoneData::TextZoneData
TextZoneData()
Definition: MacWrtProParser.cxx:92
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
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:217
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:124
MWAWNote
a note
Definition: libmwaw_internal.hxx:445
MacWrtProParserInternal::TextZone::m_parsed
bool m_parsed
true if the zone is sended
Definition: MacWrtProParser.cxx:211
MacWrtProParser::parseTextZone
bool parseTextZone(std::shared_ptr< MacWrtProParserInternal::Zone > zone)
parse a text zone
Definition: MacWrtProParser.cxx:991
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
MacWrtProParserInternal::TextZoneData::m_length
int m_length
the text length
Definition: MacWrtProParser.cxx:117
MacWrtProParserInternal::State::m_dataMap
std::map< int, std::shared_ptr< Zone > > m_dataMap
the list of blockId->data zone
Definition: MacWrtProParser.cxx:237
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:752
MWAWPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
MacWrtProParserInternal::DataPosition::m_pos
long m_pos
the position
Definition: MacWrtProParser.cxx:1401
MacWrtProParserInternal::Zone::Zone
Zone()
Definition: MacWrtProParser.cxx:66
MacWrtProParserInternal::Zone::m_blockId
int m_blockId
the first block id
Definition: MacWrtProParser.cxx:81
MacWrtProParserInternal::State::m_col
int m_col
the number of columns in MWII
Definition: MacWrtProParser.cxx:246
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:619
MacWrtProParserInternal::TextZone::m_ids
std::vector< TextZoneData > m_ids[2]
two vector list of id ( charIds, paragraphIds)
Definition: MacWrtProParser.cxx:205
MWAWDocument::MWAW_T_MACWRITEPRO
@ MWAW_T_MACWRITEPRO
MacWrite II/Pro.
Definition: MWAWDocument.hxx:135
MWAWStream.hxx
MacWrtProParserInternal::Token::operator<<
friend std::ostream & operator<<(std::ostream &o, Token const &tkn)
operator<<
Definition: MacWrtProParser.cxx:133
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:347
MacWrtProStructuresListenerState::numSection
int numSection() const
returns the actual section
Definition: MacWrtProStructures.hxx:92
MWAWEntry.hxx
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
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:565
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:179
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:1041
MWAWPosition::setUnit
void setUnit(librevenge::RVNGUnit newUnit)
sets the dimension unit
Definition: MWAWPosition.hxx:225
MacWrtProParserInternal::TextZone::m_tokens
std::vector< Token > m_tokens
the tokens list
Definition: MacWrtProParser.cxx:208
MWAWPrinter.hxx
MacWrtProParser::checkUnparsed
void checkUnparsed()
a debug function which can be used to save the unparsed block
Definition: MacWrtProParser.cxx:1716
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:337
MWAWCellContent::double2Time
static bool double2Time(double val, int &H, int &M, int &S)
conversion beetween double: second since 0:00 and time
Definition: MWAWCell.cxx:590
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MacWrtProParserInternal::DataPosition::Compare::operator()
bool operator()(DataPosition const &p1, DataPosition const &p2) const
comparaison function
Definition: MacWrtProParser.cxx:1405
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:1390
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
MacWrtProParser::getStreamForBlock
std::shared_ptr< MWAWStream > getStreamForBlock(int bId)
returns a stream corresponding to a block
Definition: MacWrtProParser.cxx:432
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:1397
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:41
MacWrtProParser::getGraphicIdCalledByToken
const std::vector< int > & getGraphicIdCalledByToken() const
return the list of graphicid called by token.
Definition: MacWrtProParser.cxx:371
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
MacWrtProParser::convertDateToDebugString
static std::string convertDateToDebugString(unsigned date)
convert a date in a string (for debugging)
Definition: MacWrtProParser.cxx:1765
MacWrtProParser::sendText
bool sendText(std::shared_ptr< MacWrtProParserInternal::TextZone > zone, bool mainZone=false)
try to send a text
Definition: MacWrtProParser.cxx:1418
MWAWPosition::size
const MWAWVec2f & size() const
returns the frame size
Definition: MWAWPosition.hxx:135
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:220
MacWrtProParser::getSubDocument
std::shared_ptr< MWAWSubDocument > getSubDocument(int blockId)
returns a subdocument corresponding to a blockid
Definition: MacWrtProParser.cxx:376
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
MacWrtProStructuresListenerState::send
bool send(int graphicId)
try to send a graphic which corresponds to graphicid
Definition: MacWrtProStructures.cxx:2869
MacWrtProParser::sendEmptyFrameZone
bool sendEmptyFrameZone(MWAWPosition const &pos, MWAWGraphicStyle const &style)
try to send an empty zone (can exist in MacWrtPro1.5)
Definition: MacWrtProParser.cxx:1319
MacWrtProParserInternal::TextZoneData::operator<<
friend std::ostream & operator<<(std::ostream &o, TextZoneData const &tData)
Definition: MacWrtProParser.cxx:98
MWAWCellContent::double2Date
static bool double2Date(double val, int &Y, int &M, int &D)
conversion beetween double days since 1900 and a date, ie val=0 corresponds to 1/1/1900,...
Definition: MWAWCell.cxx:510
MWAWCell.hxx
MacWrtProParserInternal::TextZone::m_textLength
int m_textLength
the text length
Definition: MacWrtProParser.cxx:199
MacWrtProParserInternal::TextZoneData
Internal: a struct used to store a text zone.
Definition: MacWrtProParser.cxx:91
MWAWField::Date
@ Date
Definition: libmwaw_internal.hxx:401
MWAWListener::SoftPageBreak
@ SoftPageBreak
Definition: MWAWListener.hxx:58
MWAWSubDocument.hxx
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWPageSpan::getPageSpan
int getPageSpan() const
Definition: MWAWPageSpan.hxx:170
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
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:1115
MacWrtProParserInternal::Zone::m_stream
std::shared_ptr< MWAWStream > m_stream
the storage
Definition: MacWrtProParser.cxx:84
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:1180
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MacWrtProParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MacWrtProParser.cxx:264
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:277
MacWrtProParser::findNumHardBreaks
int findNumHardBreaks(int blockId)
compute the number of hard page break
Definition: MacWrtProParser.cxx:1331
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
MacWrtProParser::sendTextBoxZone
bool sendTextBoxZone(int blockId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
send a textbox zone
Definition: MacWrtProParser.cxx:1376
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:699
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
MWAWPosition::setSize
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:215
MacWrtProParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacWrtProParser.cxx:550
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
MacWrtProParserInternal::Zone::~Zone
~Zone()
Definition: MacWrtProParser.cxx:73
MacWrtProParser::init
void init()
inits all internal variables
Definition: MacWrtProParser.cxx:322
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:67
MacWrtProParser::MacWrtProParser
MacWrtProParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MacWrtProParser.cxx:310
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:561
MacWrtProParserInternal::Token::m_box
MWAWBox2f m_box
the bdbox ( filled in MWII for figure)
Definition: MacWrtProParser.cxx:183
MacWrtProParser::getFreeZoneList
bool getFreeZoneList(std::vector< int > &blockLists)
return the chain list of block ( used to get free blocks): MWPro only
Definition: MacWrtProParser.cxx:510
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MacWrtProParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MacWrtProParser.cxx:296
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWVec2< int >
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:210
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:72
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
MacWrtProParser::sendPictureZone
bool sendPictureZone(int blockId, MWAWPosition const &pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: MacWrtProParser.cxx:1601
MacWrtProParserInternal::State::m_colSeparator
double m_colSeparator
the columns separator in inch MWII
Definition: MacWrtProParser.cxx:247
MacWrtProParser::createZones
bool createZones()
finds the different objects zones
Definition: MacWrtProParser.cxx:585
MacWrtProParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: MacWrtProParser.cxx:384
MacWrtProStructuresListenerState::isSent
bool isSent(int graphicId)
returns true if the graphic is already sent ( or does not exists)
Definition: MacWrtProStructures.cxx:2863
MacWrtProParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: MacWrtProParser.cxx:248
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
MacWrtProParserInternal::DataPosition::Compare
the comparison structure
Definition: MacWrtProParser.cxx:1403
MWAWField
a field
Definition: libmwaw_internal.hxx:399
MWAWField::PageNumber
@ PageNumber
Definition: libmwaw_internal.hxx:401
MacWrtProParser::~MacWrtProParser
~MacWrtProParser() final
destructor
Definition: MacWrtProParser.cxx:318
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
MWAWStream
small structure use to store a stream and it debug file
Definition: MWAWStream.hxx:41
MWAWPosition::Char
@ 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:2916
MacWrtProParserInternal::Zone::m_type
int m_type
the type : 0(text), 1(graphic)
Definition: MacWrtProParser.cxx:78
MacWrtProParser::sendTextZone
bool sendTextZone(int blockId, bool mainZone=false)
send a text box
Definition: MacWrtProParser.cxx:1365
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:188
MacWrtProParserInternal::SubDocument
Internal: the subdocument of a MacWrtProParser.
Definition: MacWrtProParser.cxx:254
MacWrtProParserInternal::TextZoneData::m_type
int m_type
the type
Definition: MacWrtProParser.cxx:115
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
MacWrtProStructuresListenerState::sendChar
void sendChar(char c)
send a character
Definition: MacWrtProStructures.cxx:2939
MacWrtProParserInternal::State::State
State()
constructor
Definition: MacWrtProParser.cxx:219
MWAWGraphicStyle.hxx
MacWrtProParserInternal::State::m_fileNumPages
int m_fileNumPages
the number of page in MWII
Definition: MacWrtProParser.cxx:245
MacWrtProStructuresListenerState::sendParagraph
bool sendParagraph(int id)
try to send a paragraph
Definition: MacWrtProStructures.cxx:3028
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MacWrtProParserInternal::Zone::m_parsed
bool m_parsed
true if the zone is sended
Definition: MacWrtProParser.cxx:87
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:1613
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:189
MacWrtProStructures
the main class to read the structures part of MacWrite Pro file
Definition: MacWrtProStructures.hxx:135
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
MacWrtProStructuresListenerState
an interface to transmit the info of MacWrtProStructures to a listener
Definition: MacWrtProStructures.hxx:69
MacWrtProParserInternal::TextZone::m_entries
std::vector< MWAWEntry > m_entries
the list of entries
Definition: MacWrtProParser.cxx:202
MacWrtProParserInternal::State::m_textMap
std::map< int, std::shared_ptr< TextZone > > m_textMap
the list of blockId->text zone
Definition: MacWrtProParser.cxx:240
MacWrtProParserInternal::Token
Internal: a struct used to store a text zone.
Definition: MacWrtProParser.cxx:123
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
@ FootNote
Definition: libmwaw_internal.hxx:447
MacWrtProParser::hasTitlePage
bool hasTitlePage() const
returns true if the document has a title page
Definition: MacWrtProParser.cxx:366
MacWrtProParserInternal::TextZone::TextZone
TextZone()
Definition: MacWrtProParser.cxx:190
MWAWPosition::XLeft
@ XLeft
Definition: MWAWPosition.hxx:55
MWAWPosition::YBottom
@ YBottom
Definition: MWAWPosition.hxx:57
MWAWStringStream.hxx
MWAWInputStream.hxx
MacWrtProParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: MacWrtProParser.cxx:248
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
MacWrtProParserInternal::State::m_parsedBlocks
std::set< int > m_parsedBlocks
the list of retrieved block : block
Definition: MacWrtProParser.cxx:234
MacWrtProParserInternal::State::m_hasTitlePage
bool m_hasTitlePage
flag to know if we have a title page
Definition: MacWrtProParser.cxx:249
librevenge
Definition: MWAWDocument.hxx:56
MacWrtProParserInternal::TextZoneData::m_id
int m_id
an id
Definition: MacWrtProParser.cxx:119
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
MacWrtProStructuresListenerState::sendFont
bool sendFont(int id)
try to send a character style
Definition: MacWrtProStructures.cxx:3014
MacWrtProParserInternal::Token::m_type
int m_type
the type
Definition: MacWrtProParser.cxx:177
MWAWBox2< float >
MacWrtProParserInternal
Internal: the structures of a MacWrtProParser.
Definition: MacWrtProParser.cxx:61
MWAWField::Title
@ Title
Definition: libmwaw_internal.hxx:401
MacWrtProParserInternal::DataPosition::m_id
int m_id
an id
Definition: MacWrtProParser.cxx:1399
MacWrtProParserInternal::Token::m_flags
unsigned int m_flags[4]
some flags
Definition: MacWrtProParser.cxx:185
MacWrtProStructuresListenerState::insertSoftPageBreak
void insertSoftPageBreak()
insert a page break ( if we are not on a new page )
Definition: MacWrtProStructures.cxx:2879
MacWrtProParserInternal::DataPosition
Internal and low level: structure used to sort the position of data.
Definition: MacWrtProParser.cxx:1388
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
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:98
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:185
MWAWStringStream
internal class used to create a RVNGInputStream from a unsigned char's pointer
Definition: MWAWStringStream.hxx:36
MacWrtProStructures.hxx
MacWrtProParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MacWrtProParser.cxx:274
MacWrtProParserInternal::State::m_graphicIdsCallByTokens
std::vector< int > m_graphicIdsCallByTokens
the list of graphicId called by tokens
Definition: MacWrtProParser.cxx:243