MsWks4Text.hxx Source File documentation

MsWks4Text.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 #ifndef MS_WKS4_TEXT
35 # define MS_WKS4_TEXT
36
37 #include <vector>
38
39 #include "MWAWEntry.hxx"
40 #include "MWAWDebug.hxx"
41 #include "MWAWInputStream.hxx"
42
43 namespace MsWks4TextInternal
44 {
45 struct Font;
46 struct Paragraph;
47 struct State;
48 }
49
50 class MsWksDocument;
51 class MsWks4Zone;
52
64 class MsWks4Text
65 {
66 friend class MsWks4Zone;
67 protected:
68 struct DataFOD;
75 typedef bool (MsWks4Text::* FDPParser)(MWAWInputStreamPtr &input, long endPos,
76 int &id, std::string &mess);
77 public:
79 explicit MsWks4Text(MsWksDocument &document);
80
82 ~MsWks4Text();
83
85 void setDefault(MWAWFont &font);
86
88 int numPages() const;
89
91 void flushExtra(MWAWInputStreamPtr /*input*/) {}
92
93 protected:
97 bool readStructures(MWAWInputStreamPtr input, bool mainOle);
98
100 bool readText(MWAWInputStreamPtr input, MWAWEntry const &entry, bool mainOle);
101
103 bool readFootNote(MWAWInputStreamPtr input, int id);
104
105 //----------------------------------------
106 // PLC parsing, setting
107 //----------------------------------------
115 typedef bool (MsWks4Text::* DataParser)
116 (MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess);
117
125 bool readPLC(MWAWInputStreamPtr input, MWAWEntry const &entry,
126 std::vector<long> &textPtrs, std::vector<long> &listValues,
127 DataParser parser = &MsWks4Text::defDataParser);
135 bool readSimplePLC(MWAWInputStreamPtr &input, MWAWEntry const &entry,
136 std::vector<long> &textPtrs,
137 std::vector<long> &listValues)
138 {
139 return readPLC(input, entry, textPtrs, listValues);
140 }
141
143 bool defDataParser(MWAWInputStreamPtr input, long endPos,
144 long bot, long eot, int id, std::string &mess);
145
147 bool readFontNames(MWAWInputStreamPtr input, MWAWEntry const &entry);
148
150 bool readFont(MWAWInputStreamPtr &input, long endPos,
151 int &id, std::string &mess);
152
154 void setProperty(MsWks4TextInternal::Paragraph const &tabs);
156 bool readParagraph(MWAWInputStreamPtr &input, long endPos,
157 int &id, std::string &mess);
158
160 bool ftntDataParser(MWAWInputStreamPtr input, long endPos,
161 long bot, long eot, int id, std::string &mess);
162
164 bool eobjDataParser(MWAWInputStreamPtr input, long endPos,
165 long bot, long eot, int id, std::string &mess);
166
170 bool toknDataParser(MWAWInputStreamPtr input, long endPos,
171 long bot, long eot, int id, std::string &mess);
172
176 bool pgdDataParser(MWAWInputStreamPtr input, long endPos,
177 long, long, int id, std::string &mess);
178
180 void flushNote(int noteId);
181
182 protected:
185 std::vector<DataFOD> mergeSortedLists
186 (std::vector<DataFOD> const &lst1, std::vector<DataFOD> const &lst2) const;
187
190 bool readFDP(MWAWInputStreamPtr &input, MWAWEntry const &entry,
191 std::vector<DataFOD> &fods, FDPParser parser);
192
199 bool findFDPStructures(MWAWInputStreamPtr &input, int which);
207 bool findFDPStructuresByHand(MWAWInputStreamPtr &input, int which);
208
209 protected:
211 struct DataFOD {
218 enum Type { ATTR_TEXT, ATTR_PARAG, ATTR_PLC, ATTR_UNKN };
219
221 DataFOD()
222 : m_type(ATTR_UNKN)
223 , m_pos(-1)
224 , m_defPos(0)
225 , m_id(-1)
226 {
227 }
228
230 Type m_type;
232 long m_pos;
234 long m_defPos;
236 int m_id;
237 };
238
239 private:
240 MsWks4Text(MsWks4Text const &orig) = delete;
241 MsWks4Text &operator=(MsWks4Text const &orig) = delete;
242 protected:
244 MWAWParser *m_mainParser;
246 MWAWParserStatePtr m_parserState;
247
249 MsWksDocument &m_document;
250
252 MWAWEntry m_textPositions;
253
255 mutable std::shared_ptr<MsWks4TextInternal::State> m_state;
256
258 std::vector<DataFOD> m_FODsList;
259
261 std::vector<MWAWEntry const *> m_FDPCs;
263 std::vector<MWAWEntry const *> m_FDPPs;
264 };
265
266 #endif
267 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWParagraph::Fixed
@ Fixed
Definition: MWAWParagraph.hxx:94
MsWks4TextInternal::FontName::m_id
int m_id
the font id
Definition: MsWks4Text.cxx:184
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
MWAWField::Time
@ Time
Definition: libmwaw_internal.hxx:401
MWAWParagraph::m_justify
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MsWks4Text::m_textPositions
MWAWEntry m_textPositions
an entry which corresponds to the complete text zone
Definition: MsWks4Text.hxx:252
MWAWTabStop::LEFT
@ LEFT
Definition: MWAWParagraph.hxx:48
MsWks4TextInternal::Font::m_font
MWAWFont m_font
the font
Definition: MsWks4Text.cxx:218
MsWks4Text::FDPParser
bool(MsWks4Text::* FDPParser)(MWAWInputStreamPtr &input, long endPos, int &id, std::string &mess)
callback when a new attribute is found in an FDPP/FDPC entry
Definition: MsWks4Text.hxx:75
MsWks4PLCInternal::PLC::Position
Position
the way to define the text positions
Definition: MsWks4Text.cxx:97
MWAWFont::set
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
MsWksDocument
the main class to read/store generic data of a MsWorks document v1-v3
Definition: MsWksDocument.hxx:68
MsWks4Text
The class which parses text zones in a mac MS Works document v4.
Definition: MsWks4Text.hxx:64
MsWks4Text::setProperty
void setProperty(MsWks4TextInternal::Paragraph const &tabs)
sends a paragraph properties to the listener
Definition: MsWks4Text.cxx:1392
MsWks4Text::MsWks4Text
MsWks4Text(MsWksDocument &document)
constructor
Definition: MsWks4Text.cxx:529
MsWks4TextInternal::Object
Internal: class to store field definition: TOKN entry.
Definition: MsWks4Text.cxx:385
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MsWks4Text::setDefault
void setDefault(MWAWFont &font)
sets the default font
Definition: MsWks4Text.cxx:1201
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MsWks4TextInternal::State::m_defFont
MWAWFont m_defFont
the default font
Definition: MsWks4Text.cxx:488
MsWks4Text::m_FDPPs
std::vector< MWAWEntry const * > m_FDPPs
the list of FDPP entries
Definition: MsWks4Text.hxx:263
MsWks4TextInternal::Token::Token
Token()
constructor
Definition: MsWks4Text.cxx:328
MsWks4Text::pgdDataParser
bool pgdDataParser(MWAWInputStreamPtr input, long endPos, long, long, int id, std::string &mess)
parses the pagebreak positin entries : PGD
Definition: MsWks4Text.cxx:1688
MsWks4Text::mergeSortedLists
std::vector< DataFOD > mergeSortedLists(std::vector< DataFOD > const &lst1, std::vector< DataFOD > const &lst2) const
function which takes two sorted list of attribute (by text position).
Definition: MsWks4Text.cxx:2055
MsWks4Text::readSimplePLC
bool readSimplePLC(MWAWInputStreamPtr &input, MWAWEntry const &entry, std::vector< long > &textPtrs, std::vector< long > &listValues)
reads a PLC (Pointer List Composant ?) in zone entry
Definition: MsWks4Text.hxx:135
MsWks4Text::DataFOD::ATTR_PARAG
@ ATTR_PARAG
Definition: MsWks4Text.hxx:218
MsWks4TextInternal::operator<<
std::ostream & operator<<(std::ostream &o, FontName const &ft)
Definition: MsWks4Text.cxx:189
MsWks4Text::readStructures
bool readStructures(MWAWInputStreamPtr input, bool mainOle)
finds and parses all structures which correspond to the text
Definition: MsWks4Text.cxx:572
MWAWParagraph::m_tabs
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
MsWks4Text::DataFOD::ATTR_UNKN
@ ATTR_UNKN
Definition: MsWks4Text.hxx:218
MsWks4TextInternal::FontName::m_name
std::string m_name
the font name
Definition: MsWks4Text.cxx:182
MsWks4Text::m_FODsList
std::vector< DataFOD > m_FODsList
the list of a FOD
Definition: MsWks4Text.hxx:258
MsWks4TextInternal::Object::m_error
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:406
MsWks4TextInternal::State::m_fontNames
std::vector< FontName > m_fontNames
the list of fonts names
Definition: MsWks4Text.cxx:491
MsWks4TextInternal::Font::DTTUnk
@ DTTUnk
Definition: MsWks4Text.cxx:200
MsWks4PLCInternal::PLC::m_pos
Position m_pos
the way to define the text positions
Definition: MsWks4Text.cxx:113
MsWks4PLCInternal
Internal and low level: the structures of a MsWks4Text used to parse PLC.
Definition: MsWks4Text.cxx:86
MWAWFont::Script::sub100
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
MWAWFont::id
int id() const
returns the font id
Definition: MWAWFont.hxx:259
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MsWks4PLCInternal::KnownPLC::createMapping
void createMapping()
creates the map of known PLC
Definition: MsWks4Text.cxx:138
MWAWParagraph::m_listLevelIndex
MWAWVariable< int > m_listLevelIndex
the actual level index
Definition: MWAWParagraph.hxx:174
MWAWFont::setColor
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
MWAWTabStop::CENTER
@ CENTER
Definition: MWAWParagraph.hxx:48
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
MsWks4TextInternal::FontName::FontName
FontName()
constructor
Definition: MsWks4Text.cxx:171
MWAWEntry.hxx
MsWks4Text::ftntDataParser
bool ftntDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the footnote position : FTNT
Definition: MsWks4Text.cxx:1645
MsWks4TextInternal::Token::m_unknown
int m_unknown
unknown field
Definition: MsWks4Text.cxx:342
MsWks4Text::toknDataParser
bool toknDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the field properties entries : TOKN.
Definition: MsWks4Text.cxx:1714
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
MWAWField::Type
Type
Defines some basic type for field.
Definition: libmwaw_internal.hxx:401
MsWks4TextInternal::Font::Page
@ Page
Definition: MsWks4Text.cxx:200
MsWks4TextInternal::DataPLC::m_value
long m_value
a potential value
Definition: MsWks4Text.cxx:436
MsWks4TextInternal::FontName::m_unknown
int m_unknown
unknown
Definition: MsWks4Text.cxx:186
MsWks4TextInternal::Ftnt::m_id
int m_id
the footnote number
Definition: MsWks4Text.cxx:301
MsWks4TextInternal::State::m_main
bool m_main
true if we parse the main block
Definition: MsWks4Text.cxx:515
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:84
MsWks4TextInternal::DataPLC::m_type
PLCType m_type
the type
Definition: MsWks4Text.cxx:434
MWAWParagraph::m_spacingsInterlineType
MWAWVariable< LineSpacingType > m_spacingsInterlineType
the interline type: fixed, atLeast, ...
Definition: MWAWParagraph.hxx:160
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
MsWks4TextInternal::State::setParse
void setParse(bool main)
sets main to true if we parse the main block
Definition: MsWks4Text.cxx:479
MsWks4PLCInternal::PLC::P_ABS
@ P_ABS
Definition: MsWks4Text.cxx:97
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWFont::setDeltaLetterSpacing
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
MsWks4TextInternal::State::m_pgdList
std::vector< long > m_pgdList
a list of all page breaks
Definition: MsWks4Text.cxx:498
MWAWParagraph::m_margins
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
MsWks4Text::DataFOD::Type
Type
different type which can be associated to a text position
Definition: MsWks4Text.hxx:218
MWAWEntry::type
const std::string & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
MWAWTabStop::DECIMAL
@ DECIMAL
Definition: MWAWParagraph.hxx:48
MWAWFont::Script::super100
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
MWAWFont::embossBit
@ embossBit
Definition: MWAWFont.hxx:190
MWAWField::PageCount
@ PageCount
Definition: libmwaw_internal.hxx:401
MsWks4PLCInternal::PLC::P_UNKNOWN
@ P_UNKNOWN
Definition: MsWks4Text.cxx:97
MWAWEntry::hasType
bool hasType(std::string const &typ) const
returns true if the type entry == type
Definition: MWAWEntry.hxx:142
MWAWField::Date
@ Date
Definition: libmwaw_internal.hxx:401
MsWks4TextInternal::State::parseMain
bool parseMain() const
returns true if we parse the main block
Definition: MsWks4Text.cxx:474
MsWks4TextInternal::Ftnt::m_error
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:304
MWAWField::BookmarkEnd
@ BookmarkEnd
Definition: libmwaw_internal.hxx:401
MsWks4Text::DataFOD::DataFOD
DataFOD()
the constructor
Definition: MsWks4Text.hxx:221
MsWks4Text::DataFOD::m_id
int m_id
an identificator (which must be unique by category)
Definition: MsWks4Text.hxx:236
MsWks4PLCInternal::PLC::Type
Type
the type of the content
Definition: MsWks4Text.cxx:102
MsWks4TextInternal::Ftnt::Ftnt
Ftnt()
constructor
Definition: MsWks4Text.cxx:286
MsWks4TextInternal::Font::Eobj
@ Eobj
Definition: MsWks4Text.cxx:200
MWAWParagraph::AtLeast
@ AtLeast
Definition: MWAWParagraph.hxx:94
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MsWks4PLCInternal::PLC::P_REL
@ P_REL
Definition: MsWks4Text.cxx:97
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
MWAWEntry::setType
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
MsWks4TextInternal::EOBJ
@ EOBJ
Definition: MsWks4Text.cxx:79
MWAWParagraph.hxx
MsWks4PLCInternal::PLC::T_UNKNOWN
@ T_UNKNOWN
Definition: MsWks4Text.cxx:102
MsWks4Text::~MsWks4Text
~MsWks4Text()
destructor
Definition: MsWks4Text.cxx:543
MsWks4TextInternal::Font::m_error
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:223
MsWks4Text::findFDPStructuresByHand
bool findFDPStructuresByHand(MWAWInputStreamPtr &input, int which)
Fills the vector of (FDPCs/FDPPs) paragraph/characters strutures, a function to call when the normal ...
Definition: MsWks4Text.cxx:1877
MWAWField::Database
@ Database
Definition: libmwaw_internal.hxx:401
MsWks4Text::defDataParser
bool defDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
the default parser (does nothing)
Definition: MsWks4Text.cxx:1106
libmwaw_internal.hxx
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
MsWks4TextInternal::Token::m_type
MWAWField::Type m_type
the type
Definition: MsWks4Text.cxx:338
MsWksDocument::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MsWksDocument.hxx:132
MsWks4Zone.hxx
MsWks4TextInternal::Paragraph::operator<<
friend std::ostream & operator<<(std::ostream &o, Paragraph const &ind)
operator <<
Definition: MsWks4Text.cxx:272
MsWks4Text::readParagraph
bool readParagraph(MWAWInputStreamPtr &input, long endPos, int &id, std::string &mess)
reads a paragraph properties
Definition: MsWks4Text.cxx:1400
MsWksDocument::getEntryMap
std::multimap< std::string, MWAWEntry > & getEntryMap()
returns the document entry map of a v4 document
Definition: MsWksDocument.cxx:373
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MsWks4TextInternal::Token::m_error
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:344
MsWks4TextInternal::Token::m_textLength
int m_textLength
the length of the text corresponding to the token
Definition: MsWks4Text.cxx:340
MsWks4PLCInternal::PLC::PLCType
enum MsWks4TextInternal::PLCType PLCType
the PLC types
Definition: MsWks4Text.cxx:91
MsWks4TextInternal::State::m_knownPLC
MsWks4PLCInternal::KnownPLC m_knownPLC
the known plc
Definition: MsWks4Text.cxx:512
MsWksDocument::sendFootnote
void sendFootnote(int id)
tries to send a footnote
Definition: MsWksDocument.cxx:503
MsWks4TextInternal::State::State
State()
constructor
Definition: MsWks4Text.cxx:457
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
MsWks4TextInternal::Font::FieldType
FieldType
the field type: pagenumber, note, DTT=date/time/type
Definition: MsWks4Text.cxx:200
MsWks4TextInternal::State
Internal: the state of a MsWks4Text.
Definition: MsWks4Text.cxx:455
MsWks4TextInternal::Object::Object
Object()
constructor
Definition: MsWks4Text.cxx:387
MsWks4PLCInternal::KnownPLC::get
PLC get(std::string const &name)
returns the PLC corresponding to a name
Definition: MsWks4Text.cxx:129
MsWks4Text::DataFOD::ATTR_TEXT
@ ATTR_TEXT
Definition: MsWks4Text.hxx:218
MWAWField::None
@ None
Definition: libmwaw_internal.hxx:401
MWAWVec2< int >
MsWks4Zone
The class which parses the main zones of a mac MS Works document v4.
Definition: MsWks4Zone.hxx:73
MsWks4TextInternal::Font::operator<<
friend std::ostream & operator<<(std::ostream &o, Font const &ft)
operator <<
Definition: MsWks4Text.cxx:226
MsWks4TextInternal::Ftnt::m_type
int m_type
the note type
Definition: MsWks4Text.cxx:299
MsWks4TextInternal::State::m_eobjMap
std::map< long, Object > m_eobjMap
mapping text offset to object
Definition: MsWks4Text.cxx:506
libmwaw::ParseException
Definition: libmwaw_internal.hxx:143
MWAWDebug.hxx
MsWks4TextInternal::Paragraph::operator=
Paragraph & operator=(Paragraph const &)=default
MWAWFont::getDebugString
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MsWks4TextInternal::Object::m_dim
MWAWVec2i m_dim
the dimension
Definition: MsWks4Text.cxx:402
MsWks4TextInternal::DataPLC::DataPLC
DataPLC()
constructor
Definition: MsWks4Text.cxx:422
MsWks4TextInternal::FontName::operator<<
friend std::ostream & operator<<(std::ostream &o, FontName const &ft)
operator<<
Definition: MsWks4Text.cxx:189
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MsWks4Text::m_mainParser
MWAWParser * m_mainParser
the main parser;
Definition: MsWks4Text.hxx:244
MWAWField::BookmarkStart
@ BookmarkStart
Definition: libmwaw_internal.hxx:401
MsWks4TextInternal::Paragraph::~Paragraph
~Paragraph() final
destructor
Definition: MsWks4Text.cxx:279
MsWks4PLCInternal::PLC::T_CST
@ T_CST
Definition: MsWks4Text.cxx:102
MsWks4TextInternal::Paragraph::m_pageBreak
bool m_pageBreak
flag to know if there is a pagebreak before the paragraph
Definition: MsWks4Text.cxx:269
MsWks4Text::DataFOD::m_type
Type m_type
the type of the attribute
Definition: MsWks4Text.hxx:230
MsWks4TextInternal::Object::m_type
int m_type
the object type
Definition: MsWks4Text.cxx:398
MsWks4TextInternal::Ftnt::m_end
long m_end
the last offset in the text
Definition: MsWks4Text.cxx:302
MsWks4PLCInternal::PLC::P_INCR
@ P_INCR
Definition: MsWks4Text.cxx:97
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
MsWks4TextInternal::Ftnt::m_begin
long m_begin
the first offset in the text
Definition: MsWks4Text.cxx:302
MsWks4TextInternal::State::m_paragraphList
std::vector< Paragraph > m_paragraphList
a list of all paragraph properties
Definition: MsWks4Text.cxx:496
MsWks4Text::flushNote
void flushNote(int noteId)
sends to the listener the text which corresponds to noteId
MsWks4Text::m_FDPCs
std::vector< MWAWEntry const * > m_FDPCs
the list of FDPC entries
Definition: MsWks4Text.hxx:261
MsWks4Text::eobjDataParser
bool eobjDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the object position : EOBJ
Definition: MsWks4Text.cxx:1613
MsWks4TextInternal::Unknown
@ Unknown
Definition: MsWks4Text.cxx:79
MWAWField
a field
Definition: libmwaw_internal.hxx:399
MWAWField::PageNumber
@ PageNumber
Definition: libmwaw_internal.hxx:401
MWAWParagraph::JustificationLeft
@ JustificationLeft
Definition: MWAWParagraph.hxx:90
MsWks4TextInternal::State::m_ftntList
std::vector< Ftnt > m_ftntList
list of footnotes
Definition: MsWks4Text.cxx:501
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MsWks4TextInternal::PLCType
PLCType
different types
Definition: MsWks4Text.cxx:79
MsWks4TextInternal::Font::None
@ None
Definition: MsWks4Text.cxx:200
MsWks4Text::readFontNames
bool readFontNames(MWAWInputStreamPtr input, MWAWEntry const &entry)
reads the font names entry : FONT
Definition: MsWks4Text.cxx:1130
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWFont::setSize
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWListLevel::m_bullet
librevenge::RVNGString m_bullet
the bullet if we have an bullet level
Definition: MWAWList.hxx:114
MsWks4TextInternal::Font::Font
Font(MWAWFont const &ft)
copy constructor
Definition: MsWks4Text.cxx:209
MsWks4TextInternal::PGD
@ PGD
Definition: MsWks4Text.cxx:79
MsWks4TextInternal::Object::m_id
int m_id
the local id
Definition: MsWks4Text.cxx:400
MWAWParser
virtual class which defines the ancestor of all main zone parser
Definition: MWAWParser.hxx:99
MsWks4Text::findFDPStructures
bool findFDPStructures(MWAWInputStreamPtr &input, int which)
Fills the vector of (FDPCs/FDPPs) paragraph/characters strutures.
Definition: MsWks4Text.cxx:1811
MsWks4TextInternal::State::m_fontList
std::vector< Font > m_fontList
a list of all font properties
Definition: MsWks4Text.cxx:494
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MsWks4Text::readFont
bool readFont(MWAWInputStreamPtr &input, long endPos, int &id, std::string &mess)
reads a font properties
Definition: MsWks4Text.cxx:1207
MsWksDocument::sendRBIL
void sendRBIL(int id, MWAWVec2i const &sz)
send a rbil zone
Definition: MsWksDocument.cxx:530
MsWksDocument.hxx
MsWks4TextInternal::FTNT
@ FTNT
Definition: MsWks4Text.cxx:79
MsWks4Text::readFootNote
bool readFootNote(MWAWInputStreamPtr input, int id)
sends the text which corresponds to footnote id to the listner
Definition: MsWks4Text.cxx:678
MsWks4Text::DataFOD
structure which retrieves data information which correspond to a text position
Definition: MsWks4Text.hxx:211
MWAWListLevel::BULLET
@ BULLET
Definition: MWAWList.hxx:46
MsWks4TextInternal::Font::DTT
@ DTT
Definition: MsWks4Text.cxx:200
MsWks4TextInternal::Font::m_fieldType
FieldType m_fieldType
the field type
Definition: MsWks4Text.cxx:220
MsWks4TextInternal::Object::m_fileId
long m_fileId
the file id
Definition: MsWks4Text.cxx:404
MsWks4TextInternal
Internal: the structures of a MsWks4Text.
Definition: MsWks4Text.cxx:70
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MsWks4TextInternal::DataPLC
Internal: class to store the PLC: Pointer List Content ?
Definition: MsWks4Text.cxx:420
MsWks4TextInternal::Paragraph
Internal: class to store a paragraph properties.
Definition: MsWks4Text.cxx:254
MWAWListLevel::m_labelWidth
double m_labelWidth
the minimum label width
Definition: MWAWList.hxx:105
MsWks4PLCInternal::PLC::T_STRUCT
@ T_STRUCT
Definition: MsWks4Text.cxx:102
MsWks4Text::operator=
MsWks4Text & operator=(MsWks4Text const &orig)=delete
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
MsWks4Text::flushExtra
void flushExtra(MWAWInputStreamPtr)
sends the data which have not been sent: actually do nothing
Definition: MsWks4Text.hxx:91
MWAWListLevel
small structure to keep information about a list level
Definition: MWAWList.hxx:44
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWListLevel::m_type
Type m_type
the type of the level
Definition: MWAWList.hxx:101
MsWks4TextInternal::Paragraph::Paragraph
Paragraph()
constructor
Definition: MsWks4Text.cxx:256
MsWks4Text::readPLC
bool readPLC(MWAWInputStreamPtr input, MWAWEntry const &entry, std::vector< long > &textPtrs, std::vector< long > &listValues, DataParser parser=&MsWks4Text::defDataParser)
reads a PLC (Pointer List Composant ?) in zone entry
Definition: MsWks4Text.cxx:918
MsWks4Text.hxx
MWAWListener.hxx
MsWks4TextInternal::FontName
Internal: class to store a font name: name with sysid.
Definition: MsWks4Text.cxx:167
MsWks4Text::numPages
int numPages() const
returns the number of pages
Definition: MsWks4Text.cxx:550
MsWks4TextInternal::Font::Font
Font(int fId=3, int size=12)
constructor: default value Geneva:12
Definition: MsWks4Text.cxx:202
MsWks4TextInternal::DataPLC::m_error
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:438
MsWks4PLCInternal::PLC
Internal and low level: the PLC different types and their structures.
Definition: MsWks4Text.cxx:89
MsWks4Text::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: MsWks4Text.hxx:246
MsWks4TextInternal::DataPLC::m_name
std::string m_name
the entry name
Definition: MsWks4Text.cxx:432
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
MsWks4TextInternal::BTE
@ BTE
Definition: MsWks4Text.cxx:79
MsWks4TextInternal::State::m_ftntMap
std::map< long, Ftnt > m_ftntMap
mapping text offset to footnote
Definition: MsWks4Text.cxx:503
MsWks4TextInternal::State::m_plcList
std::vector< DataPLC > m_plcList
list of all PLCs
Definition: MsWks4Text.cxx:509
MsWks4Text::readText
bool readText(MWAWInputStreamPtr input, MWAWEntry const &entry, bool mainOle)
reads a text section and send it to the listener
Definition: MsWks4Text.cxx:713
MWAWInputStream.hxx
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
MsWks4PLCInternal::PLC::m_contentType
Type m_contentType
the type of the content
Definition: MsWks4Text.cxx:115
MWAWFont.hxx
MsWks4TextInternal::TOKEN
@ TOKEN
Definition: MsWks4Text.cxx:79
MWAWTabStop::RIGHT
@ RIGHT
Definition: MWAWParagraph.hxx:48
MsWks4TextInternal::State::m_paragraph
Paragraph m_paragraph
the actual paragraph
Definition: MsWks4Text.cxx:485
MsWks4Text::DataFOD::m_pos
long m_pos
the offset position of the text modified by this attribute
Definition: MsWks4Text.hxx:232
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:43
MsWks4TextInternal::Token
Internal: class to store field definition: TOKN entry.
Definition: MsWks4Text.cxx:326
MsWksDocument::newPage
void newPage(int page, bool softBreak=false)
tries to create a new page
Definition: MsWksDocument.cxx:492
MWAWParagraph::m_extra
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
MWAWField::Title
@ Title
Definition: libmwaw_internal.hxx:401
MsWks4PLCInternal::KnownPLC
a map of known plc
Definition: MsWks4Text.cxx:119
MsWks4Text::m_state
std::shared_ptr< MsWks4TextInternal::State > m_state
the internal state
Definition: MsWks4Text.hxx:255
MWAWParagraph::m_listId
MWAWVariable< int > m_listId
the list id (if know )
Definition: MWAWParagraph.hxx:176
MWAWEntry::hasName
bool hasName(std::string const &nam) const
checks if the entry name is equal to name
Definition: MWAWEntry.hxx:158
MsWks4PLCInternal::KnownPLC::KnownPLC
KnownPLC()
creates the mapping
Definition: MsWks4Text.cxx:122
MsWks4PLCInternal::PLC::PLC
PLC(PLCType w=MsWks4TextInternal::Unknown, Position p=P_UNKNOWN, Type t=T_UNKNOWN)
constructor
Definition: MsWks4Text.cxx:104
MsWks4PLCInternal::KnownPLC::m_knowns
std::map< std::string, PLC > m_knowns
map name -> known PLC
Definition: MsWks4Text.cxx:155
MsWks4PLCInternal::PLC::m_type
PLCType m_type
PLC type.
Definition: MsWks4Text.cxx:111
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWEntry::name
const std::string & name() const
name of the entry
Definition: MWAWEntry.hxx:153
MsWks4TextInternal::Font::Note
@ Note
Definition: MsWks4Text.cxx:200
MWAWFont::setUnderlineStyle
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
MsWks4Text::m_document
MsWksDocument & m_document
the main document
Definition: MsWks4Text.hxx:249
MsWks4Text::readFDP
bool readFDP(MWAWInputStreamPtr &input, MWAWEntry const &entry, std::vector< DataFOD > &fods, FDPParser parser)
parses a FDPP or a FDPC entry (which contains a list of ATTR_TEXT/ATTR_PARAG with their definition ) ...
Definition: MsWks4Text.cxx:1899
MsWks4TextInternal::Font
Internal: class to store a font properties.
Definition: MsWks4Text.cxx:198
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
MsWks4TextInternal::Ftnt
Internal: class to store footnote definition.
Definition: MsWks4Text.cxx:284
MsWks4Text::DataParser
bool(MsWks4Text::* DataParser)(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
definition of the plc data parser (low level)
Definition: MsWks4Text.hxx:116
MsWks4Text::DataFOD::m_defPos
long m_defPos
the offset position of the definition of the attribute in the file
Definition: MsWks4Text.hxx:234
MsWks4Text::DataFOD::ATTR_PLC
@ ATTR_PLC
Definition: MsWks4Text.hxx:218