MsWrdParser.hxx Source File documentation

MsWrdParser.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 for Microsoft Word ( version 3.0-5.1 )
36 */
37 #ifndef MS_WRD_MWAW_PARSER
38 # define MS_WRD_MWAW_PARSER
39
40 #include <list>
41 #include <map>
42 #include <string>
43 #include <vector>
44
45 #include "MWAWDebug.hxx"
46 #include "MWAWEntry.hxx"
47 #include "MWAWInputStream.hxx"
48 #include "MWAWPosition.hxx"
49
50 #include "MWAWParser.hxx"
51
52 namespace MsWrdParserInternal
53 {
54 struct Object;
55 struct State;
56 class SubDocument;
57 }
58
59 class MsWrdText;
60 class MsWrdTextStyles;
61
63 struct MsWrdEntry final : public MWAWEntry {
65 MsWrdEntry()
66 : MWAWEntry()
67 , m_pictType(-1)
68 {
69 }
70 MsWrdEntry(MsWrdEntry const &)=default;
72 ~MsWrdEntry() final;
77 int pictType() const
78 {
79 return m_pictType;
80 }
82 void setPictType(int newId)
83 {
84 m_pictType = newId;
85 }
87 friend std::ostream &operator<<(std::ostream &o, MsWrdEntry const &entry);
89 int m_pictType;
90 };
91
97 class MsWrdParser final : public MWAWTextParser
98 {
99 friend class MsWrdText;
100 friend class MsWrdTextStyles;
101 friend class MsWrdParserInternal::SubDocument;
102
103 public:
105 MsWrdParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
107 ~MsWrdParser() final;
108
110 bool checkHeader(MWAWHeader *header, bool strict=false) final;
111
113 void parse(librevenge::RVNGTextInterface *documentInterface) final;
114
115 protected:
117 void init();
118
120 void createDocument(librevenge::RVNGTextInterface *documentInterface);
121
123 bool createZones();
124
126 bool readHeaderEndV3();
127
129 bool readZoneList();
130
132 bool readPrintInfo(MsWrdEntry &entry);
133
135 bool readPrinter(MsWrdEntry &entry);
136
138 bool readDocSum(MsWrdEntry &entry);
139
141 bool readStringsZone(MsWrdEntry &entry, std::vector<std::string> &list);
142
144 bool readObjects();
145
147 bool readObjectList(MsWrdEntry &entry);
148
150 bool readObjectFlags(MsWrdEntry &entry);
151
153 bool readObject(MsWrdParserInternal::Object &obj);
154
156 bool readDocumentInfo(MsWrdEntry &entry);
157
159 bool readZone17(MsWrdEntry &entry);
160
162 bool checkPicturePos(long pos, int type);
163
165 bool readPicture(MsWrdEntry &entry);
167 void sendPicture(long fPos, int cPos, MWAWPosition::AnchorTo anchor=MWAWPosition::Char);
168
170 bool getColor(int id, MWAWColor &col) const;
171
173 void newPage(int number);
174
175 /*
176 * interface with subdocument
177 */
179 void sendFootnote(int id);
180
182 void sendFieldComment(int id);
183
185 void send(int id, libmwaw::SubDocumentType type);
187 void send(MWAWEntry const &entry);
189 void sendSimpleTextZone(MWAWListenerPtr &listener, MWAWEntry const &entry);
190
191 //
192 // low level
193 //
194
196 MsWrdEntry readEntry(std::string type, int id=-1);
197
198 protected:
199 //
200 // data
201 //
203 std::shared_ptr<MsWrdParserInternal::State> m_state;
204
206 std::multimap<std::string, MsWrdEntry> m_entryMap;
207
209 std::shared_ptr<MsWrdText> m_textParser;
210 };
211 #endif
212 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MsWrdParserInternal::SubDocument::m_pictCPos
int m_pictCPos
the picture char position
Definition: MsWrdParser.cxx:278
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
MWAWPosition::CharBaseLine
@ CharBaseLine
Definition: MWAWPosition.hxx:51
MsWrdParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MsWrdParser.cxx:272
MsWrdParserInternal::Picture
Internal: the picture of a MsWrdParser.
Definition: MsWrdParser.cxx:136
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
MWAWSubDocument::m_zone
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
MWAWPict::ReadResult
ReadResult
an enum to defined the result of a parsing use by some picture's classes which can read their data
Definition: MWAWPict.hxx:73
MWAWParser::getFontConverter
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
MWAWPageSpan::PORTRAIT
@ PORTRAIT
Definition: MWAWPageSpan.hxx:102
MsWrdParserInternal::Object::m_textPos
long m_textPos
the text position
Definition: MsWrdParser.cxx:107
MWAWNote
a note
Definition: libmwaw_internal.hxx:445
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
MsWrdParserInternal::State::State
State()
constructor
Definition: MsWrdParser.cxx:190
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MsWrdParserInternal::Object::getEntry
MsWrdEntry getEntry() const
Definition: MsWrdParser.cxx:76
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
MsWrdEntry::operator<<
friend std::ostream & operator<<(std::ostream &o, MsWrdEntry const &entry)
operator<<
Definition: MsWrdParser.cxx:325
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MsWrdParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
the main parse function
Definition: MsWrdParser.cxx:479
MsWrdParser::newPage
void newPage(int number)
adds a new page
Definition: MsWrdParser.cxx:367
MsWrdParser::MsWrdParser
MsWrdParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MsWrdParser.cxx:338
MWAWPosition::AnchorTo
AnchorTo
a list of enum used to defined the anchor
Definition: MWAWPosition.hxx:51
MsWrdParserInternal::Picture::operator<<
friend std::ostream & operator<<(std::ostream &o, Picture const &pict)
operator<<
Definition: MsWrdParser.cxx:145
MWAWPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
MsWrdParserInternal::Object::m_extra
std::string m_extra
some extra data
Definition: MsWrdParser.cxx:131
MsWrdParser::readDocumentInfo
bool readDocumentInfo(MsWrdEntry &entry)
read the page dimensions + ?
Definition: MsWrdParser.cxx:1080
MWAWEntry::isParsed
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
MsWrdParser::readStringsZone
bool readStringsZone(MsWrdEntry &entry, std::vector< std::string > &list)
read a zone which consists in a list of string
Definition: MsWrdParser.cxx:1346
libmwaw::DOC_COMMENT_ANNOTATION
@ DOC_COMMENT_ANNOTATION
Definition: libmwaw_internal.hxx:188
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:64
MsWrdParserInternal::SubDocument::m_type
libmwaw::SubDocumentType m_type
the subdocument type
Definition: MsWrdParser.cxx:274
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
MWAWPosition::WBackground
@ WBackground
Definition: MWAWPosition.hxx:53
MWAWEntry.hxx
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
MWAWPosition::YCenter
@ YCenter
Definition: MWAWPosition.hxx:57
MWAWFontConverter.hxx
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
libmwaw::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
MsWrdParser::init
void init()
inits all internal variables
Definition: MsWrdParser.cxx:351
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MsWrdEntry::pictType
int pictType() const
returns the text id
Definition: MsWrdParser.hxx:77
MWAWSubDocumentPtr
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:565
MsWrdParser::readZoneList
bool readZoneList()
read the list of zones
Definition: MsWrdParser.cxx:627
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
MsWrdParser::readObjectList
bool readObjectList(MsWrdEntry &entry)
read the object list
Definition: MsWrdParser.cxx:1454
MsWrdParser::sendFieldComment
void sendFieldComment(int id)
try to send a bookmark field id
Definition: MsWrdParser.cxx:452
MsWrdParserInternal::State::m_metaData
librevenge::RVNGPropertyList m_metaData
the meta data
Definition: MsWrdParser.cxx:225
MWAWPrinter.hxx
MsWrdParser::m_entryMap
std::multimap< std::string, MsWrdEntry > m_entryMap
the list of entries
Definition: MsWrdParser.hxx:206
MWAWPageSpan::setFormOrientation
void setFormOrientation(const FormOrientation formOrientation)
set the form orientation
Definition: MWAWPageSpan.hxx:188
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MsWrdParserInternal::Object::m_idsFlag
int m_idsFlag[2]
some flags link to m_ids
Definition: MsWrdParser.cxx:122
MWAWPictData::get
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
MWAWHeaderFooter::m_subDocument
MWAWSubDocumentPtr m_subDocument
the document data
Definition: MWAWPageSpan.hxx:92
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MsWrdParserInternal::State::m_picturesMap
std::map< long, Picture > m_picturesMap
the map filePos -> Picture
Definition: MsWrdParser.cxx:211
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
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
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:41
MsWrdEntry::setPictType
void setPictType(int newId)
sets the picture id
Definition: MsWrdParser.hxx:82
MsWrdParserInternal::Object::Object
Object()
Definition: MsWrdParser.cxx:63
MsWrdParserInternal::State::m_posToCommentMap
std::map< long, MWAWEntry > m_posToCommentMap
the map textPos -> comment entry
Definition: MsWrdParser.cxx:213
MWAWEntry::type
const std::string & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
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:44
MsWrdParserInternal::Object
Internal: the object of MsWrdParser.
Definition: MsWrdParser.cxx:62
MsWrdParserInternal::State::m_footersId
std::vector< int > m_footersId
the list of footer id which corresponds to each page
Definition: MsWrdParser.cxx:223
MsWrdParser::~MsWrdParser
~MsWrdParser() final
destructor
Definition: MsWrdParser.cxx:347
MsWrdParserInternal::State::m_endNote
bool m_endNote
a flag to know if we must place the note at the end or in the foot part
Definition: MsWrdParser.cxx:209
MWAWSubDocument.hxx
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MsWrdParserInternal::SubDocument
Internal: the subdocument of a MsWrdParser.
Definition: MsWrdParser.cxx:230
MsWrdParserInternal::Picture::m_flag
int m_flag
an unknown flag
Definition: MsWrdParser.cxx:157
MsWrdParser.hxx
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MsWrdParserInternal::State
Internal: the state of a MsWrdParser.
Definition: MsWrdParser.cxx:188
MWAWDocument::MWAW_T_MICROSOFTWORD
@ MWAW_T_MICROSOFTWORD
Microsoft Word (v1-v5)
Definition: MWAWDocument.hxx:132
MWAWEntry::m_id
int m_id
an identificator
Definition: MWAWEntry.hxx:204
MWAWParser::setTextListener
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
MWAWEntry::setType
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MsWrdParserInternal::Object::m_id
int m_id
the id
Definition: MsWrdParser.cxx:116
MsWrdParserInternal::Object::m_annotation
MWAWEntry m_annotation
the annotation entry
Definition: MsWrdParser.cxx:128
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
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
MsWrdParserInternal::Picture::Zone::m_flags
int m_flags[3]
three unknown flags
Definition: MsWrdParser.cxx:181
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
MsWrdParser::readObjects
bool readObjects()
read the objects
Definition: MsWrdParser.cxx:1403
MsWrdParserInternal::SubDocument::SubDocument
SubDocument(MsWrdParser &pars, MWAWInputStreamPtr const &input, int id, libmwaw::SubDocumentType type)
constructor for footnote, comment
Definition: MsWrdParser.cxx:234
MWAWPosition::setSize
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:215
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
MsWrdParser::m_state
std::shared_ptr< MsWrdParserInternal::State > m_state
the state
Definition: MsWrdParser.hxx:203
MsWrdText::PLC::Object
@ Object
Definition: MsWrdText.hxx:71
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
MsWrdText::PLC
Internal: the plc.
Definition: MsWrdText.hxx:70
MsWrdParserInternal::Picture::m_dim
MWAWBox2i m_dim
the dimension
Definition: MsWrdParser.cxx:153
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:47
operator<<
std::ostream & operator<<(std::ostream &o, MsWrdEntry const &entry)
Definition: MsWrdParser.cxx:325
MsWrdParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MsWrdParser.cxx:305
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MsWrdText::PLC::m_id
int m_id
the identificator
Definition: MsWrdText.hxx:94
MsWrdParserInternal::Picture::Zone::m_pos
MWAWEntry m_pos
the position in file
Definition: MsWrdParser.cxx:177
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
MWAWPosition::m_wrapping
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:278
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
libmwaw::DOC_HEADER_FOOTER
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:188
MsWrdParser::readObjectFlags
bool readObjectFlags(MsWrdEntry &entry)
read the object flags
Definition: MsWrdParser.cxx:1527
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWPict::MWAW_R_BAD
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
MWAWVec2< float >
MsWrdParser::getColor
bool getColor(int id, MWAWColor &col) const
returns the color corresponding to an id
Definition: MsWrdParser.cxx:380
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::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MsWrdParser::readDocSum
bool readDocSum(MsWrdEntry &entry)
read the document sumary
Definition: MsWrdParser.cxx:1275
MsWrdParser::sendFootnote
void sendFootnote(int id)
try to send a footnote id
Definition: MsWrdParser.cxx:443
MsWrdText
the main class to read the text part of Microsoft Word file
Definition: MsWrdText.hxx:64
MsWrdParser::m_textParser
std::shared_ptr< MsWrdText > m_textParser
the text parser
Definition: MsWrdParser.hxx:209
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
MsWrdParserInternal::State::m_objectList
std::vector< Object > m_objectList[2]
the list of object ( mainZone, other zone)
Definition: MsWrdParser.cxx:216
MsWrdParser::checkPicturePos
bool checkPicturePos(long pos, int type)
check if a position corresponds or not to a picture entry
Definition: MsWrdParser.cxx:1760
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
MsWrdParserInternal::SubDocument::SubDocument
SubDocument(MsWrdParser &pars, MWAWInputStreamPtr const &input, long fPos, int cPos)
constructor for picture
Definition: MsWrdParser.cxx:252
MsWrdParserInternal::Picture::Zone::operator<<
friend std::ostream & operator<<(std::ostream &o, Zone const &pict)
operator<<
Definition: MsWrdParser.cxx:168
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
MsWrdParserInternal::SubDocument::m_pictFPos
long m_pictFPos
the picture file position
Definition: MsWrdParser.cxx:276
MsWrdParserInternal::State::m_headersId
std::vector< int > m_headersId
the list of header id which corresponds to each page
Definition: MsWrdParser.cxx:221
MsWrdParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MsWrdParser.cxx:757
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MsWrdParserInternal::Picture::Zone::m_dim
MWAWBox2i m_dim
the dimension
Definition: MsWrdParser.cxx:179
MsWrdParserInternal::State::m_bot
long m_bot
the begin of the text
Definition: MsWrdParser.cxx:205
MWAWHeader.hxx
MWAWPictData::check
static ReadResult check(MWAWInputStreamPtr const &input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
MsWrdParser::readPrintInfo
bool readPrintInfo(MsWrdEntry &entry)
read the print info zone
Definition: MsWrdParser.cxx:1939
MsWrdParserInternal::Picture::m_picturesList
std::vector< Zone > m_picturesList
the list of picture
Definition: MsWrdParser.cxx:155
MsWrdParserInternal::State::m_eot
long m_eot
end of the text
Definition: MsWrdParser.cxx:207
MsWrdParserInternal::Object::operator<<
friend std::ostream & operator<<(std::ostream &o, Object const &obj)
operator<<
Definition: MsWrdParser.cxx:87
MsWrdParserInternal::Object::m_name
std::string m_name
the object name
Definition: MsWrdParser.cxx:113
libmwaw::DOC_NOTE
@ DOC_NOTE
Definition: libmwaw_internal.hxx:188
MsWrdParserInternal::SubDocument::SubDocument
SubDocument(MsWrdParser &pars, MWAWInputStreamPtr const &input, MWAWEntry const &entry, libmwaw::SubDocumentType type)
constructor for header/footer
Definition: MsWrdParser.cxx:243
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
MsWrdParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MsWrdParser.cxx:262
MsWrdParser::readEntry
MsWrdEntry readEntry(std::string type, int id=-1)
read a file entry
Definition: MsWrdParser.cxx:1039
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWPosition::origin
const MWAWVec2f & origin() const
return the frame origin
Definition: MWAWPosition.hxx:130
MsWrdTextStyles
the main class to read/store the text font, paragraph, section stylesread
Definition: MsWrdTextStyles.hxx:66
MWAWTextListener.hxx
MsWrdParserInternal
Internal: the structures of a MsWrdParser.
Definition: MsWrdParser.cxx:58
MsWrdParser
the main class to read a Microsoft Word file
Definition: MsWrdParser.hxx:97
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
MsWrdParser::readObject
bool readObject(MsWrdParserInternal::Object &obj)
read an object
Definition: MsWrdParser.cxx:1584
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MsWrdParser::MsWrdText
friend class MsWrdText
Definition: MsWrdParser.hxx:99
MsWrdParser::send
void send(int id, libmwaw::SubDocumentType type)
try to send a footnote, a field to the textParser
Definition: MsWrdParser.cxx:465
MsWrdParser::sendPicture
void sendPicture(long fPos, int cPos, MWAWPosition::AnchorTo anchor=MWAWPosition::Char)
send a picture
Definition: MsWrdParser.cxx:1871
MsWrdParser::sendSimpleTextZone
void sendSimpleTextZone(MWAWListenerPtr &listener, MWAWEntry const &entry)
try to send a simple text zone(ie. a comment)
Definition: MsWrdParser.cxx:414
MsWrdParserInternal::Picture::Zone::Zone
Zone()
Definition: MsWrdParser.cxx:161
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
MsWrdParserInternal::Picture::Picture
Picture()
Definition: MsWrdParser.cxx:138
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MWAWPosition::YTop
@ YTop
Definition: MWAWPosition.hxx:57
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
MsWrdParserInternal::Object::m_flags
int m_flags[2]
some flags
Definition: MsWrdParser.cxx:125
MWAWPosition::Frame
@ Frame
Definition: MWAWPosition.hxx:51
MsWrdParser::readPrinter
bool readPrinter(MsWrdEntry &entry)
read the printer name
Definition: MsWrdParser.cxx:1228
MWAWNote::FootNote
@ FootNote
Definition: libmwaw_internal.hxx:447
MWAWPosition::XLeft
@ XLeft
Definition: MWAWPosition.hxx:55
libmwaw
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:50
MsWrdParser::readHeaderEndV3
bool readHeaderEndV3()
finish reading the header (v3)
Definition: MsWrdParser.cxx:898
MWAWInputStream.hxx
MsWrdEntry::~MsWrdEntry
~MsWrdEntry() final
destructor
Definition: MsWrdParser.cxx:321
MsWrdEntry::m_pictType
int m_pictType
the picture identificator
Definition: MsWrdParser.hxx:89
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:56
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
MsWrdParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWrdParser.cxx:514
MsWrdParserInternal::Picture::Zone
Definition: MsWrdParser.cxx:160
MWAWBox2< int >
MWAWNote::EndNote
@ EndNote
Definition: libmwaw_internal.hxx:447
MsWrdEntry
the entry of MsWrdParser
Definition: MsWrdParser.hxx:63
libmwaw::DOC_NONE
@ DOC_NONE
Definition: libmwaw_internal.hxx:188
MsWrdParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: MsWrdParser.cxx:218
MWAWPageSpan::LANDSCAPE
@ LANDSCAPE
Definition: MWAWPageSpan.hxx:102
MsWrdParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: MsWrdParser.cxx:218
MsWrdParserInternal::Object::m_pos
MWAWEntry m_pos
the object entry
Definition: MsWrdParser.cxx:110
MsWrdEntry::MsWrdEntry
MsWrdEntry()
constructor
Definition: MsWrdParser.hxx:65
MsWrdParser::readPicture
bool readPicture(MsWrdEntry &entry)
read a picture data
Definition: MsWrdParser.cxx:1795
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
MsWrdParserInternal::Object::m_ids
int m_ids[2]
some others id?
Definition: MsWrdParser.cxx:119
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
MsWrdText.hxx
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:98
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
MsWrdParser::readZone17
bool readZone17(MsWrdEntry &entry)
read the zone 17( some bdbox + text position ?)
Definition: MsWrdParser.cxx:1151
MsWrdParser::createZones
bool createZones()
finds the different zones
Definition: MsWrdParser.cxx:566
MsWrdParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MsWrdParser.cxx:281