MsWrdStruct.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  * Class to read/store the MsWrd structures
36  */
37 
38 #ifndef MS_WRD_STRUCT
39 # define MS_WRD_STRUCT
40 
41 #include <iostream>
42 #include <string>
43 #include <vector>
44 
45 #include "libmwaw_internal.hxx"
46 
47 #include "MWAWFont.hxx"
48 #include "MWAWParagraph.hxx"
49 
51 namespace MsWrdStruct
52 {
54 MWAWBorder getBorder(int val, std::string &extra);
55 
57 struct Font {
58  enum { NumFlags =9 };
59 
61  Font()
62  : m_font(MWAWFont(-1,0))
63  , m_size(0)
64  , m_value(0)
65  , m_picturePos(0)
66  , m_unknown(0)
67  , m_extra("")
68  {
69  for (auto &fl : m_flags) fl=MWAWVariable<int>(0);
70  }
71  Font(Font const &)=default;
72  Font &operator=(Font const &)=default;
74  void insert(Font const &font, Font const *styleFont=nullptr);
75 
77  void updateFontToFinalState(Font const *styleFont=nullptr);
78 
80  friend std::ostream &operator<<(std::ostream &o, Font const &font);
81 
83  int cmp(Font const &oth) const
84  {
85  int diff = m_font.get().cmp(oth.m_font.get());
86  if (diff) return diff;
87  if (m_size.get() < oth.m_size.get()) return -1;
88  if (m_size.get() > oth.m_size.get()) return 1;
89  diff = m_value.get()-oth.m_value.get();
90  if (diff) return diff;
91  for (int i = 0; i < NumFlags; i++) {
92  diff = m_flags[i].get()-oth.m_flags[i].get();
93  if (diff) return diff;
94  }
95  if (m_picturePos.get()<oth.m_picturePos.get()) return -1;
96  if (m_picturePos.get()>oth.m_picturePos.get()) return 1;
97  diff = m_unknown.get()-oth.m_unknown.get();
98  if (diff) return diff;
99  return 0;
100  }
114  std::string m_extra;
115 };
116 
118 struct Section {
121  : m_id(-1)
122  , m_type(0)
123  , m_paragraphId(-9999)
124  , m_col(1)
125  , m_colSep(0.5)
126  , m_colBreak(false)
127  , m_flag(0)
128  , m_extra("")
129  {
130  }
132  MWAWSection getSection(double pageWidth) const;
133 
135  void insert(Section const &sec)
136  {
137  m_id.insert(sec.m_id);
138  m_type.insert(sec.m_type);
140  m_col.insert(sec.m_col);
141  m_colSep.insert(sec.m_colSep);
143  m_flag.insert(sec.m_flag);
144  m_extra+=sec.m_extra;
145  }
147  bool read(MWAWInputStreamPtr &input, long endPos);
149  bool readV3(MWAWInputStreamPtr &input, long endPos);
150 
152  friend std::ostream &operator<<(std::ostream &o, Section const &section);
153 
169  std::string m_extra;
170 };
171 
173 struct Table {
174  struct Cell;
177  : m_height(0)
178  , m_justify(MWAWParagraph::JustificationLeft)
179  , m_indent(0)
180  , m_columns()
182  , m_cells()
183  , m_badCell()
184  , m_extra("")
185  {
186  }
188  void insert(Table const &table);
190  bool read(MWAWInputStreamPtr &input, long endPos);
192  MWAWVariable<Cell> &getCell(int id);
193 
195  friend std::ostream &operator<<(std::ostream &o, Table const &table);
196 
198  struct Cell {
201  : m_borders()
202  , m_backColor(1.0f)
203  , m_extra("")
204  {
205  }
207  void insert(Cell const &cell)
208  {
209  size_t cNumBorders = cell.m_borders.size();
210  if (cNumBorders > m_borders.size())
211  m_borders.resize(cNumBorders);
212  for (size_t i=0; i < cNumBorders; i++)
213  if (cell.m_borders[i].isSet()) m_borders[i]=*cell.m_borders[i];
215  m_extra+=cell.m_extra;
216  }
218  bool hasBorders() const
219  {
220  for (auto const &bd : m_borders)
221  if (bd.isSet() && bd->m_style != MWAWBorder::None)
222  return true;
223  return false;
224  }
226  friend std::ostream &operator<<(std::ostream &o, Cell const &cell);
228  std::vector<MWAWVariable<MWAWBorder> > m_borders;
232  std::string m_extra;
233  };
234 
246  std::vector<MWAWVariable<Cell> > m_cells;
250  std::string m_extra;
251 };
252 
257  : m_type(0)
258  , m_dim()
259  , m_numLines(-1)
260  , m_error("")
261  {
262  }
264  bool isLineSet() const
265  {
266  return *m_numLines!=0;
267  }
269  bool isEmpty() const
270  {
271  if (*m_numLines || *m_type) return false;
272  if (!m_dim.isSet()) return true;
273  if ((*m_dim)[0] > 0 || (*m_dim)[1] > 0) return false;
274  return true;
275  }
277  bool read(MWAWInputStreamPtr &input, long endPos, int vers);
279  friend std::ostream &operator<<(std::ostream &o, ParagraphInfo const &pInfo)
280  {
281  // find also pInfo.m_type&0x40 : ?
282  if (*pInfo.m_type&0xd0) o << "type?=" << ((*pInfo.m_type&0xd0)>>4) << ",";
283  if (*pInfo.m_type&0x0f) o << "#unkn=" << (*pInfo.m_type&0xf) << ",";
284  if (pInfo.m_dim.isSet()) {
285  if ((*pInfo.m_dim)[0] > 0)
286  o << "width=" << (*pInfo.m_dim)[0] << ",";
287  if ((*pInfo.m_dim)[1] > 0) {
288  o << "height=" << (*pInfo.m_dim)[1];
289  if (*pInfo.m_type&0x20)
290  o << "[total]";
291  o << ",";
292  }
293  }
294  if (pInfo.m_numLines.isSet() && *pInfo.m_numLines!=-1 && *pInfo.m_numLines!=1)
295  o << "nLines=" << *pInfo.m_numLines << ",";
296  if (pInfo.m_error.length()) o << pInfo.m_error << ",";
297  return o;
298  }
300  void insert(ParagraphInfo const &pInfo);
308  std::string m_error;
309 };
310 
312 struct Paragraph final : public MWAWParagraph {
314  explicit Paragraph(int version)
315  : MWAWParagraph()
316  , m_version(version)
317  , m_styleId(-1000)
318  , m_interline(0)
319  , m_deletedTabs()
320  , m_info()
321  , m_font()
322  , m_modFont()
323  , m_section()
324  , m_bordersStyle()
325  , m_inCell(false)
326  , m_tableDef(false)
327  , m_table()
328  {
330  }
331  Paragraph(Paragraph const &)=default;
332  Paragraph &operator=(Paragraph const &)=default;
335  ~Paragraph() final;
337  void insert(Paragraph const &para, bool insertModif=true);
339  bool read(MWAWInputStreamPtr &input, long endPos);
341  void updateParagraphToFinalState(Paragraph const *style=nullptr);
343  bool getFont(Font &font, Font const *styleFont=nullptr) const;
345  bool inTable() const
346  {
347  return m_inCell.get();
348  }
350  friend std::ostream &operator<<(std::ostream &o, Paragraph const &ind);
351 
353  void print(std::ostream &o, MWAWFontConverterPtr converter) const;
354 
356  int getNumLines() const
357  {
358  return m_info.get().m_numLines.get();
359  }
367  std::vector<float> m_deletedTabs;
382 };
383 }
384 #endif
385 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
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
MsWrdStruct::Font::operator=
Font & operator=(Font const &)=default
MsWrdStruct::Table::m_extra
std::string m_extra
the errors
Definition: MsWrdStruct.hxx:250
MsWrdStruct::ParagraphInfo::m_type
MWAWVariable< int > m_type
the type
Definition: MsWrdStruct.hxx:302
MsWrdStruct::Paragraph::m_inCell
MWAWVariable< bool > m_inCell
a cell/textbox
Definition: MsWrdStruct.hxx:377
MWAWFont::insert
void insert(MWAWFont const &ft)
inserts the set value in the current font
Definition: MWAWFont.hxx:229
MsWrdStruct::Paragraph
the paragraph structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:312
MWAWFont::smallCapsBit
@ smallCapsBit
Definition: MWAWFont.hxx:192
MsWrdStruct::ParagraphInfo::insert
void insert(ParagraphInfo const &pInfo)
insert the new values
Definition: MsWrdStruct.cxx:717
MWAWTabStop::m_leaderCharacter
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:78
MWAWFontConverterPtr
std::shared_ptr< MWAWFontConverter > MWAWFontConverterPtr
a smart pointer of MWAWFontConverter
Definition: libmwaw_internal.hxx:543
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MsWrdStruct::Table::Cell::m_extra
std::string m_extra
extra data
Definition: MsWrdStruct.hxx:232
MsWrdStruct::Font::m_extra
std::string m_extra
extra data
Definition: MsWrdStruct.hxx:114
MWAWParagraph::resizeBorders
void resizeBorders(size_t newSize)
a function used to resize the borders list ( adding empty borders if needed )
Definition: MWAWParagraph.hxx:122
MWAWVariable
a generic variable template: value + flag to know if the variable is set
Definition: libmwaw_internal.hxx:577
MsWrdStruct::Table::Cell::Cell
Cell()
constructor
Definition: MsWrdStruct.hxx:200
MsWrdStruct::Table::Cell::m_backColor
MWAWVariable< float > m_backColor
the background gray color
Definition: MsWrdStruct.hxx:230
MWAWBorder::m_type
Type m_type
the border repetition
Definition: libmwaw_internal.hxx:385
MsWrdStruct::Paragraph::operator=
Paragraph & operator=(Paragraph &&)=default
MsWrdStruct::ParagraphInfo::isLineSet
bool isLineSet() const
returns true if num lines is set
Definition: MsWrdStruct.hxx:264
MsWrdStruct::ParagraphInfo::ParagraphInfo
ParagraphInfo()
constructor
Definition: MsWrdStruct.hxx:256
MWAWParagraph::m_tabs
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
MsWrdStruct::Font::operator<<
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: MsWrdStruct.cxx:44
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MsWrdStruct::Font::Font
Font(Font const &)=default
MsWrdStruct::Paragraph::getNumLines
int getNumLines() const
returns the number of line stored in m_info or -1
Definition: MsWrdStruct.hxx:356
MsWrdStruct::Font::m_font
MWAWVariable< MWAWFont > m_font
the font
Definition: MsWrdStruct.hxx:102
MsWrdStruct::getBorder
MWAWBorder getBorder(int val, std::string &extra)
generic function use to fill a border using the read data
Definition: MsWrdStruct.cxx:1207
MsWrdStruct::Table::Cell::insert
void insert(Cell const &cell)
update the cell data by merging
Definition: MsWrdStruct.hxx:207
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
MsWrdStruct::Paragraph::updateParagraphToFinalState
void updateParagraphToFinalState(Paragraph const *style=nullptr)
update the paragraph to obtain the final paragraph
Definition: MsWrdStruct.cxx:1130
MWAWFontConverter.hxx
MsWrdStruct::Table::Cell::m_borders
std::vector< MWAWVariable< MWAWBorder > > m_borders
the borders TLBR
Definition: MsWrdStruct.hxx:228
MWAWParagraph::m_spacings
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
MsWrdStruct::Paragraph::~Paragraph
~Paragraph() final
destructor
Definition: MsWrdStruct.cxx:726
MsWrdStruct::Paragraph::m_interline
MWAWVariable< double > m_interline
the interline if set
Definition: MsWrdStruct.hxx:365
MWAWParagraph::JustificationFullAllLines
@ JustificationFullAllLines
Definition: MWAWParagraph.hxx:91
MWAWFont::outlineBit
@ outlineBit
Definition: MWAWFont.hxx:191
MsWrdStruct::Paragraph::m_font
MWAWVariable< Font > m_font
the font
Definition: MsWrdStruct.hxx:371
MsWrdStruct::Section::read
bool read(MWAWInputStreamPtr &input, long endPos)
try to read a data
Definition: MsWrdStruct.cxx:168
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
MWAWBorder::None
@ None
Definition: libmwaw_internal.hxx:335
libmwaw::HMiddle
@ HMiddle
Definition: libmwaw_internal.hxx:176
MWAWBorder::m_width
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
MsWrdStruct::Section::Section
Section()
constructor
Definition: MsWrdStruct.hxx:120
MsWrdStruct::Table::m_columns
MWAWVariable< std::vector< float > > m_columns
the table columns
Definition: MsWrdStruct.hxx:242
MsWrdStruct::Paragraph::operator=
Paragraph & operator=(Paragraph const &)=default
MWAWFont::Line::isSet
bool isSet() const
return true if the line is not empty
Definition: MWAWFont.hxx:62
MWAWParagraph::m_margins
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
MWAWBorder::Dot
@ Dot
Definition: libmwaw_internal.hxx:335
MWAWTabStop::DECIMAL
@ DECIMAL
Definition: MWAWParagraph.hxx:48
MsWrdStruct::Section::m_paragraphId
MWAWVariable< int > m_paragraphId
the paragraph id
Definition: MsWrdStruct.hxx:159
MsWrdStruct::Section::readV3
bool readV3(MWAWInputStreamPtr &input, long endPos)
try to read a data ( v3 code )
Definition: MsWrdStruct.cxx:234
MWAWFont::uppercaseBit
@ uppercaseBit
Definition: MWAWFont.hxx:192
MsWrdStruct::Table::m_columnsWidthMod
MWAWVariable< std::vector< float > > m_columnsWidthMod
the columns width modifier
Definition: MsWrdStruct.hxx:244
MsWrdStruct::Font::m_picturePos
MWAWVariable< long > m_picturePos
a picture file position (if this corresponds to a picture)
Definition: MsWrdStruct.hxx:110
MsWrdStruct::Font::m_flags
MWAWVariable< int > m_flags[NumFlags]
a list of flags
Definition: MsWrdStruct.hxx:108
MWAWTabStop
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
MWAWFont::setStrikeOutStyle
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:427
MWAWVariable::isSet
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:635
MWAWParagraph::NoBreakBit
@ NoBreakBit
Definition: MWAWParagraph.hxx:88
MWAWFont::getStrikeOut
Line const & getStrikeOut() const
returns the strikeoutline
Definition: MWAWFont.hxx:417
MWAWParagraph::m_borders
std::vector< MWAWVariable< MWAWBorder > > m_borders
list of border ( order MWAWBorder::Pos)
Definition: MWAWParagraph.hxx:186
MsWrdStruct::Paragraph::Paragraph
Paragraph(int version)
Constructor.
Definition: MsWrdStruct.hxx:314
MWAWParagraph::AtLeast
@ AtLeast
Definition: MWAWParagraph.hxx:94
MsWrdStruct::Section::insert
void insert(Section const &sec)
insert the new values
Definition: MsWrdStruct.hxx:135
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWParagraph::m_breakStatus
MWAWVariable< int > m_breakStatus
a list of bits: 0x1 (unbreakable), 0x2 (do not break after)
Definition: MWAWParagraph.hxx:169
MWAWFont::Line::None
@ None
Definition: MWAWFont.hxx:49
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
MsWrdStruct::ParagraphInfo::m_error
std::string m_error
the errors
Definition: MsWrdStruct.hxx:308
MWAWParagraph.hxx
MsWrdStruct
namespace to store the main structure which appears in a Microsoft Word 3.0-5.0 file
Definition: MsWrdStruct.cxx:42
MWAWParagraph::m_tabsRelativeToLeftMargin
MWAWVariable< bool > m_tabsRelativeToLeftMargin
true if the tabs are relative to left margin, false if there are relative to the page margin (default...
Definition: MWAWParagraph.hxx:164
libmwaw::Bottom
@ Bottom
Definition: libmwaw_internal.hxx:176
libmwaw_internal.hxx
MsWrdStruct::Paragraph::operator<<
friend std::ostream & operator<<(std::ostream &o, Paragraph const &ind)
operator<<
Definition: MsWrdStruct.cxx:1092
MsWrdStruct::Table::m_justify
MWAWVariable< MWAWParagraph::Justification > m_justify
the justification
Definition: MsWrdStruct.hxx:238
MsWrdStruct::Paragraph::insert
void insert(Paragraph const &para, bool insertModif=true)
insert the new values
Definition: MsWrdStruct.cxx:1157
MsWrdStruct::Section::m_extra
std::string m_extra
the errors
Definition: MsWrdStruct.hxx:169
MsWrdStruct::Table::insert
void insert(Table const &table)
insert the new values
Definition: MsWrdStruct.cxx:596
MsWrdStruct::Paragraph::m_styleId
MWAWVariable< int > m_styleId
the style id (if known)
Definition: MsWrdStruct.hxx:363
MWAWBorder
a border
Definition: libmwaw_internal.hxx:333
MWAWSection::m_columns
std::vector< Column > m_columns
the different column
Definition: MWAWSection.hxx:108
MsWrdStruct::Paragraph::read
bool read(MWAWInputStreamPtr &input, long endPos)
try to read a data
Definition: MsWrdStruct.cxx:730
MsWrdStruct::Font::updateFontToFinalState
void updateFontToFinalState(Font const *styleFont=nullptr)
update the font to obtain the final font
Definition: MsWrdStruct.cxx:99
MsWrdStruct::Font
the font structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:57
libmwaw::VMiddle
@ VMiddle
Definition: libmwaw_internal.hxx:176
MsWrdStruct::Paragraph::Paragraph
Paragraph(Paragraph const &)=default
MsWrdStruct::Section::getSection
MWAWSection getSection(double pageWidth) const
returns a section
Definition: MsWrdStruct.cxx:151
MWAWSection::Column::m_width
double m_width
the columns width
Definition: MWAWSection.hxx:150
MWAWSection::Column
struct to store the columns properties
Definition: MWAWSection.hxx:120
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
MWAWFont::size
float size() const
returns the font size
Definition: MWAWFont.hxx:270
MsWrdStruct::Paragraph::m_section
MWAWVariable< Section > m_section
the section
Definition: MsWrdStruct.hxx:373
MsWrdStruct::Section::m_colSep
MWAWVariable< float > m_colSep
the spacing between column
Definition: MsWrdStruct.hxx:163
MWAWTabStop::m_alignment
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
MsWrdStruct::Section::m_id
MWAWVariable< int > m_id
the identificator
Definition: MsWrdStruct.hxx:155
MWAWSection
a class which stores section properties
Definition: MWAWSection.hxx:46
MsWrdStruct::Paragraph::m_bordersStyle
MWAWVariable< MWAWBorder > m_bordersStyle
the border style ( old v3)
Definition: MsWrdStruct.hxx:375
MWAWDebug.hxx
MWAWVariable::insert
void insert(MWAWVariable const &orig)
update the current value if orig is set
Definition: libmwaw_internal.hxx:600
MsWrdStruct::Table::m_badCell
MWAWVariable< Cell > m_badCell
empty cell used by getCell to return unknown cell
Definition: MsWrdStruct.hxx:248
MWAWTabStop::m_position
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
MsWrdStruct::Paragraph::m_deletedTabs
std::vector< float > m_deletedTabs
the delete tabulation
Definition: MsWrdStruct.hxx:367
MsWrdStruct::Paragraph::m_info
MWAWVariable< ParagraphInfo > m_info
the dimension
Definition: MsWrdStruct.hxx:369
MsWrdStruct::Section::operator<<
friend std::ostream & operator<<(std::ostream &o, Section const &section)
operator<<
Definition: MsWrdStruct.cxx:407
MsWrdStruct::Table::m_indent
MWAWVariable< float > m_indent
the indent
Definition: MsWrdStruct.hxx:240
MWAWParagraph::JustificationLeft
@ JustificationLeft
Definition: MWAWParagraph.hxx:90
MsWrdStruct::Table::Cell::hasBorders
bool hasBorders() const
returns true if the cell has borders
Definition: MsWrdStruct.hxx:218
MWAWParagraph::~MWAWParagraph
virtual ~MWAWParagraph()
destructor
Definition: MWAWParagraph.cxx:175
MsWrdStruct::Section::m_type
MWAWVariable< int > m_type
the type
Definition: MsWrdStruct.hxx:157
MsWrdStruct::Table::Cell::operator<<
friend std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: MsWrdStruct.cxx:628
MsWrdStruct::Table::m_cells
std::vector< MWAWVariable< Cell > > m_cells
the table cells
Definition: MsWrdStruct.hxx:246
MsWrdStruct::Section::m_colBreak
MWAWVariable< bool > m_colBreak
only a column break
Definition: MsWrdStruct.hxx:165
MsWrdStruct::ParagraphInfo::read
bool read(MWAWInputStreamPtr &input, long endPos, int vers)
try to read a data
Definition: MsWrdStruct.cxx:702
libmwaw::Top
@ Top
Definition: libmwaw_internal.hxx:176
MWAWBorder::m_style
Style m_style
the border style
Definition: libmwaw_internal.hxx:380
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
MWAWBorder::Double
@ Double
Definition: libmwaw_internal.hxx:337
MsWrdStruct::Paragraph::m_table
MWAWVariable< Table > m_table
the table
Definition: MsWrdStruct.hxx:381
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MWAWSection::Column::m_widthUnit
librevenge::RVNGUnit m_widthUnit
the width unit (default inches)
Definition: MWAWSection.hxx:152
MsWrdStruct::ParagraphInfo::isEmpty
bool isEmpty() const
returns true if no data are been set
Definition: MsWrdStruct.hxx:269
MsWrdStruct::ParagraphInfo::m_numLines
MWAWVariable< int > m_numLines
the number of lines
Definition: MsWrdStruct.hxx:306
MsWrdStruct::Font::cmp
int cmp(Font const &oth) const
a comparison function
Definition: MsWrdStruct.hxx:83
MsWrdStruct::Table::read
bool read(MWAWInputStreamPtr &input, long endPos)
try to read a data
Definition: MsWrdStruct.cxx:435
MsWrdStruct::Section::m_col
MWAWVariable< int > m_col
the num of columns
Definition: MsWrdStruct.hxx:161
MsWrdStruct::Table::m_height
MWAWVariable< float > m_height
the row height in inches
Definition: MsWrdStruct.hxx:236
MsWrdStruct::Table::Table
Table()
constructor
Definition: MsWrdStruct.hxx:176
MsWrdStruct::Font::m_value
MWAWVariable< int > m_value
a unknown value
Definition: MsWrdStruct.hxx:106
libmwaw::Right
@ Right
Definition: libmwaw_internal.hxx:176
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MWAWSection.hxx
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MsWrdStruct::Table::getCell
MWAWVariable< Cell > & getCell(int id)
returns the ith Cell
Definition: MsWrdStruct.cxx:425
MWAWSection::m_balanceText
bool m_balanceText
true if the text is balanced between different columns
Definition: MWAWSection.hxx:114
MWAWVariable::get
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
MWAWFont::getUnderline
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:456
MsWrdStruct::Table::operator<<
friend std::ostream & operator<<(std::ostream &o, Table const &table)
operator<<
Definition: MsWrdStruct.cxx:646
MsWrdStruct::Table
the table in a Microsoft Word file
Definition: MsWrdStruct.hxx:173
libmwaw::Left
@ Left
Definition: libmwaw_internal.hxx:176
MWAWTabStop::BAR
@ BAR
Definition: MWAWParagraph.hxx:48
MsWrdStruct::Section
the section structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:118
MWAWInputStream.hxx
MsWrdStruct.hxx
MsWrdStruct::ParagraphInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, ParagraphInfo const &pInfo)
operator<<
Definition: MsWrdStruct.hxx:279
MsWrdStruct::Paragraph::m_modFont
MWAWVariable< Font > m_modFont
font (modifier)
Definition: MsWrdStruct.hxx:371
MsWrdStruct::Paragraph::inTable
bool inTable() const
returns true if we are in table
Definition: MsWrdStruct.hxx:345
MWAWFont.hxx
MWAWFont::flags
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:320
MsWrdStruct::operator<<
std::ostream & operator<<(std::ostream &o, Font const &font)
Definition: MsWrdStruct.cxx:44
MsWrdStruct::Table::Cell
the cells definitions in a Microsoft Word Table
Definition: MsWrdStruct.hxx:198
MWAWTabStop::RIGHT
@ RIGHT
Definition: MWAWParagraph.hxx:48
MsWrdStruct::ParagraphInfo::m_dim
MWAWVariable< MWAWVec2f > m_dim
the zone dimension
Definition: MsWrdStruct.hxx:304
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MWAWParagraph::insert
void insert(MWAWParagraph const &para)
insert the set values of para in the actual paragraph
Definition: MWAWParagraph.cxx:233
MWAWFont::cmp
int cmp(MWAWFont const &oth) const
a comparison function
Definition: MWAWFont.hxx:524
MWAWParagraph::m_extra
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
MsWrdStruct::Font::NumFlags
@ NumFlags
the number of flags needed to store all datas
Definition: MsWrdStruct.hxx:58
MsWrdStruct::Font::m_unknown
MWAWVariable< int > m_unknown
some unknown flag
Definition: MsWrdStruct.hxx:112
MsWrdStruct::Font::m_size
MWAWVariable< float > m_size
a second size
Definition: MsWrdStruct.hxx:104
MsWrdStruct::Paragraph::m_version
int m_version
the file version
Definition: MsWrdStruct.hxx:361
MsWrdStruct::Font::Font
Font()
the constructor
Definition: MsWrdStruct.hxx:61
MsWrdStruct::Section::m_flag
MWAWVariable< int > m_flag
some flag ( in the main position)
Definition: MsWrdStruct.hxx:167
MWAWFont::hiddenBit
@ hiddenBit
Definition: MWAWFont.hxx:191
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
MWAWParagraph::NoBreakWithNextBit
@ NoBreakWithNextBit
Definition: MWAWParagraph.hxx:88
MsWrdStruct::Paragraph::m_tableDef
MWAWVariable< bool > m_tableDef
a table flag
Definition: MsWrdStruct.hxx:379
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
MWAWSection::Column::m_margins
double m_margins[4]
the margins in inches using libmwaw::Position orders
Definition: MWAWSection.hxx:154
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325

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