HanMacWrdKParser.hxx Source File documentation

HanMacWrdKParser.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 * Parser to convert HanMac Word-K document
36 */
37 #ifndef HAN_MAC_WRD_K_PARSER
38 # define HAN_MAC_WRD_K_PARSER
39
40 #include <iostream>
41 #include <string>
42 #include <vector>
43
44 #include <librevenge/librevenge.h>
45
46 #include "MWAWDebug.hxx"
47 #include "MWAWInputStream.hxx"
48
49 #include "MWAWParser.hxx"
50
51 namespace HanMacWrdKParserInternal
52 {
53 struct State;
54 class SubDocument;
55 }
56
58 struct HanMacWrdKZone {
60 HanMacWrdKZone(MWAWInputStreamPtr const &input, libmwaw::DebugFile &asciiFile);
62 explicit HanMacWrdKZone(std::shared_ptr<libmwaw::DebugFile> const &asciiFile);
64 ~HanMacWrdKZone();
65
67 long begin() const
68 {
69 return m_asciiFilePtr ? 0 : m_filePos;
70 }
72 long end() const
73 {
74 return m_asciiFilePtr ? long(m_data.size()) : m_endFilePos;
75 }
77 long length() const
78 {
79 if (m_asciiFilePtr) return long(m_data.size());
80 return m_endFilePos-m_filePos;
81 }
83 bool valid() const
84 {
85 return length() > 0;
86 }
87
88 // function to define the zone in the original file
89
91 long fileBeginPos() const
92 {
93 return m_filePos;
94 }
96 long fileEndPos() const
97 {
98 return m_endFilePos;
99 }
101 void setFileBeginPos(long begPos)
102 {
103 m_filePos = m_endFilePos = begPos;
104 }
106 void setFileLength(long len)
107 {
108 m_endFilePos = m_filePos+len;
109 }
111 void setFilePositions(long begPos, long endPos)
112 {
113 m_filePos = begPos;
114 m_endFilePos = endPos;
115 }
117 librevenge::RVNGBinaryData &getBinaryData()
118 {
119 return m_data;
120 }
122 std::string name() const
123 {
124 return name(m_type);
125 }
127 static std::string name(int type);
128
130 friend std::ostream &operator<<(std::ostream &o, HanMacWrdKZone const &zone);
131
133 libmwaw::DebugFile &ascii() const
134 {
135 return *m_asciiFile;
136 }
137
139 int m_type;
140
142 long m_id;
143
145 long m_subId;
146
148 MWAWInputStreamPtr m_input;
149
151 std::string m_extra;
152
154 mutable bool m_parsed;
155
156 protected:
158 long m_filePos;
159
161 long m_endFilePos;
162
164 librevenge::RVNGBinaryData m_data;
165
167 libmwaw::DebugFile *m_asciiFile;
168
170 std::shared_ptr<libmwaw::DebugFile> m_asciiFilePtr;
171
172 private:
173 HanMacWrdKZone(HanMacWrdKZone const &orig) = delete;
174 HanMacWrdKZone &operator=(HanMacWrdKZone const &orig) = delete;
175 };
176
177 class HanMacWrdKGraph;
178 class HanMacWrdKText;
179
185 class HanMacWrdKParser final : public MWAWTextParser
186 {
187 friend class HanMacWrdKGraph;
188 friend class HanMacWrdKText;
189 friend class HanMacWrdKParserInternal::SubDocument;
190
191 public:
193 HanMacWrdKParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
195 ~HanMacWrdKParser() final;
196
198 bool checkHeader(MWAWHeader *header, bool strict=false) final;
199
200 // the main parse function
201 void parse(librevenge::RVNGTextInterface *documentInterface) final;
202
203 protected:
205 void init();
206
208 void createDocument(librevenge::RVNGTextInterface *documentInterface);
209
211 bool createZones();
212
214 MWAWVec2f getPageLeftTop() const;
215
217 void newPage(int number);
218
219 // interface with the text parser
220
222 bool sendText(long id, long subId, MWAWListenerPtr listener=MWAWListenerPtr());
223
225 bool canSendTextAsGraphic(long id, long subId);
226
227 // interface with the graph parser
228
230 bool sendZone(long zId);
232 bool getColor(int colId, int patternId, MWAWColor &color) const;
233
234 //
235 // low level
236 //
237
239 bool readZonesList();
241 bool readZone(std::shared_ptr<HanMacWrdKZone> zone);
243 std::shared_ptr<HanMacWrdKZone> decodeZone(std::shared_ptr<HanMacWrdKZone> zone);
245 bool readFramesUnkn(std::shared_ptr<HanMacWrdKZone> zone);
247 bool readPrintInfo(HanMacWrdKZone &zone);
249 bool readZone6(std::shared_ptr<HanMacWrdKZone> zone);
251 bool readZone8(std::shared_ptr<HanMacWrdKZone> zone);
253 bool readZonea(std::shared_ptr<HanMacWrdKZone> zone);
255 bool readZoneb(HanMacWrdKZone &zone);
257 bool readZonec(std::shared_ptr<HanMacWrdKZone> zone);
258
259 protected:
260 //
261 // data
262 //
264 std::shared_ptr<HanMacWrdKParserInternal::State> m_state;
265
267 std::shared_ptr<HanMacWrdKGraph> m_graphParser;
268
270 std::shared_ptr<HanMacWrdKText> m_textParser;
271 };
272 #endif
273 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
HanMacWrdKZone::valid
bool valid() const
returns true if the zone data exists
Definition: HanMacWrdKParser.hxx:83
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:47
libmwaw::PrinterRect::size
MWAWVec2i size() const
returns the size
Definition: MWAWPrinter.hxx:56
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:299
HanMacWrdKParserInternal::SubDocument
Internal: the subdocument of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:91
HanMacWrdKParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: HanMacWrdKParser.cxx:118
HanMacWrdKZone::m_asciiFilePtr
std::shared_ptr< libmwaw::DebugFile > m_asciiFilePtr
the file pointer
Definition: HanMacWrdKParser.hxx:170
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
HanMacWrdKZone::fileEndPos
long fileEndPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:96
HanMacWrdKParser
the main class to read a HanMac Word-K file
Definition: HanMacWrdKParser.hxx:186
libmwaw::PrinterRect::pos
MWAWVec2i pos(int i) const
returns the position ( 0: leftTop, 1:rightBottom )
Definition: MWAWPrinter.hxx:61
HanMacWrdKParser::createZones
bool createZones()
finds the different objects zones
Definition: HanMacWrdKParser.cxx:305
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
HanMacWrdKZone::m_type
int m_type
the type : 1(text), ....
Definition: HanMacWrdKParser.hxx:139
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
HanMacWrdKGraph.hxx
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
MWAWDocument::MWAW_T_HANMACWORDK
@ MWAW_T_HANMACWORDK
HanMac Word-K (v2.0.5-2.0.6)
Definition: MWAWDocument.hxx:118
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
HanMacWrdKParserInternal::State::m_zonesListBegin
long m_zonesListBegin
the list of zone begin
Definition: HanMacWrdKParser.cxx:79
HanMacWrdKParserInternal::State::State
State()
constructor
Definition: HanMacWrdKParser.cxx:68
MWAWPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
HanMacWrdKZone::ascii
libmwaw::DebugFile & ascii() const
returns the debug file
Definition: HanMacWrdKParser.hxx:133
HanMacWrdKZone::operator<<
friend std::ostream & operator<<(std::ostream &o, HanMacWrdKZone const &zone)
operator <<
Definition: HanMacWrdKParser.cxx:1221
HanMacWrdKParser::canSendTextAsGraphic
bool canSendTextAsGraphic(long id, long subId)
check if we can send a textzone as graphic
Definition: HanMacWrdKParser.cxx:177
HanMacWrdKParser::readZonea
bool readZonea(std::shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type a
Definition: HanMacWrdKParser.cxx:787
HanMacWrdKZone::m_id
long m_id
the zone id
Definition: HanMacWrdKParser.hxx:142
HanMacWrdKParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: HanMacWrdKParser.cxx:83
HanMacWrdKZone::m_extra
std::string m_extra
some extra data
Definition: HanMacWrdKParser.hxx:151
HanMacWrdKZone::HanMacWrdKZone
HanMacWrdKZone(MWAWInputStreamPtr const &input, libmwaw::DebugFile &asciiFile)
constructor given an input and an asciiFile
Definition: HanMacWrdKParser.cxx:1185
HanMacWrdKParser::readFramesUnkn
bool readFramesUnkn(std::shared_ptr< HanMacWrdKZone > zone)
try to read a zone storing a list of ?, frameType
Definition: HanMacWrdKParser.cxx:641
HanMacWrdKZone::m_data
librevenge::RVNGBinaryData m_data
the storage (if needed)
Definition: HanMacWrdKParser.hxx:164
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
libmwaw::PrinterInfo::paper
PrinterRect paper() const
returns the paper rectangle
Definition: MWAWPrinter.cxx:222
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
HanMacWrdKText
the main class to read the text part of HanMac Word file
Definition: HanMacWrdKText.hxx:62
HanMacWrdKZone::m_asciiFile
libmwaw::DebugFile * m_asciiFile
the debug file
Definition: HanMacWrdKParser.hxx:167
HanMacWrdKZone::name
std::string name() const
returns the zone name
Definition: HanMacWrdKParser.hxx:122
HanMacWrdKZone::getBinaryData
librevenge::RVNGBinaryData & getBinaryData()
returns a pointer to the binary data
Definition: HanMacWrdKParser.hxx:117
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
HanMacWrdKZone::~HanMacWrdKZone
~HanMacWrdKZone()
destructor
Definition: HanMacWrdKParser.cxx:1215
MWAWFontConverter.hxx
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
HanMacWrdKParser::readZonec
bool readZonec(std::shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type c
Definition: HanMacWrdKParser.cxx:889
HanMacWrdKParser::readZone
bool readZone(std::shared_ptr< HanMacWrdKZone > zone)
try to read a generic zone
Definition: HanMacWrdKParser.cxx:430
MWAWPrinter.hxx
HanMacWrdKParser::getPageLeftTop
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: HanMacWrdKParser.cxx:197
HanMacWrdKParser::readPrintInfo
bool readPrintInfo(HanMacWrdKZone &zone)
try to read a printinfo zone (type 7)
Definition: HanMacWrdKParser.cxx:530
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
HanMacWrdKZone::HanMacWrdKZone
HanMacWrdKZone(HanMacWrdKZone const &orig)=delete
MWAW_FALLTHROUGH
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
MWAWHeaderFooter::m_subDocument
MWAWSubDocumentPtr m_subDocument
the document data
Definition: MWAWPageSpan.hxx:92
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
HanMacWrdKParser::newPage
void newPage(int number)
adds a new page
Definition: HanMacWrdKParser.cxx:206
HanMacWrdKParserInternal::State::m_zonesMap
std::multimap< long, std::shared_ptr< HanMacWrdKZone > > m_zonesMap
a map of entry: zoneId->zone
Definition: HanMacWrdKParser.cxx:81
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
HanMacWrdKParser::init
void init()
inits all internal variables
Definition: HanMacWrdKParser.cxx:155
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MWAWHeaderFooter
a class which stores the header/footer data
Definition: MWAWPageSpan.hxx:45
MWAWCell.hxx
Defines MWAWCell (cell content and format)
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWSubDocument.hxx
HanMacWrdKZone::setFileBeginPos
void setFileBeginPos(long begPos)
sets the begin file pos
Definition: HanMacWrdKParser.hxx:101
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
HanMacWrdKParser::readZoneb
bool readZoneb(HanMacWrdKZone &zone)
try to read a unknown zone of type b
Definition: HanMacWrdKParser.cxx:831
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
HanMacWrdKParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: HanMacWrdKParser.cxx:222
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
HanMacWrdKParser.hxx
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
MWAWParagraph.hxx
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
HanMacWrdKParser::readZonesList
bool readZonesList()
try to read the zones list
Definition: HanMacWrdKParser.cxx:336
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
HanMacWrdKParserInternal::SubDocument::m_id
long m_id
the subdocument id
Definition: HanMacWrdKParser.cxx:115
HanMacWrdKZone::end
long end() const
returns the last position in the input
Definition: HanMacWrdKParser.hxx:72
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
HanMacWrdKZone::m_subId
long m_subId
the zone subId
Definition: HanMacWrdKParser.hxx:145
HanMacWrdKParser::m_textParser
std::shared_ptr< HanMacWrdKText > m_textParser
the text parser
Definition: HanMacWrdKParser.hxx:270
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
libmwaw::DOC_HEADER_FOOTER
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:188
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWVec2< float >
MWAWPictMac.hxx
HanMacWrdKZone::setFilePositions
void setFilePositions(long begPos, long endPos)
sets the begin/end file pos
Definition: HanMacWrdKParser.hxx:111
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
operator<<
std::ostream & operator<<(std::ostream &o, HanMacWrdKZone const &zone)
Definition: HanMacWrdKParser.cxx:1221
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:57
HanMacWrdKZone::begin
long begin() const
returns the first position in the input
Definition: HanMacWrdKParser.hxx:67
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
HanMacWrdKParser::decodeZone
std::shared_ptr< HanMacWrdKZone > decodeZone(std::shared_ptr< HanMacWrdKZone > zone)
try to decode a zone
Definition: HanMacWrdKParser.cxx:971
HanMacWrdKParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: HanMacWrdKParser.cxx:258
HanMacWrdKParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: HanMacWrdKParser.cxx:85
HanMacWrdKZone::m_filePos
long m_filePos
the begin of the entry
Definition: HanMacWrdKParser.hxx:158
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
MWAWHeaderFooter::FOOTER
@ FOOTER
Definition: MWAWPageSpan.hxx:48
HanMacWrdKParserInternal
Internal: the structures of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:63
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
HanMacWrdKZone::m_input
MWAWInputStreamPtr m_input
the main input
Definition: HanMacWrdKParser.hxx:148
HanMacWrdKParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: HanMacWrdKParser.cxx:101
HanMacWrdKParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: HanMacWrdKParser.cxx:84
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
HanMacWrdKParser::~HanMacWrdKParser
~HanMacWrdKParser() final
destructor
Definition: HanMacWrdKParser.cxx:151
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
HanMacWrdKParser::readZone8
bool readZone8(std::shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type 8
Definition: HanMacWrdKParser.cxx:754
MWAWList.hxx
HanMacWrdKGraph
the main class to read the graphic part of a HanMac Word file
Definition: HanMacWrdKGraph.hxx:78
HanMacWrdKParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: HanMacWrdKParser.cxx:1082
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWTextListener.hxx
Defines MWAWTextListener: the libmwaw word processor listener.
HanMacWrdKParser::sendText
bool sendText(long id, long subId, MWAWListenerPtr listener=MWAWListenerPtr())
send a text zone
Definition: HanMacWrdKParser.cxx:172
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
HanMacWrdKParserInternal::SubDocument::SubDocument
SubDocument(HanMacWrdKParser &pars, MWAWInputStreamPtr const &input, long zoneId)
Definition: HanMacWrdKParser.cxx:93
HanMacWrdKParser::getColor
bool getColor(int colId, int patternId, MWAWColor &color) const
returns the color associated with a pattern
Definition: HanMacWrdKParser.cxx:189
HanMacWrdKParser::m_state
std::shared_ptr< HanMacWrdKParserInternal::State > m_state
the state
Definition: HanMacWrdKParser.hxx:264
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
HanMacWrdKZone::fileBeginPos
long fileBeginPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:91
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
libmwaw::PrinterInfo::page
PrinterRect page() const
returns the page rectangle
Definition: MWAWPrinter.cxx:218
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
HanMacWrdKParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: HanMacWrdKParser.cxx:98
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
HanMacWrdKParserInternal::State
Internal: the state of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:66
HanMacWrdKParser::readZone6
bool readZone6(std::shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type 6
Definition: HanMacWrdKParser.cxx:710
HanMacWrdKParser::HanMacWrdKText
friend class HanMacWrdKText
Definition: HanMacWrdKParser.hxx:188
MWAWInputStream.hxx
HanMacWrdKParser::HanMacWrdKGraph
friend class HanMacWrdKGraph
Definition: HanMacWrdKParser.hxx:187
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
MWAWFont.hxx
librevenge
Definition: MWAWDocument.hxx:57
HanMacWrdKZone
Small class used to store the decoded zone of HanMacWrdKParser.
Definition: HanMacWrdKParser.hxx:58
HanMacWrdKParser::sendZone
bool sendZone(long zId)
send a zone
Definition: HanMacWrdKParser.cxx:182
HanMacWrdKZone::m_parsed
bool m_parsed
true if the zone is sended
Definition: HanMacWrdKParser.hxx:154
HanMacWrdKText.hxx
HanMacWrdKParser::m_graphParser
std::shared_ptr< HanMacWrdKGraph > m_graphParser
the graph parser
Definition: HanMacWrdKParser.hxx:267
HanMacWrdKZone::operator=
HanMacWrdKZone & operator=(HanMacWrdKZone const &orig)=delete
HanMacWrdKZone::m_endFilePos
long m_endFilePos
the end of the entry
Definition: HanMacWrdKParser.hxx:161
HanMacWrdKParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: HanMacWrdKParser.cxx:83
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
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
HanMacWrdKZone::setFileLength
void setFileLength(long len)
sets the file length
Definition: HanMacWrdKParser.hxx:106
HanMacWrdKZone::length
long length() const
returns the zone size
Definition: HanMacWrdKParser.hxx:77
HanMacWrdKParser::HanMacWrdKParser
HanMacWrdKParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: HanMacWrdKParser.cxx:142