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 
68 {
69  friend class MacWrtProStructures;
72 
73 public:
77  virtual ~MacWrtProParser();
78 
80  bool checkHeader(MWAWHeader *header, bool strict=false);
81 
82  // the main parse function
83  void parse(librevenge::RVNGTextInterface *documentInterface);
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(int blockId, std::vector<int> &blockLists);
100 
105  bool parseDataZone(int blockId, int type);
106 
108  bool parseTextZone(shared_ptr<MacWrtProParserInternal::Zone> zone);
109 
111  bool readTextEntries(shared_ptr<MacWrtProParserInternal::Zone> zone,
112  std::vector<MWAWEntry> &res, int textLength);
114  bool readTextIds(shared_ptr<MacWrtProParserInternal::Zone> zone,
115  std::vector<MacWrtProParserInternal::TextZoneData> &res,
116  int textLength, int type);
118  bool readTextTokens(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() const;
130 
132  void newPage(int number, bool softBreak=false);
133 
134  //
135  // interface with MacWrtProParserStructures
136  //
137 
139  bool sendTextZone(int blockId, bool mainZone = false);
140 
142  int findNumHardBreaks(int blockId);
143 
145  bool sendPictureZone(int blockId, MWAWPosition const &pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle());
146 
148  bool sendTextBoxZone(int blockId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle());
150  bool sendEmptyFrameZone(MWAWPosition const &pos, MWAWGraphicStyle const &style);
151 
152  //
153  // low level
154  //
155 
157  bool readPrintInfo();
158 
160  bool readDocHeader();
161 
162 #ifdef DEBUG
163  void saveOriginal(MWAWInputStreamPtr input);
165 #endif
166 
168  bool sendPicture(shared_ptr<MacWrtProParserInternal::Zone> zone, MWAWPosition pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle());
169 
171  bool sendText(shared_ptr<MacWrtProParserInternal::TextZone> zone, bool mainZone = false);
172 
174  int findNumHardBreaks(shared_ptr<MacWrtProParserInternal::TextZone> zone);
175 
177  void checkUnparsed();
178 
179 protected:
180  //
181  // data
182  //
184  shared_ptr<MacWrtProParserInternal::State> m_state;
185 
187  shared_ptr<MacWrtProStructures> m_structures;
188 };
189 #endif
190 // 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:88
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MacWrtProParserInternal::State::m_textMap
std::map< int, shared_ptr< TextZone > > m_textMap
the list of blockId->text zone
Definition: MacWrtProParser.cxx:228
MacWrtProParserInternal::Token::m_blockId
int m_blockId
the block id
Definition: MacWrtProParser.cxx:181
MWAWField::Time
@ Time
Definition: libmwaw_internal.hxx:371
MacWrtProParserInternal::TextZoneData::TextZoneData
TextZoneData()
Definition: MacWrtProParser.cxx:99
MacWrtProParserInternal::SubDocument::~SubDocument
virtual ~SubDocument()
destructor
Definition: MacWrtProParser.cxx:249
MWAWTextParser
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
MacWrtProParserInternal::State
Internal: the state of a MacWrtProParser.
Definition: MacWrtProParser.cxx:213
MWAWTextListenerPtr
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
MacWrtProParserInternal::Token::Token
Token()
Definition: MacWrtProParser.cxx:128
MWAWNote
a note
Definition: libmwaw_internal.hxx:406
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
MacWrtProParserInternal::TextZone::m_parsed
bool m_parsed
true if the zone is sended
Definition: MacWrtProParser.cxx:207
MacWrtProParser::getFreeZoneList
bool getFreeZoneList(int blockId, std::vector< int > &blockLists)
return the chain list of block ( used to get free blocks)
Definition: MacWrtProParser.cxx:503
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
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:121
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:792
MacWrtProParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: MacWrtProParser.cxx:373
MacWrtProParserInternal::Zone::m_asciiFile
libmwaw::DebugFile m_asciiFile
the debug file
Definition: MacWrtProParser.cxx:91
MWAWPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
MacWrtProParserInternal::DataPosition::m_pos
long m_pos
the position
Definition: MacWrtProParser.cxx:1418
MacWrtProParserInternal::Zone::Zone
Zone()
Definition: MacWrtProParser.cxx:64
MacWrtProParserInternal::Zone::m_blockId
int m_blockId
the first block id
Definition: MacWrtProParser.cxx:82
MacWrtProParserInternal::State::m_col
int m_col
the number of columns in MWII
Definition: MacWrtProParser.cxx:233
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
MacWrtProParserInternal::TextZone::m_ids
std::vector< TextZoneData > m_ids[2]
two vector list of id ( charIds, paragraphIds)
Definition: MacWrtProParser.cxx:201
MWAWDocument::MWAW_T_MACWRITEPRO
@ 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: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:345
MacWrtProParser::numColumns
int numColumns() const
returns the document number of columns ( filed in MWII)
Definition: MacWrtProParser.cxx:336
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:202
MWAWFontConverter.hxx
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
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
MWAWPosition::setUnit
void setUnit(librevenge::RVNGUnit newUnit)
sets the dimension unit
Definition: MWAWPosition.hxx:209
MacWrtProParserInternal::TextZone::m_tokens
std::vector< Token > m_tokens
the tokens list
Definition: MacWrtProParser.cxx:204
MacWrtProStructuresListenerState::getFontDebugString
std::string getFontDebugString(int fontId)
debug function which returns a string corresponding to a fontId
Definition: MacWrtProStructures.cxx:2850
MWAWPrinter.hxx
MacWrtProParser::checkUnparsed
void checkUnparsed()
a debug function which can be used to save the unparsed block
Definition: MacWrtProParser.cxx:1787
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
MacWrtProParserInternal::SubDocument::SubDocument
SubDocument(MacWrtProParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: MacWrtProParser.cxx:245
MacWrtProParserInternal::DataPosition::Compare::operator()
bool operator()(DataPosition const &p1, DataPosition const &p2) const
comparaison function
Definition: MacWrtProParser.cxx:1422
MWAWHeaderFooter::m_subDocument
MWAWSubDocumentPtr m_subDocument
the document data
Definition: MWAWPageSpan.hxx:89
MacWrtProParser::readTextTokens
bool readTextTokens(shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MacWrtProParserInternal::Token > &res, int textLength)
try to read the text token entries
Definition: MacWrtProParser.cxx:1200
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MacWrtProParserInternal::State::m_dataMap
std::map< int, shared_ptr< Zone > > m_dataMap
the list of blockId->data zone
Definition: MacWrtProParser.cxx:225
MacWrtProParserInternal::DataPosition::DataPosition
DataPosition(int type=-1, int id=-1, long pos=0)
constructor
Definition: MacWrtProParser.cxx:1412
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
MacWrtProParser::getBlocksCalledByToken
std::vector< int > const & getBlocksCalledByToken() const
return the list of blockid called by token.
Definition: MacWrtProParser.cxx:364
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:1414
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
MacWrtProParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: MacWrtProParser.cxx:237
MacWrtProParser::parseDataZone
bool parseDataZone(int blockId, int type)
parse a data zone
Definition: MacWrtProParser.cxx:968
MacWrtProParser.hxx
MacWrtProParserInternal::Zone
Internal: a struct used to store a zone.
Definition: MacWrtProParser.cxx:63
MWAWPosition::setNaturalSize
void setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:204
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:222
MacWrtProParser::sendEmptyFrameZone
bool sendEmptyFrameZone(MWAWPosition const &pos, MWAWGraphicStyle const &style)
try to send an empty zone (can exist in MacWrtPro1.5)
Definition: MacWrtProParser.cxx:1338
MWAWHeaderFooter
a class which stores the header/footer data
Definition: MWAWPageSpan.hxx:45
MacWrtProParserInternal::TextZoneData::operator<<
friend std::ostream & operator<<(std::ostream &o, TextZoneData const &tData)
Definition: MacWrtProParser.cxx:102
MacWrtProParserInternal::TextZone::m_textLength
int m_textLength
the text length
Definition: MacWrtProParser.cxx:195
MacWrtProParserInternal::TextZoneData
Internal: a struct used to store a text zone.
Definition: MacWrtProParser.cxx:98
MWAWField::Date
@ Date
Definition: libmwaw_internal.hxx:371
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWListener::SoftPageBreak
@ SoftPageBreak
Definition: MWAWListener.hxx:58
MWAWSubDocument.hxx
MWAWPosition::size
MWAWVec2f const & size() const
returns the frame size
Definition: MWAWPosition.hxx:119
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
MacWrtProParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MacWrtProParser.cxx:658
MacWrtProParser::readTextEntries
bool readTextEntries(shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MWAWEntry > &res, int textLength)
try to read the text block entries
Definition: MacWrtProParser.cxx:1061
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:178
MacWrtProStructuresListenerState::resendAll
bool resendAll()
force resent data : font + paragraph
Definition: MacWrtProStructures.cxx:2818
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
MWAWGraphicStyle::emptyStyle
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:268
MacWrtProParser::sendText
bool sendText(shared_ptr< MacWrtProParserInternal::TextZone > zone, bool mainZone=false)
try to send a text
Definition: MacWrtProParser.cxx:1435
MWAWParser::setTextListener
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
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:105
MacWrtProParser::findNumHardBreaks
int findNumHardBreaks(int blockId)
compute the number of hard page break
Definition: MacWrtProParser.cxx:1350
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:620
MacWrtProParser::sendTextBoxZone
bool sendTextBoxZone(int blockId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
send a textbox zone
Definition: MacWrtProParser.cxx:1398
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:197
MacWrtProParser::readPrintInfo
bool readPrintInfo()
read the print info zone
Definition: MacWrtProParser.cxx:739
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
MWAWPosition.hxx
MWAWPosition::setSize
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:199
MacWrtProParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacWrtProParser.cxx:557
MacWrtProParser::sendPicture
bool sendPicture(shared_ptr< MacWrtProParserInternal::Zone > zone, MWAWPosition pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: MacWrtProParser.cxx:1642
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:615
MacWrtProParserInternal::Zone::~Zone
~Zone()
Definition: MacWrtProParser.cxx:67
MacWrtProParser::init
void init()
inits all internal variables
Definition: MacWrtProParser.cxx:321
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
MacWrtProParserInternal::SubDocument::operator==
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: MacWrtProParser.cxx:254
MacWrtProParser::readTextIds
bool readTextIds(shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MacWrtProParserInternal::TextZoneData > &res, int textLength, int type)
try to read the text id entries
Definition: MacWrtProParser.cxx:1136
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
MacWrtProParserInternal::Token::m_box
MWAWBox2f m_box
the bdbox ( filled in MWII for figure)
Definition: MacWrtProParser.cxx:183
MWAWInputStream::get
static shared_ptr< MWAWInputStream > get(librevenge::RVNGBinaryData const &data, bool inverted)
returns a new input stream corresponding to a librevenge::RVNGBinaryData
Definition: MWAWInputStream.cxx:90
MacWrtProParser::m_state
shared_ptr< MacWrtProParserInternal::State > m_state
the state
Definition: MacWrtProParser.hxx:184
MacWrtProParserInternal::State::m_blocksCallByTokens
std::vector< int > m_blocksCallByTokens
the list of blockId called by tokens
Definition: MacWrtProParser.cxx:231
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MWAWVec2< int >
MacWrtProParserInternal::SubDocument::getId
int getId() const
returns the subdocument id
Definition: MacWrtProParser.cxx:260
MacWrtProParser::getZoneData
bool getZoneData(librevenge::RVNGBinaryData &data, int blockId)
retrieve the data which corresponds to a zone
Definition: MacWrtProParser.cxx:423
MacWrtProParserInternal::SubDocument::setId
void setId(int vid)
sets the subdocument id
Definition: MacWrtProParser.cxx:265
MWAWPictMac.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:142
MWAWDebug.hxx
MWAWPosition::setOrigin
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:194
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:72
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1134
MacWrtProParser::sendPictureZone
bool sendPictureZone(int blockId, MWAWPosition const &pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: MacWrtProParser.cxx:1629
MacWrtProParser::createZones
bool createZones()
finds the different objects zones
Definition: MacWrtProParser.cxx:627
MacWrtProParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: MacWrtProParser.cxx:234
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
MacWrtProParser::m_structures
shared_ptr< MacWrtProStructures > m_structures
the structures parser
Definition: MacWrtProParser.hxx:187
MacWrtProParserInternal::DataPosition::Compare
the comparison structure
Definition: MacWrtProParser.cxx:1420
MWAWField
a field
Definition: libmwaw_internal.hxx:369
MWAWField::PageNumber
@ PageNumber
Definition: libmwaw_internal.hxx:371
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
MWAWHeaderFooter::FOOTER
@ FOOTER
Definition: MWAWPageSpan.hxx:48
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:2730
MacWrtProParserInternal::Zone::m_type
int m_type
the type : 0(text), 1(graphic)
Definition: MacWrtProParser.cxx:79
MacWrtProParser::sendTextZone
bool sendTextZone(int blockId, bool mainZone=false)
send a text box
Definition: MacWrtProParser.cxx:1386
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
MacWrtProParserInternal::SubDocument
Internal: the subdocument of a MacWrtProParser.
Definition: MacWrtProParser.cxx:243
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
MacWrtProParser::parseTextZone
bool parseTextZone(shared_ptr< MacWrtProParserInternal::Zone > zone)
parse a text zone
Definition: MacWrtProParser.cxx:1011
MacWrtProParserInternal::TextZoneData::m_type
int m_type
the type
Definition: MacWrtProParser.cxx:119
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
MacWrtProStructuresListenerState::sendChar
void sendChar(char c)
send a character
Definition: MacWrtProStructures.cxx:2743
MacWrtProParserInternal::State::State
State()
constructor
Definition: MacWrtProParser.cxx:215
MWAWGraphicStyle.hxx
MacWrtProStructuresListenerState::sendParagraph
bool sendParagraph(int id)
try to send a paragraph
Definition: MacWrtProStructures.cxx:2873
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:2896
MacWrtProParserInternal::Zone::m_parsed
bool m_parsed
true if the zone is sended
Definition: MacWrtProParser.cxx:94
MWAWTextListener.hxx
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:153
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
MacWrtProParserInternal::Zone::m_data
librevenge::RVNGBinaryData m_data
the storage
Definition: MacWrtProParser.cxx:85
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:192
MacWrtProStructuresListenerState::isSent
bool isSent(int blockId)
returns true if the block is already sent ( or does not exists)
Definition: MacWrtProStructures.cxx:2687
MWAWRSRCParserPtr
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:223
MacWrtProStructuresListenerState
an interface to transmit the info of MacWrtProStructures to a listener
Definition: MacWrtProStructures.hxx:71
MacWrtProParserInternal::SubDocument::operator!=
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: MacWrtProParser.cxx:297
MacWrtProParserInternal::TextZone::m_entries
std::vector< MWAWEntry > m_entries
the list of entries
Definition: MacWrtProParser.cxx:198
MacWrtProParserInternal::Token::m_flags
int m_flags[4]
some flags
Definition: MacWrtProParser.cxx:185
MacWrtProParserInternal::Token
Internal: a struct used to store a text zone.
Definition: MacWrtProParser.cxx:127
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
MWAWNote::FootNote
@ FootNote
Definition: libmwaw_internal.hxx:408
MacWrtProParserInternal::TextZone::TextZone
TextZone()
Definition: MacWrtProParser.cxx:190
MWAWPosition::XLeft
@ XLeft
Definition: MWAWPosition.hxx:55
MWAWPosition::YBottom
@ YBottom
Definition: MWAWPosition.hxx:57
MWAWInputStream.hxx
MacWrtProParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: MacWrtProParser.cxx:236
MacWrtProParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: MacWrtProParser.cxx:234
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:82
MacWrtProParser::~MacWrtProParser
virtual ~MacWrtProParser()
destructor
Definition: MacWrtProParser.cxx:317
MacWrtProParserInternal::TextZoneData::m_id
int m_id
an id
Definition: MacWrtProParser.cxx:123
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
MWAWSubDocumentPtr
shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:517
MacWrtProStructuresListenerState::sendFont
bool sendFont(int id)
try to send a character style
Definition: MacWrtProStructures.cxx:2827
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:60
MWAWField::Title
@ Title
Definition: libmwaw_internal.hxx:371
MacWrtProParserInternal::Zone::ascii
libmwaw::DebugFile & ascii()
returns the debug file
Definition: MacWrtProParser.cxx:73
MacWrtProParserInternal::DataPosition::m_id
int m_id
an id
Definition: MacWrtProParser.cxx:1416
MacWrtProParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: MacWrtProParser.cxx:278
MacWrtProParser::MacWrtProParser
MacWrtProParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MacWrtProParser.cxx:311
MacWrtProStructuresListenerState::send
bool send(int blockId)
try to send a block which corresponds to blockid
Definition: MacWrtProStructures.cxx:2693
MacWrtProStructuresListenerState::insertSoftPageBreak
void insertSoftPageBreak()
insert a page break ( if we are not on a new page )
Definition: MacWrtProStructures.cxx:2700
MacWrtProParserInternal::DataPosition
Internal and low level: structure used to sort the position of data.
Definition: MacWrtProParser.cxx:1410
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
MacWrtProParser
the main class to read a MacWrite II and MacWrite Pro file
Definition: MacWrtProParser.hxx:68
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWListenerPtr
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
MWAWParser.hxx
MWAWPictData::get
static MWAWPictData * get(MWAWInputStreamPtr input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
MWAWSubDocument::m_input
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:151
MacWrtProStructures.hxx
MacWrtProParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MacWrtProParser.cxx:275

Generated on Wed Jun 17 2020 06:30:10 for libmwaw by doxygen 1.8.18