MsWrdText.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 Microsoft Word text document
36  *
37  */
38 #ifndef MS_WRD_MWAW_TEXT
39 # define MS_WRD_MWAW_TEXT
40 
41 #include <map>
42 #include <string>
43 #include <vector>
44 
45 #include "libmwaw_internal.hxx"
46 
47 #include "MWAWEntry.hxx"
48 
49 #include "MWAWDebug.hxx"
50 
51 #include "MsWrdTextStyles.hxx"
52 
53 namespace MsWrdTextInternal
54 {
55 struct State;
56 struct Table;
57 }
58 
59 struct MsWrdEntry;
60 class MsWrdParser;
61 class MsWrdTextStyles;
62 
64 class MsWrdText
65 {
66  friend class MsWrdParser;
67  friend class MsWrdTextStyles;
68 public:
70  struct PLC {
72  PLC(Type type, int id=0)
73  : m_type(type)
74  , m_id(id)
75  , m_extra("")
76  {
77  }
79  friend std::ostream &operator<<(std::ostream &o, PLC const &plc);
81  struct ltstr {
82  bool operator()(PLC const &s1, PLC const &s2) const
83  {
84  if (s1.m_type != s2.m_type)
85  return int(s1.m_type) < int(s2.m_type);
86  if (s1.m_id != s2.m_id)
87  return s1.m_id < s2.m_id;
88  return false;
89  }
90  };
94  int m_id;
96  std::string m_extra;
97  };
98 public:
100  explicit MsWrdText(MsWrdParser &parser);
102  virtual ~MsWrdText();
103 
105  int version() const;
106 
108  int numPages() const;
109 
111  MWAWEntry getHeader() const;
112 
114  MWAWEntry getFooter() const;
115 protected:
117  std::shared_ptr<MWAWParserState> &getParserState()
118  {
119  return m_parserState;
120  }
121 
123  bool sendMainText();
124 
126  bool sendText(MWAWEntry const &textEntry, bool mainZone, bool tableCell=false);
128  bool sendSection(int sectionId);
130  bool readHeaderTextLength();
131 
133  bool createZones(long bot);
134 
136  bool readTextStruct(MsWrdEntry &entry);
137 
139  bool readPageBreak(MsWrdEntry &entry);
140 
142  bool readParagraphInfo(MsWrdEntry &entry);
143 
145  bool readFields(MsWrdEntry &entry, std::vector<long> const &fieldPos);
146 
148  bool sendFieldComment(int id);
149 
151  bool readFootnotesPos(MsWrdEntry &entry, std::vector<long> const &noteDef);
152 
154  bool readFootnotesData(MsWrdEntry &entry);
155 
157  bool sendFootnote(int id);
158 
160  bool readFontNames(MsWrdEntry &entry);
161 
163  void flushExtra();
164 
166  bool sendTable(MsWrdTextInternal::Table const &table);
167 
168  // interface with MsWrdTextStyles
169 
171  long getMainTextLength() const;
173  std::multimap<long, MsWrdText::PLC> &getTextPLCMap();
175  std::multimap<long, MsWrdText::PLC> &getFilePLCMap();
176 
177  //
178  // low level
179  //
180 
182  void prepareData();
183 
185  void prepareLines();
187  void convertFilePLCPos();
191  void prepareFontProperties();
192 
194  void prepareTableLimits();
196  bool updateTableBeginnningAt(long cPos, long &nextCPos);
197 
199  bool readLongZone(MsWrdEntry &entry, int sz, std::vector<long> &list);
200 
201 private:
202  MsWrdText(MsWrdText const &orig) = delete;
203  MsWrdText &operator=(MsWrdText const &orig) = delete;
204 
205 protected:
206  //
207  // data
208  //
211 
213  std::shared_ptr<MsWrdTextInternal::State> m_state;
214 
216  std::shared_ptr<MsWrdTextStyles> m_stylesManager;
217 
220 };
221 #endif
222 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MsWrdText::PLC::PLC
PLC(Type type, int id=0)
Definition: MsWrdText.hxx:72
MWAWTextListenerPtr
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
MsWrdTextInternal::State::m_bot
long m_bot
the default text begin
Definition: MsWrdText.cxx:411
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MsWrdText::operator=
MsWrdText & operator=(MsWrdText const &orig)=delete
MsWrdTextInternal::Table::m_cells
std::vector< MWAWVariable< MsWrdStruct::Table::Cell > > m_cells
the table cells
Definition: MsWrdText.cxx:312
MsWrdTextInternal::TextStruct::m_paragraphId
int m_paragraphId
the paragraph id
Definition: MsWrdText.cxx:139
MWAWField::Time
@ Time
Definition: libmwaw_internal.hxx:401
MsWrdTextInternal::State::m_lineList
std::vector< Line > m_lineList
the list of lines
Definition: MsWrdText.cxx:427
MsWrdText::sendSection
bool sendSection(int sectionId)
try to open a section
Definition: MsWrdText.cxx:2093
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MsWrdTextInternal::Page::m_paragraphId
int m_paragraphId
the paragraph id
Definition: MsWrdText.cxx:189
MsWrdTextInternal::Footnote::Footnote
Footnote()
constructor
Definition: MsWrdText.cxx:200
MsWrdTextStyles::StyleZone
@ StyleZone
Definition: MsWrdTextStyles.hxx:70
MsWrdTextInternal::Line::Type
Type
an enum used to differentiate line and cell
Definition: MsWrdText.cxx:275
MsWrdText::getParserState
std::shared_ptr< MWAWParserState > & getParserState()
returns the parser state
Definition: MsWrdText.hxx:117
MsWrdText::PLC::FootnoteDef
@ FootnoteDef
Definition: MsWrdText.hxx:71
MsWrdText::PLC::ParagraphInfo
@ ParagraphInfo
Definition: MsWrdText.hxx:71
MsWrdText::m_state
std::shared_ptr< MsWrdTextInternal::State > m_state
the state
Definition: MsWrdText.hxx:213
MsWrdTextInternal::State::m_version
int m_version
the file version
Definition: MsWrdText.cxx:408
MsWrdTextInternal::Line::L_Cell
@ L_Cell
Definition: MsWrdText.cxx:275
MsWrdText::PLC::m_extra
std::string m_extra
some extra data
Definition: MsWrdText.hxx:96
MsWrdTextStyles::TextStructZone
@ TextStructZone
Definition: MsWrdTextStyles.hxx:70
MsWrdStruct::Paragraph
the paragraph structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:312
MsWrdText::flushExtra
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: MsWrdText.cxx:2222
MsWrdTextInternal::Page::operator<<
friend std::ostream & operator<<(std::ostream &o, Page const &page)
operator<<
Definition: MsWrdText.cxx:162
MsWrdText::getTextPLCMap
std::multimap< long, MsWrdText::PLC > & getTextPLCMap()
returns the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:543
MsWrdTextStyles::TextZone
@ TextZone
Definition: MsWrdTextStyles.hxx:70
MsWrdText::sendFootnote
bool sendFootnote(int id)
send a note to a listener
Definition: MsWrdText.cxx:2184
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVariable
a generic variable template: value + flag to know if the variable is set
Definition: libmwaw_internal.hxx:577
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MsWrdTextInternal::Field::m_error
std::string m_error
the errors
Definition: MsWrdText.cxx:251
MsWrdText::numPages
int numPages() const
returns the number of pages
Definition: MsWrdText.cxx:486
MsWrdParser::newPage
void newPage(int number)
adds a new page
Definition: MsWrdParser.cxx:367
MsWrdTextInternal::Table::m_delimiterPos
std::vector< long > m_delimiterPos
the list of the delimiter cPos (ie. end of each cell)
Definition: MsWrdText.cxx:306
MsWrdText::readPageBreak
bool readPageBreak(MsWrdEntry &entry)
read the page limit ?
Definition: MsWrdText.cxx:973
MWAWCell::setPosition
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
MsWrdTextInternal::Field::operator<<
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: MsWrdText.cxx:239
MsWrdTextInternal::State::m_paraInfoList
std::vector< MsWrdStruct::ParagraphInfo > m_paraInfoList
the list of paragraph info modifier
Definition: MsWrdText.cxx:444
MWAWField::m_DTFormat
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:424
MWAWEntry::setExtra
void setExtra(std::string const &s)
sets the extra string
Definition: MWAWEntry.hxx:180
MsWrdStruct::Font::m_font
MWAWVariable< MWAWFont > m_font
the font
Definition: MsWrdStruct.hxx:102
MWAWTable.hxx
libmwaw::BottomBit
@ BottomBit
Definition: libmwaw_internal.hxx:178
MsWrdTextInternal::TextStruct::getParagraphId
int getParagraphId() const
returns the paragraph id ( or -1, if unknown )
Definition: MsWrdText.cxx:119
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
MWAWEntry.hxx
MsWrdStruct::Paragraph::updateParagraphToFinalState
void updateParagraphToFinalState(Paragraph const *style=nullptr)
update the paragraph to obtain the final paragraph
Definition: MsWrdStruct.cxx:1130
MsWrdTextInternal::Line
Internal and low level: a structure to store a line or a cell of a MsWrdText.
Definition: MsWrdText.cxx:273
MWAWFontConverter.hxx
MsWrdTextInternal::Table::m_backgroundColor
MWAWColor m_backgroundColor
the background color
Definition: MsWrdText.cxx:310
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
MsWrdText::sendText
bool sendText(MWAWEntry const &textEntry, bool mainZone, bool tableCell=false)
send a text zone
Definition: MsWrdText.cxx:1883
MsWrdTextInternal::Footnote::m_pos
MWAWEntry m_pos
the footnote data
Definition: MsWrdText.cxx:219
MWAWEntry::type
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
MsWrdText::readFootnotesData
bool readFootnotesData(MsWrdEntry &entry)
read the footnote data
Definition: MsWrdText.cxx:1097
MsWrdText::PLC::Page
@ Page
Definition: MsWrdText.hxx:71
MsWrdParser::sendFieldComment
void sendFieldComment(int id)
try to send a bookmark field id
Definition: MsWrdParser.cxx:452
MsWrdTextStyles.hxx
MsWrdText::sendTable
bool sendTable(MsWrdTextInternal::Table const &table)
try to send a table.
Definition: MsWrdText.cxx:2109
MsWrdParser::m_entryMap
std::multimap< std::string, MsWrdEntry > m_entryMap
the list of entries
Definition: MsWrdParser.hxx:206
MsWrdTextInternal::State::getTextStructId
int getTextStructId(long textPos) const
returns the id of textpos corresponding to a cPos or -1
Definition: MsWrdText.cxx:357
MsWrdText::prepareParagraphProperties
void prepareParagraphProperties()
retrieve the paragraph properties
Definition: MsWrdText.cxx:1429
MsWrdText::readLongZone
bool readLongZone(MsWrdEntry &entry, int sz, std::vector< long > &list)
read a zone which consists in a list of int
Definition: MsWrdText.cxx:1236
MWAWBorder::None
@ None
Definition: libmwaw_internal.hxx:335
MsWrdTextInternal::Line::L_LastLineCell
@ L_LastLineCell
Definition: MsWrdText.cxx:275
MsWrdTextInternal::State::getTotalTextSize
long getTotalTextSize() const
returns the total text size
Definition: MsWrdText.cxx:350
MsWrdTextInternal::Page::m_page
int m_page
the page number
Definition: MsWrdText.cxx:187
MsWrdTextInternal::Table::m_cellPos
std::vector< long > m_cellPos
the list of cPos corresponding to cells limits
Definition: MsWrdText.cxx:304
MWAWCell::setBackgroundColor
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:332
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
MsWrdText::m_mainParser
MsWrdParser * m_mainParser
the main parser;
Definition: MsWrdText.hxx:219
MWAWTable::getColsSize
std::vector< float > const & getColsSize() const
returns the columns size if defined (in point)
Definition: MWAWTable.hxx:128
MsWrdTextInternal::TextStruct
Internal: the entry of MsWrdParser.
Definition: MsWrdText.cxx:73
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MsWrdTextInternal::State::m_tableCellPosSet
std::set< long > m_tableCellPosSet
a set of all begin cell position
Definition: MsWrdText.cxx:440
MsWrdTextInternal::Property::Property
Property()
Definition: MsWrdText.cxx:257
MsWrdTextInternal::State::m_paragraphMap
std::map< long, MsWrdStruct::Paragraph > m_paragraphMap
the final correspondance paragraph zone ( textpos, paragraph)
Definition: MsWrdText.cxx:436
MsWrdTextInternal::Field
Internal: the field of MsWrdParser.
Definition: MsWrdText.cxx:230
MsWrdText::createZones
bool createZones(long bot)
finds the different zones
Definition: MsWrdText.cxx:634
MsWrdTextInternal::State::debugFile2
std::fstream & debugFile2()
internal and low level: defined a second debug file
Definition: MsWrdText.cxx:396
MsWrdTextInternal::Property::m_debugPrint
bool m_debugPrint
a flag to know if we have print data
Definition: MsWrdText.cxx:268
MWAWCell.hxx
Defines MWAWCell (cell content and format)
MWAWTable::TableDimBit
@ TableDimBit
Definition: MWAWTable.hxx:56
MWAWField::Date
@ Date
Definition: libmwaw_internal.hxx:401
MsWrdTextInternal::Footnote
Internal: the footnote.
Definition: MsWrdText.cxx:198
MsWrdTextInternal::Page::m_type
int m_type
the type
Definition: MsWrdText.cxx:185
MsWrdTextInternal::TextStruct::TextStruct
TextStruct()
construtor
Definition: MsWrdText.cxx:75
MsWrdTextInternal::TextStruct::m_styleId
int m_styleId
some identificator(maybe style)
Definition: MsWrdText.cxx:135
MWAWVariable::isSet
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:635
MsWrdTextInternal::State::m_propertyMap
std::map< long, Property > m_propertyMap
the position where we have new data ( textpos -> [ we have done debug printing ])
Definition: MsWrdText.cxx:438
MsWrdTextInternal::Page::m_values
int m_values[4]
some values ( 0, -1, 0, small number )
Definition: MsWrdText.cxx:191
MsWrdText::sendMainText
bool sendMainText()
send a main zone
Definition: MsWrdText.cxx:2175
MsWrdText::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: MsWrdText.hxx:210
MsWrdText::readFields
bool readFields(MsWrdEntry &entry, std::vector< long > const &fieldPos)
read the field data
Definition: MsWrdText.cxx:1144
MsWrdParser.hxx
MsWrdTextInternal::Page::m_error
std::string m_error
the errors
Definition: MsWrdText.cxx:193
MsWrdTextInternal::State::m_footnoteList
std::vector< Footnote > m_footnoteList
the list of footnotes
Definition: MsWrdText.cxx:453
MsWrdTextInternal::State::m_textposList
std::vector< TextStruct > m_textposList
the text positions
Definition: MsWrdText.cxx:419
MsWrdTextInternal::Property::m_fPos
long m_fPos
the character position in the file
Definition: MsWrdText.cxx:264
MsWrdTextInternal::State::State
State()
constructor
Definition: MsWrdText.cxx:322
MsWrdTextInternal::State::m_tableMap
std::map< long, std::shared_ptr< Table > > m_tableMap
the final correspondance table zone ( textpos, font)
Definition: MsWrdText.cxx:442
MsWrdText::getHeader
MWAWEntry getHeader() const
returns the header entry
Definition: MsWrdText.cxx:497
MWAWParagraph.hxx
MsWrdText::PLC::Section
@ Section
Definition: MsWrdText.hxx:71
MsWrdText::readFootnotesPos
bool readFootnotesPos(MsWrdEntry &entry, std::vector< long > const &noteDef)
read the footnote pos in text + val
Definition: MsWrdText.cxx:1036
MsWrdStruct
namespace to store the main structure which appears in a Microsoft Word 3.0-5.0 file
Definition: MsWrdStruct.cxx:42
MsWrdTextInternal::Page::Page
Page()
constructor
Definition: MsWrdText.cxx:152
libmwaw_internal.hxx
MWAWPosition.hxx
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
MsWrdText::PLC::Object
@ Object
Definition: MsWrdText.hxx:71
MsWrdTextInternal::Line::Line
Line()
constructor
Definition: MsWrdText.cxx:277
MsWrdText::getFooter
MWAWEntry getFooter() const
returns the footer entry
Definition: MsWrdText.cxx:520
MsWrdText::PLC
Internal: the plc.
Definition: MsWrdText.hxx:70
MsWrdText::PLC::Type
Type
Definition: MsWrdText.hxx:71
MsWrdStruct::Paragraph::insert
void insert(Paragraph const &para, bool insertModif=true)
insert the new values
Definition: MsWrdStruct.cxx:1157
MsWrdText::readParagraphInfo
bool readParagraphInfo(MsWrdEntry &entry)
read the paragraph height info
Definition: MsWrdText.cxx:907
MsWrdStruct::Paragraph::m_styleId
MWAWVariable< int > m_styleId
the style id (if known)
Definition: MsWrdStruct.hxx:363
MsWrdText::MsWrdTextStyles
friend class MsWrdTextStyles
Definition: MsWrdText.hxx:67
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
MsWrdText::prepareData
void prepareData()
prepare the data to be send
Definition: MsWrdText.cxx:1729
MsWrdTextInternal::Page::m_id
int m_id
the identificator
Definition: MsWrdText.cxx:183
MsWrdStruct::Font
the font structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:57
MsWrdText::PLC::Font
@ Font
Definition: MsWrdText.hxx:71
MsWrdTextInternal::Line::L_Line
@ L_Line
Definition: MsWrdText.cxx:275
MsWrdText::~MsWrdText
virtual ~MsWrdText()
destructor
Definition: MsWrdText.cxx:476
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
MWAWTable
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:52
MsWrdStruct::Font::insert
void insert(Font const &font, Font const *styleFont=nullptr)
insert new font data ( beginning by updating font flags )
Definition: MsWrdStruct.cxx:83
libmwaw::RightBit
@ RightBit
Definition: libmwaw_internal.hxx:178
MWAWVec2< long >
MsWrdTextInternal::TextStruct::CompareFilePos::operator()
bool operator()(TextStruct const *t1, TextStruct const *t2) const
comparaison function
Definition: MsWrdText.cxx:126
MWAWDebug.hxx
MWAWFont::getDebugString
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MsWrdText::readFontNames
bool readFontNames(MsWrdEntry &entry)
read the font names
Definition: MsWrdText.cxx:846
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MsWrdTextInternal::Line::m_cPos
MWAWVec2l m_cPos
the caracter position
Definition: MsWrdText.cxx:285
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MsWrdText::getMainTextLength
long getMainTextLength() const
returns the main text length
Definition: MsWrdText.cxx:492
MsWrdTextInternal::Table
Internal and low level: a structure to store a table of a MsWrdText.
Definition: MsWrdText.cxx:290
MsWrdText::m_stylesManager
std::shared_ptr< MsWrdTextStyles > m_stylesManager
the style manager
Definition: MsWrdText.hxx:216
MsWrdParser::sendFootnote
void sendFootnote(int id)
try to send a footnote id
Definition: MsWrdParser.cxx:443
MsWrdText::prepareTableLimits
void prepareTableLimits()
find the table end position knowing the end cell/pos delimiter
Definition: MsWrdText.cxx:1606
MsWrdText
the main class to read the text part of Microsoft Word file
Definition: MsWrdText.hxx:65
MsWrdTextInternal::Property
Internal: a list of plc.
Definition: MsWrdText.cxx:256
MsWrdTextInternal::Table::Table
Table()
constructor
Definition: MsWrdText.cxx:292
MsWrdText::sendFieldComment
bool sendFieldComment(int id)
send a field note to a listener
Definition: MsWrdText.cxx:2202
MWAWField
a field
Definition: libmwaw_internal.hxx:399
MWAWField::PageNumber
@ PageNumber
Definition: libmwaw_internal.hxx:401
MsWrdTextInternal::TextStruct::~TextStruct
~TextStruct() final
destructor
Definition: MsWrdText.cxx:144
MsWrdText::version
int version() const
returns the file version
Definition: MsWrdText.cxx:479
MsWrdText::readHeaderTextLength
bool readHeaderTextLength()
reads the three different zone size
Definition: MsWrdText.cxx:604
MsWrdText::getFilePLCMap
std::multimap< long, MsWrdText::PLC > & getFilePLCMap()
returns the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:548
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
MsWrdText::PLC::m_type
Type m_type
the plc type
Definition: MsWrdText.hxx:92
MsWrdTextInternal::Footnote::m_error
std::string m_error
the errors
Definition: MsWrdText.cxx:225
MsWrdTextInternal::Footnote::m_id
int m_id
the id
Definition: MsWrdText.cxx:221
MsWrdTextInternal::State::m_fontMap
std::map< long, MsWrdStruct::Font > m_fontMap
the final correspondance font zone ( textpos, font)
Definition: MsWrdText.cxx:433
MsWrdText::PLC::ltstr
a comparaison structure
Definition: MsWrdText.hxx:81
MsWrdStruct::ParagraphInfo::read
bool read(MWAWInputStreamPtr &input, long endPos, int vers)
try to read a data
Definition: MsWrdStruct.cxx:702
MsWrdText::updateTableBeginnningAt
bool updateTableBeginnningAt(long cPos, long &nextCPos)
try to find a table which begin at position cPos, if so, update its data...
Definition: MsWrdText.cxx:1706
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MsWrdStruct::Paragraph::print
void print(std::ostream &o, MWAWFontConverterPtr converter) const
operator<<
Definition: MsWrdStruct.cxx:1197
MsWrdStruct::ParagraphInfo
the paragraph information of a Microsoft Word file (PHE)
Definition: MsWrdStruct.hxx:254
MsWrdText::prepareLines
void prepareLines()
cut the text in line/cell pos
Definition: MsWrdText.cxx:1274
MsWrdTextInternal::Footnote::m_value
int m_value
a value ( 1, 4)
Definition: MsWrdText.cxx:223
MsWrdText::MsWrdText
MsWrdText(MsWrdParser &parser)
constructor
Definition: MsWrdText.cxx:467
libmwaw::LeftBit
@ LeftBit
Definition: libmwaw_internal.hxx:178
MsWrdTextInternal::TextStruct::TextStruct
TextStruct(TextStruct const &)=default
MsWrdText::PLC::HeaderFooter
@ HeaderFooter
Definition: MsWrdText.hxx:71
MsWrdStruct::Paragraph::m_table
MWAWVariable< Table > m_table
the table
Definition: MsWrdStruct.hxx:381
MsWrdTextStyles
the main class to read/store the text font, paragraph, section stylesread
Definition: MsWrdTextStyles.hxx:67
MsWrdText::PLC::Field
@ Field
Definition: MsWrdText.hxx:71
MWAWTextListener.hxx
Defines MWAWTextListener: the libmwaw word processor listener.
MsWrdParser
the main class to read a Microsoft Word file
Definition: MsWrdParser.hxx:98
MsWrdTextInternal::Table::m_height
float m_height
the row height
Definition: MsWrdText.cxx:308
MsWrdText::PLC::Footnote
@ Footnote
Definition: MsWrdText.hxx:71
MsWrdTextInternal::State::m_sectionLimitList
std::vector< long > m_sectionLimitList
the section cPos limit
Definition: MsWrdText.cxx:431
MsWrdParser::sendPicture
void sendPicture(long fPos, int cPos, MWAWPosition::AnchorTo anchor=MWAWPosition::Char)
send a picture
Definition: MsWrdParser.cxx:1871
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
libmwaw::TopBit
@ TopBit
Definition: libmwaw_internal.hxx:178
MsWrdText::PLC::TextPosition
@ TextPosition
Definition: MsWrdText.hxx:71
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWCell::setBorders
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWCell.cxx:382
MsWrdTextInternal::State::m_headerFooterZones
std::vector< MWAWEntry > m_headerFooterZones
the header/footer zones
Definition: MsWrdText.cxx:417
MsWrdText::MsWrdText
MsWrdText(MsWrdText const &orig)=delete
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MsWrdTextInternal::TextStruct::CompareFilePos
a struct used to compare file textpos
Definition: MsWrdText.cxx:124
MWAWVariable::get
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
MsWrdTextInternal
Internal: the structures of a MsWrdText.
Definition: MsWrdText.cxx:70
MsWrdTextInternal::Field::m_id
int m_id
the id
Definition: MsWrdText.cxx:249
MsWrdTextInternal::Table::~Table
~Table() final
destructor
Definition: MsWrdText.cxx:315
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
MsWrdText::readTextStruct
bool readTextStruct(MsWrdEntry &entry)
read the text structure(some paragraph style+some text position?)
Definition: MsWrdText.cxx:744
MsWrdTextInternal::State
Internal: the state of a MsWrdParser.
Definition: MsWrdText.cxx:320
MsWrdTextInternal::TextStruct::m_flags
int m_flags
some flags
Definition: MsWrdText.cxx:137
MsWrdStruct::Section
the section structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:118
MsWrdTextInternal::State::m_paragraphLimitMap
std::map< long, int > m_paragraphLimitMap
the paragraph limit -> textposition (or -1)
Definition: MsWrdText.cxx:429
MsWrdTextInternal::Line::m_type
Type m_type
the line type
Definition: MsWrdText.cxx:283
operator<<
std::ostream & operator<<(std::ostream &o, MsWrdText::PLC const &plc)
Definition: MsWrdText.cxx:557
MsWrdText::PLC::ltstr::operator()
bool operator()(PLC const &s1, PLC const &s2) const
Definition: MsWrdText.hxx:82
MsWrdTextInternal::State::m_plcMap
std::multimap< long, MsWrdText::PLC > m_plcMap
the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:422
MsWrdStruct.hxx
MsWrdTextInternal::State::getTable
std::shared_ptr< Table > getTable(long cPos) const
try to return a table which begins at a character position
Definition: MsWrdText.cxx:382
MWAWColor::isWhite
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
MsWrdTextInternal::State::getFilePos
long getFilePos(long textPos) const
returns the file position corresponding to a text entry
Definition: MsWrdText.cxx:374
MsWrdStruct::Paragraph::inTable
bool inTable() const
returns true if we are in table
Definition: MsWrdStruct.hxx:345
MWAWFont.hxx
MWAWCell
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
MsWrdText::prepareFontProperties
void prepareFontProperties()
retrieve the font properties
Definition: MsWrdText.cxx:1521
MsWrdTextInternal::Field::Field
Field()
constructor
Definition: MsWrdText.cxx:232
MsWrdEntry
the entry of MsWrdParser
Definition: MsWrdParser.hxx:63
MsWrdTextInternal::TextStruct::m_pos
int m_pos
the text position
Definition: MsWrdText.cxx:133
MsWrdText::PLC::operator<<
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: MsWrdText.cxx:557
MsWrdTextInternal::Property::m_plcList
std::vector< MsWrdText::PLC > m_plcList
the list of plc
Definition: MsWrdText.cxx:266
MsWrdTextInternal::Page
Internal: the page.
Definition: MsWrdText.cxx:150
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
MsWrdStruct::Paragraph::getFont
bool getFont(Font &font, Font const *styleFont=nullptr) const
returns the font which correspond to the paragraph if possible
Definition: MsWrdStruct.cxx:1116
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MsWrdText.hxx
MsWrdStruct::Paragraph::m_tableDef
MWAWVariable< bool > m_tableDef
a table flag
Definition: MsWrdStruct.hxx:379
MsWrdText::convertFilePLCPos
void convertFilePLCPos()
convert the file position in character position and compute the paragraph limit
Definition: MsWrdText.cxx:1312
MsWrdTextInternal::TextStruct::m_complex
bool m_complex
a flag to know if we read a complex or a simple PRM
Definition: MsWrdText.cxx:141
MsWrdTextInternal::Field::m_text
std::string m_text
the text
Definition: MsWrdText.cxx:247
MsWrdTextInternal::State::m_pageList
std::vector< Page > m_pageList
the list of pages
Definition: MsWrdText.cxx:447
MsWrdText::PLC::Paragraph
@ Paragraph
Definition: MsWrdText.hxx:71
MsWrdTextInternal::State::m_fieldList
std::vector< Field > m_fieldList
the list of fields
Definition: MsWrdText.cxx:450
MsWrdTextInternal::State::m_filePlcMap
std::multimap< long, MsWrdText::PLC > m_filePlcMap
the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:424
MsWrdTextInternal::Footnote::operator<<
friend std::ostream & operator<<(std::ostream &o, Footnote const &note)
operator<<
Definition: MsWrdText.cxx:208
MsWrdTextInternal::Line::L_LastRowCell
@ L_LastRowCell
Definition: MsWrdText.cxx:275

Generated on Fri Sep 18 2020 18:14:52 for libmwaw by doxygen 1.8.20