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) : m_type(type), m_id(id), m_extra("")
73  {
74  }
76  friend std::ostream &operator<<(std::ostream &o, PLC const &plc);
78  struct ltstr {
79  bool operator()(PLC const &s1, PLC const &s2) const
80  {
81  if (s1.m_type != s2.m_type)
82  return int(s1.m_type) < int(s2.m_type);
83  if (s1.m_id != s2.m_id)
84  return s1.m_id < s2.m_id;
85  return false;
86  }
87  };
91  int m_id;
93  std::string m_extra;
94  };
95 public:
97  explicit MsWrdText(MsWrdParser &parser);
99  virtual ~MsWrdText();
100 
102  int version() const;
103 
105  int numPages() const;
106 
108  MWAWEntry getHeader() const;
109 
111  MWAWEntry getFooter() const;
112 protected:
114  shared_ptr<MWAWParserState> &getParserState()
115  {
116  return m_parserState;
117  }
118 
120  bool sendMainText();
121 
123  bool sendText(MWAWEntry const &textEntry, bool mainZone, bool tableCell=false);
125  bool sendSection(int sectionId);
127  bool readHeaderTextLength();
128 
130  bool createZones(long bot);
131 
133  bool readTextStruct(MsWrdEntry &entry);
134 
136  bool readPageBreak(MsWrdEntry &entry);
137 
139  bool readParagraphInfo(MsWrdEntry &entry);
140 
142  bool readFields(MsWrdEntry &entry, std::vector<long> const &fieldPos);
143 
145  bool sendFieldComment(int id);
146 
148  bool readFootnotesPos(MsWrdEntry &entry, std::vector<long> const &noteDef);
149 
151  bool readFootnotesData(MsWrdEntry &entry);
152 
154  bool sendFootnote(int id);
155 
157  bool readFontNames(MsWrdEntry &entry);
158 
160  void flushExtra();
161 
163  bool sendTable(MsWrdTextInternal::Table const &table);
164 
165  // interface with MsWrdTextStyles
166 
168  long getMainTextLength() const;
170  std::multimap<long, MsWrdText::PLC> &getTextPLCMap();
172  std::multimap<long, MsWrdText::PLC> &getFilePLCMap();
173 
174  //
175  // low level
176  //
177 
179  void prepareData();
180 
182  void prepareLines();
184  void convertFilePLCPos();
188  void prepareFontProperties();
189 
191  void prepareTableLimits();
193  bool updateTableBeginnningAt(long cPos, long &nextCPos);
194 
196  bool readLongZone(MsWrdEntry &entry, int sz, std::vector<long> &list);
197 
198 private:
199  MsWrdText(MsWrdText const &orig);
201 
202 protected:
203  //
204  // data
205  //
208 
210  shared_ptr<MsWrdTextInternal::State> m_state;
211 
213  shared_ptr<MsWrdTextStyles> m_stylesManager;
214 
217 };
218 #endif
219 // 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
MsWrdTextInternal::State::m_bot
long m_bot
the default text begin
Definition: MsWrdText.cxx:360
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MsWrdTextInternal::Table::m_cells
std::vector< MWAWVariable< MsWrdStruct::Table::Cell > > m_cells
the table cells
Definition: MsWrdText.cxx:278
MsWrdTextInternal::TextStruct::m_paragraphId
int m_paragraphId
the paragraph id
Definition: MsWrdText.cxx:132
MWAWField::Time
@ Time
Definition: libmwaw_internal.hxx:371
MsWrdTextInternal::State::m_lineList
std::vector< Line > m_lineList
the list of lines
Definition: MsWrdText.cxx:376
MsWrdTextInternal::State::getTable
shared_ptr< Table > getTable(long cPos) const
try to return a table which begins at a character position
Definition: MsWrdText.cxx:331
MsWrdText::sendSection
bool sendSection(int sectionId)
try to open a section
Definition: MsWrdText.cxx:2055
MsWrdTextInternal::Page::m_paragraphId
int m_paragraphId
the paragraph id
Definition: MsWrdText.cxx:179
MsWrdTextInternal::Footnote::Footnote
Footnote()
constructor
Definition: MsWrdText.cxx:190
MsWrdTextStyles::StyleZone
@ StyleZone
Definition: MsWrdTextStyles.hxx:70
MsWrdTextInternal::Line::Type
Type
an enum used to differentiate line and cell
Definition: MsWrdText.cxx:249
MsWrdText::PLC::FootnoteDef
@ FootnoteDef
Definition: MsWrdText.hxx:71
MsWrdText::PLC::ParagraphInfo
@ ParagraphInfo
Definition: MsWrdText.hxx:71
MsWrdText::getParserState
shared_ptr< MWAWParserState > & getParserState()
returns the parser state
Definition: MsWrdText.hxx:114
MWAWTextListenerPtr
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
MsWrdTextInternal::State::m_version
int m_version
the file version
Definition: MsWrdText.cxx:357
MsWrdTextInternal::Line::L_Cell
@ L_Cell
Definition: MsWrdText.cxx:249
MsWrdText::PLC::m_extra
std::string m_extra
some extra data
Definition: MsWrdText.hxx:93
MsWrdTextStyles::TextStructZone
@ TextStructZone
Definition: MsWrdTextStyles.hxx:70
MsWrdStruct::Paragraph
the paragraph structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:284
MsWrdText::flushExtra
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: MsWrdText.cxx:2184
MsWrdTextInternal::Page::operator<<
friend std::ostream & operator<<(std::ostream &o, Page const &page)
operator<<
Definition: MsWrdText.cxx:152
MsWrdText::getTextPLCMap
std::multimap< long, MsWrdText::PLC > & getTextPLCMap()
returns the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:490
MsWrdTextStyles::TextZone
@ TextZone
Definition: MsWrdTextStyles.hxx:70
MsWrdText::sendFootnote
bool sendFootnote(int id)
send a note to a listener
Definition: MsWrdText.cxx:2146
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MsWrdTextInternal::State::m_debugFile
std::fstream m_debugFile
internal and low level: defined a second debug file
Definition: MsWrdText.cxx:407
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MsWrdStruct::Table::Cell::m_backColor
MWAWVariable< float > m_backColor
the background gray color
Definition: MsWrdStruct.hxx:206
MsWrdTextInternal::Field::m_error
std::string m_error
the errors
Definition: MsWrdText.cxx:230
MsWrdText::numPages
int numPages() const
returns the number of pages
Definition: MsWrdText.cxx:433
MsWrdParser::newPage
void newPage(int number)
adds a new page
Definition: MsWrdParser.cxx:327
MsWrdTextInternal::Table::m_delimiterPos
std::vector< long > m_delimiterPos
the list of the delimiter cPos (ie. end of each cell)
Definition: MsWrdText.cxx:272
MsWrdText::readPageBreak
bool readPageBreak(MsWrdEntry &entry)
read the page limit ?
Definition: MsWrdText.cxx:920
MWAWCell::setPosition
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
MWAWEntry::isParsed
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:110
MsWrdTextInternal::Field::operator<<
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: MsWrdText.cxx:218
MsWrdTextInternal::State::m_paraInfoList
std::vector< MsWrdStruct::ParagraphInfo > m_paraInfoList
the list of paragraph info modifier
Definition: MsWrdText.cxx:393
MWAWField::m_DTFormat
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:386
MsWrdStruct::Font::m_font
MWAWVariable< MWAWFont > m_font
the font
Definition: MsWrdStruct.hxx:95
MWAWTable.hxx
libmwaw::BottomBit
@ BottomBit
Definition: libmwaw_internal.hxx:168
MsWrdTextInternal::TextStruct::getParagraphId
int getParagraphId() const
returns the paragraph id ( or -1, if unknown )
Definition: MsWrdText.cxx:112
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:153
MWAWEntry.hxx
MsWrdTextInternal::TextStruct::operator<<
friend std::ostream & operator<<(std::ostream &o, TextStruct const &entry)
operator<<
Definition: MsWrdText.cxx:81
MsWrdTextInternal::Line
Internal and low level: a structure to store a line or a cell of a MsWrdText.
Definition: MsWrdText.cxx:247
MWAWFontConverter.hxx
MsWrdTextInternal::Table::m_backgroundColor
MWAWColor m_backgroundColor
the background color
Definition: MsWrdText.cxx:276
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:182
MsWrdStruct::Table::Cell::m_borders
std::vector< MWAWVariable< MWAWBorder > > m_borders
the borders TLBR
Definition: MsWrdStruct.hxx:204
MsWrdText::sendText
bool sendText(MWAWEntry const &textEntry, bool mainZone, bool tableCell=false)
send a text zone
Definition: MsWrdText.cxx:1845
MsWrdTextInternal::Footnote::m_pos
MWAWEntry m_pos
the footnote data
Definition: MsWrdText.cxx:203
MWAWEntry::type
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
MsWrdStruct::Paragraph::updateParagraphToFinalState
void updateParagraphToFinalState(Paragraph const *style=0)
update the paragraph to obtain the final paragraph
Definition: MsWrdStruct.cxx:1136
MsWrdText::readFootnotesData
bool readFootnotesData(MsWrdEntry &entry)
read the footnote data
Definition: MsWrdText.cxx:1045
MsWrdText::MsWrdText
MsWrdText(MsWrdText const &orig)
MsWrdText::PLC::Page
@ Page
Definition: MsWrdText.hxx:71
MsWrdParser::sendFieldComment
void sendFieldComment(int id)
try to send a bookmark field id
Definition: MsWrdParser.cxx:383
MsWrdTextStyles.hxx
MsWrdText::sendTable
bool sendTable(MsWrdTextInternal::Table const &table)
try to send a table.
Definition: MsWrdText.cxx:2071
MsWrdParser::m_entryMap
std::multimap< std::string, MsWrdEntry > m_entryMap
the list of entries
Definition: MsWrdParser.hxx:201
MsWrdTextInternal::State::getTextStructId
int getTextStructId(long textPos) const
returns the id of textpos corresponding to a cPos or -1
Definition: MsWrdText.cxx:306
MsWrdText::prepareParagraphProperties
void prepareParagraphProperties()
retrieve the paragraph properties
Definition: MsWrdText.cxx:1384
MsWrdStruct::Paragraph::getFont
bool getFont(Font &font, Font const *styleFont=0) const
returns the font which correspond to the paragraph if possible
Definition: MsWrdStruct.cxx:1122
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:1185
MWAWBorder::None
@ None
Definition: libmwaw_internal.hxx:316
MsWrdTextInternal::Line::L_LastLineCell
@ L_LastLineCell
Definition: MsWrdText.cxx:249
MsWrdTextInternal::State::getTotalTextSize
long getTotalTextSize() const
returns the total text size
Definition: MsWrdText.cxx:299
MsWrdTextInternal::Page::m_page
int m_page
the page number
Definition: MsWrdText.cxx:177
MsWrdTextInternal::Table::m_cellPos
std::vector< long > m_cellPos
the list of cPos corresponding to cells limits
Definition: MsWrdText.cxx:270
MWAWCell::setBackgroundColor
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:296
MWAWParserStatePtr
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:509
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
MsWrdText::m_mainParser
MsWrdParser * m_mainParser
the main parser;
Definition: MsWrdText.hxx:216
MWAWTable::getColsSize
std::vector< float > const & getColsSize() const
returns the columns size if defined (in point)
Definition: MWAWTable.hxx:116
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:389
MsWrdStruct::Table::m_columns
MWAWVariable< std::vector< float > > m_columns
the table columns
Definition: MsWrdStruct.hxx:218
MsWrdTextInternal::Property::Property
Property()
Definition: MsWrdText.cxx:236
MsWrdTextInternal::TextStruct::m_id
int m_id
some identificator
Definition: MsWrdText.cxx:128
MsWrdTextInternal::TextStruct::m_extra
std::string m_extra
extra data
Definition: MsWrdText.cxx:136
MsWrdTextInternal::State::m_actPage
int m_actPage
the actual page
Definition: MsWrdText.cxx:404
MsWrdTextInternal::State::m_paragraphMap
std::map< long, MsWrdStruct::Paragraph > m_paragraphMap
the final correspondance paragraph zone ( textpos, paragraph)
Definition: MsWrdText.cxx:385
MsWrdTextInternal::Field
Internal: the field of MsWrdParser.
Definition: MsWrdText.cxx:214
MsWrdText::createZones
bool createZones(long bot)
finds the different zones
Definition: MsWrdText.cxx:581
MsWrdText::m_stylesManager
shared_ptr< MsWrdTextStyles > m_stylesManager
the style manager
Definition: MsWrdText.hxx:213
MsWrdTextInternal::State::debugFile2
std::fstream & debugFile2()
internal and low level: defined a second debug file
Definition: MsWrdText.cxx:345
MsWrdTextInternal::Property::m_debugPrint
bool m_debugPrint
a flag to know if we have print data
Definition: MsWrdText.cxx:242
MsWrdStruct::Font::m_picturePos
MWAWVariable< long > m_picturePos
a picture file position (if this corresponds to a picture)
Definition: MsWrdStruct.hxx:103
MWAWCell.hxx
MsWrdText::operator=
MsWrdText & operator=(MsWrdText const &orig)
MWAWTable::TableDimBit
@ TableDimBit
Definition: MWAWTable.hxx:56
MWAWField::Date
@ Date
Definition: libmwaw_internal.hxx:371
MsWrdTextInternal::Footnote
Internal: the footnote.
Definition: MsWrdText.cxx:188
MsWrdTextInternal::Page::m_type
int m_type
the type
Definition: MsWrdText.cxx:175
MsWrdTextInternal::TextStruct::TextStruct
TextStruct()
construtor
Definition: MsWrdText.cxx:75
MWAWVariable::isSet
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:586
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:387
MsWrdTextInternal::Page::m_values
int m_values[4]
some values ( 0, -1, 0, small number )
Definition: MsWrdText.cxx:181
MsWrdText::sendMainText
bool sendMainText()
send a main zone
Definition: MsWrdText.cxx:2137
MsWrdText::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: MsWrdText.hxx:207
MsWrdText::readFields
bool readFields(MsWrdEntry &entry, std::vector< long > const &fieldPos)
read the field data
Definition: MsWrdText.cxx:1093
MsWrdParser.hxx
MsWrdTextInternal::Page::m_error
std::string m_error
the errors
Definition: MsWrdText.cxx:183
MsWrdTextInternal::State::m_footnoteList
std::vector< Footnote > m_footnoteList
the list of footnotes
Definition: MsWrdText.cxx:402
MsWrdTextInternal::State::m_textposList
std::vector< TextStruct > m_textposList
the text positions
Definition: MsWrdText.cxx:368
MsWrdTextInternal::Property::m_fPos
long m_fPos
the character position in the file
Definition: MsWrdText.cxx:238
MsWrdTextInternal::State::State
State()
constructor
Definition: MsWrdText.cxx:288
MsWrdText::getHeader
MWAWEntry getHeader() const
returns the header entry
Definition: MsWrdText.cxx:444
MWAWParagraph.hxx
MWAWFont::getDebugString
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
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:983
MsWrdTextInternal::Page::Page
Page()
constructor
Definition: MsWrdText.cxx:147
libmwaw_internal.hxx
MWAWPosition.hxx
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
MsWrdText::PLC::Object
@ Object
Definition: MsWrdText.hxx:71
MsWrdTextInternal::Line::Line
Line()
constructor
Definition: MsWrdText.cxx:251
MsWrdText::getFooter
MWAWEntry getFooter() const
returns the footer entry
Definition: MsWrdText.cxx:467
MsWrdText::PLC
Internal: the plc.
Definition: MsWrdText.hxx:70
MsWrdTextInternal::TextStruct::~TextStruct
~TextStruct()
destructor
Definition: MsWrdText.cxx:139
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:1163
MsWrdText::readParagraphInfo
bool readParagraphInfo(MsWrdEntry &entry)
read the paragraph height info
Definition: MsWrdText.cxx:854
MsWrdStruct::Paragraph::m_styleId
MWAWVariable< int > m_styleId
the style id (if known)
Definition: MsWrdStruct.hxx:321
MsWrdText::MsWrdTextStyles
friend class MsWrdTextStyles
Definition: MsWrdText.hxx:67
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
MsWrdTextInternal::TextStruct::m_type
int m_type
the type
Definition: MsWrdText.cxx:130
MsWrdText::PLC::m_id
int m_id
the identificator
Definition: MsWrdText.hxx:91
MsWrdText::prepareData
void prepareData()
prepare the data to be send
Definition: MsWrdText.cxx:1690
MsWrdStruct::Font::insert
void insert(Font const &font, Font const *styleFont=0)
insert new font data ( beginning by updating font flags )
Definition: MsWrdStruct.cxx:82
MsWrdTextInternal::Page::m_id
int m_id
the identificator
Definition: MsWrdText.cxx:173
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:249
MsWrdText::~MsWrdText
virtual ~MsWrdText()
destructor
Definition: MsWrdText.cxx:423
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
MWAWTable
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:52
libmwaw::RightBit
@ RightBit
Definition: libmwaw_internal.hxx:168
MWAWVec2< long >
MsWrdTextInternal::TextStruct::CompareFilePos::operator()
bool operator()(TextStruct const *t1, TextStruct const *t2) const
comparaison function
Definition: MsWrdText.cxx:119
MWAWDebug.hxx
MsWrdText::readFontNames
bool readFontNames(MsWrdEntry &entry)
read the font names
Definition: MsWrdText.cxx:793
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
MsWrdTextInternal::Line::m_cPos
MWAWVec2l m_cPos
the caracter position
Definition: MsWrdText.cxx:257
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MsWrdText::getMainTextLength
long getMainTextLength() const
returns the main text length
Definition: MsWrdText.cxx:439
MsWrdTextInternal::Table
Internal and low level: a structure to store a table of a MsWrdText.
Definition: MsWrdText.cxx:262
MsWrdParser::sendFootnote
void sendFootnote(int id)
try to send a footnote id
Definition: MsWrdParser.cxx:374
MsWrdText::prepareTableLimits
void prepareTableLimits()
find the table end position knowing the end cell/pos delimiter
Definition: MsWrdText.cxx:1565
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:235
MsWrdTextInternal::Table::Table
Table()
constructor
Definition: MsWrdText.cxx:264
MsWrdText::sendFieldComment
bool sendFieldComment(int id)
send a field note to a listener
Definition: MsWrdText.cxx:2164
MWAWField
a field
Definition: libmwaw_internal.hxx:369
MWAWField::PageNumber
@ PageNumber
Definition: libmwaw_internal.hxx:371
MsWrdText::version
int version() const
returns the file version
Definition: MsWrdText.cxx:426
MsWrdText::readHeaderTextLength
bool readHeaderTextLength()
reads the three different zone size
Definition: MsWrdText.cxx:551
MsWrdText::getFilePLCMap
std::multimap< long, MsWrdText::PLC > & getFilePLCMap()
returns the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:495
MsWrdTextInternal::State::m_tableMap
std::map< long, shared_ptr< Table > > m_tableMap
the final correspondance table zone ( textpos, font)
Definition: MsWrdText.cxx:391
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
MsWrdText::PLC::m_type
Type m_type
the plc type
Definition: MsWrdText.hxx:89
MsWrdTextInternal::Table::~Table
~Table()
destructor
Definition: MsWrdText.cxx:281
MsWrdStruct::Table::m_cells
std::vector< MWAWVariable< Cell > > m_cells
the table cells
Definition: MsWrdStruct.hxx:222
MsWrdTextInternal::Footnote::m_error
std::string m_error
the errors
Definition: MsWrdText.cxx:209
MsWrdTextInternal::Footnote::m_id
int m_id
the id
Definition: MsWrdText.cxx:205
MsWrdTextInternal::State::m_fontMap
std::map< long, MsWrdStruct::Font > m_fontMap
the final correspondance font zone ( textpos, font)
Definition: MsWrdText.cxx:382
MsWrdText::PLC::ltstr
a comparaison structure
Definition: MsWrdText.hxx:78
MsWrdStruct::ParagraphInfo::read
bool read(MWAWInputStreamPtr &input, long endPos, int vers)
try to read a data
Definition: MsWrdStruct.cxx:708
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:1667
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
MsWrdStruct::Paragraph::print
void print(std::ostream &o, MWAWFontConverterPtr converter) const
operator<<
Definition: MsWrdStruct.cxx:1205
MsWrdStruct::ParagraphInfo
the paragraph information of a Microsoft Word file (PHE)
Definition: MsWrdStruct.hxx:230
MsWrdText::prepareLines
void prepareLines()
cut the text in line/cell pos
Definition: MsWrdText.cxx:1223
MsWrdTextInternal::Footnote::m_value
int m_value
a value ( 1, 4)
Definition: MsWrdText.cxx:207
MsWrdText::MsWrdText
MsWrdText(MsWrdParser &parser)
constructor
Definition: MsWrdText.cxx:416
libmwaw::LeftBit
@ LeftBit
Definition: libmwaw_internal.hxx:168
MsWrdText::PLC::HeaderFooter
@ HeaderFooter
Definition: MsWrdText.hxx:71
MsWrdStruct::Paragraph::m_table
MWAWVariable< Table > m_table
the table
Definition: MsWrdStruct.hxx:339
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
MsWrdStruct::Table::m_height
MWAWVariable< float > m_height
the row height in inches
Definition: MsWrdStruct.hxx:212
MsWrdParser
the main class to read a Microsoft Word file
Definition: MsWrdParser.hxx:95
MsWrdTextInternal::Table::m_height
float m_height
the row height
Definition: MsWrdText.cxx:274
MsWrdTextInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: MsWrdText.cxx:404
MsWrdText::PLC::Footnote
@ Footnote
Definition: MsWrdText.hxx:71
MsWrdTextInternal::State::m_sectionLimitList
std::vector< long > m_sectionLimitList
the section cPos limit
Definition: MsWrdText.cxx:380
MsWrdParser::sendPicture
void sendPicture(long fPos, int cPos, MWAWPosition::AnchorTo anchor=MWAWPosition::Char)
send a picture
Definition: MsWrdParser.cxx:1789
libmwaw::TopBit
@ TopBit
Definition: libmwaw_internal.hxx:168
MsWrdText::m_state
shared_ptr< MsWrdTextInternal::State > m_state
the state
Definition: MsWrdText.hxx:210
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:379
MsWrdTextInternal::State::m_headerFooterZones
std::vector< MWAWEntry > m_headerFooterZones
the header/footer zones
Definition: MsWrdText.cxx:366
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
MsWrdTextInternal::TextStruct::CompareFilePos
a struct used to compare file textpos
Definition: MsWrdText.cxx:117
MWAWVariable::get
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:581
MsWrdTextInternal
Internal: the structures of a MsWrdText.
Definition: MsWrdText.cxx:70
MsWrdTextInternal::Field::m_id
int m_id
the id
Definition: MsWrdText.cxx:228
MsWrdStruct::Table
the table in a Microsoft Word file
Definition: MsWrdStruct.hxx:159
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:693
MsWrdTextInternal::State
Internal: the state of a MsWrdParser.
Definition: MsWrdText.cxx:286
MsWrdStruct::Section
the section structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:111
MsWrdTextInternal::State::m_paragraphLimitMap
std::map< long, int > m_paragraphLimitMap
the paragraph limit -> textposition (or -1)
Definition: MsWrdText.cxx:378
MsWrdTextInternal::Line::m_type
Type m_type
the line type
Definition: MsWrdText.cxx:255
operator<<
std::ostream & operator<<(std::ostream &o, MsWrdText::PLC const &plc)
Definition: MsWrdText.cxx:504
MsWrdText::PLC::ltstr::operator()
bool operator()(PLC const &s1, PLC const &s2) const
Definition: MsWrdText.hxx:79
MsWrdTextInternal::State::m_plcMap
std::multimap< long, MsWrdText::PLC > m_plcMap
the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:371
MsWrdStruct.hxx
MWAWColor::isWhite
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
MsWrdTextInternal::State::getFilePos
long getFilePos(long textPos) const
returns the file position corresponding to a text entry
Definition: MsWrdText.cxx:323
MsWrdStruct::Paragraph::inTable
bool inTable() const
returns true if we are in table
Definition: MsWrdStruct.hxx:303
MWAWFont.hxx
MsWrdStruct::Table::Cell
the cells definitions in a Microsoft Word Table
Definition: MsWrdStruct.hxx:177
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:1479
MsWrdTextInternal::Field::Field
Field()
constructor
Definition: MsWrdText.cxx:216
MsWrdEntry
the entry of MsWrdParser
Definition: MsWrdParser.hxx:63
MsWrdTextInternal::TextStruct::m_pos
int m_pos
the text position
Definition: MsWrdText.cxx:126
MsWrdText::PLC::operator<<
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: MsWrdText.cxx:504
MsWrdTextInternal::Property::m_plcList
std::vector< MsWrdText::PLC > m_plcList
the list of plc
Definition: MsWrdText.cxx:240
MsWrdTextInternal::Page
Internal: the page.
Definition: MsWrdText.cxx:145
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
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:337
MsWrdText::convertFilePLCPos
void convertFilePLCPos()
convert the file position in character position and compute the paragraph limit
Definition: MsWrdText.cxx:1263
MsWrdTextInternal::TextStruct::m_complex
bool m_complex
a flag to know if we read a complex or a simple PRM
Definition: MsWrdText.cxx:134
MsWrdTextInternal::Field::m_text
std::string m_text
the text
Definition: MsWrdText.cxx:226
MsWrdTextInternal::State::m_pageList
std::vector< Page > m_pageList
the list of pages
Definition: MsWrdText.cxx:396
MsWrdText::PLC::Paragraph
@ Paragraph
Definition: MsWrdText.hxx:71
MsWrdTextInternal::State::m_fieldList
std::vector< Field > m_fieldList
the list of fields
Definition: MsWrdText.cxx:399
MsWrdTextInternal::State::m_textLength
long m_textLength[3]
the text length (main, footnote, header+footer)
Definition: MsWrdText.cxx:363
MsWrdTextInternal::State::m_filePlcMap
std::multimap< long, MsWrdText::PLC > m_filePlcMap
the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:373
MsWrdTextInternal::Footnote::operator<<
friend std::ostream & operator<<(std::ostream &o, Footnote const &note)
operator<<
Definition: MsWrdText.cxx:192
MsWrdTextInternal::Line::L_LastRowCell
@ L_LastRowCell
Definition: MsWrdText.cxx:249

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