39 # define MS_WRD_STRUCT 63 for (
int i = 0; i < NumFlags; i++) m_flags[i]=MWAWVariable<int>(0);
73 friend std::ostream &
operator<<(std::ostream &o,
Font const &font);
79 if (diff)
return diff;
83 if (diff)
return diff;
86 if (diff)
return diff;
91 if (diff)
return diff;
113 Section() : m_id(-1), m_type(0), m_paragraphId(-9999), m_col(1),
114 m_colSep(0.5), m_colBreak(false), m_flag(0),
m_extra(
"")
123 m_id.insert(sec.
m_id);
124 m_type.insert(sec.
m_type);
126 m_col.insert(sec.
m_col);
129 m_flag.insert(sec.
m_flag);
163 m_columns(), m_columnsWidthMod(), m_cells(), m_badCell(),
m_extra(
"")
185 size_t cNumBorders = cell.
m_borders.size();
186 if (cNumBorders > m_borders.size())
187 m_borders.resize(cNumBorders);
188 for (
size_t i=0; i < cNumBorders; i++)
196 for (
size_t i = 0; i < m_borders.size(); i++)
202 friend std::ostream &
operator<<(std::ostream &o,
Cell const &cell);
238 return *m_numLines!=0;
243 if (*m_numLines || *m_type)
return false;
244 if (!m_dim.isSet())
return true;
245 if ((*m_dim)[0] > 0 || (*m_dim)[1] > 0)
return false;
254 if (*pInfo.
m_type&0xd0) o <<
"type?=" << ((*pInfo.
m_type&0xd0)>>4) <<
",";
255 if (*pInfo.
m_type&0x0f) o <<
"#unkn=" << (*pInfo.
m_type&0xf) <<
",";
256 if (pInfo.
m_dim.isSet()) {
257 if ((*pInfo.
m_dim)[0] > 0)
258 o <<
"width=" << (*pInfo.
m_dim)[0] <<
",";
259 if ((*pInfo.
m_dim)[1] > 0) {
260 o <<
"height=" << (*pInfo.
m_dim)[1];
287 m_interline(0), m_deletedTabs(), m_info(),
m_font(), m_modFont(), m_section(),
288 m_bordersStyle(), m_inCell(false), m_tableDef(false), m_table()
290 m_tabsRelativeToLeftMargin=
false;
299 void updateParagraphToFinalState(
Paragraph const *style=0);
301 bool getFont(
Font &font,
Font const *styleFont=0)
const;
305 return m_inCell.get();
316 return m_info.get().m_numLines.get();
MWAWVariable< int > m_flags[NumFlags]
a list of flags
Definition: MsWrdStruct.hxx:101
bool hasBorders() const
returns true if the cell has borders
Definition: MsWrdStruct.hxx:194
the font structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:57
std::string m_extra
extra data
Definition: MsWrdStruct.hxx:208
the number of flags needed to store all datas
Definition: MsWrdStruct.hxx:58
MWAWVariable< float > m_size
a second size
Definition: MsWrdStruct.hxx:97
MWAWVariable< int > m_type
the type
Definition: MsWrdStruct.hxx:274
MWAWVariable< float > m_backColor
the background gray color
Definition: MsWrdStruct.hxx:206
Cell()
constructor
Definition: MsWrdStruct.hxx:179
ParagraphInfo()
constructor
Definition: MsWrdStruct.hxx:232
MWAWVariable< Table > m_table
the table
Definition: MsWrdStruct.hxx:339
int m_version
the file version
Definition: MsWrdStruct.hxx:319
std::vector< MWAWVariable< MWAWBorder > > m_borders
the borders TLBR
Definition: MsWrdStruct.hxx:204
void insert(Cell const &cell)
update the cell data by merging
Definition: MsWrdStruct.hxx:183
bool inTable() const
returns true if we are in table
Definition: MsWrdStruct.hxx:303
MWAWVariable< bool > m_inCell
a cell/textbox
Definition: MsWrdStruct.hxx:335
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:578
MWAWVariable< MWAWParagraph::Justification > m_justify
the justification
Definition: MsWrdStruct.hxx:214
Section()
constructor
Definition: MsWrdStruct.hxx:113
void insert(Font const &font, Font const *styleFont=0)
insert new font data ( beginning by updating font flags )
Definition: MsWrdStruct.cxx:82
namespace to store the main structure which appears in a Microsoft Word 3.0-5.0 file ...
Definition: MsWrdStruct.cxx:41
the paragraph structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:284
MWAWVariable< int > m_paragraphId
the paragraph id
Definition: MsWrdStruct.hxx:145
Table()
constructor
Definition: MsWrdStruct.hxx:162
Paragraph(int version)
Constructor.
Definition: MsWrdStruct.hxx:286
MWAWVariable< float > m_indent
the indent
Definition: MsWrdStruct.hxx:216
MWAWVariable< MWAWFont > m_font
the font
Definition: MsWrdStruct.hxx:95
MWAWVariable< double > m_interline
the interline if set
Definition: MsWrdStruct.hxx:323
std::vector< float > m_deletedTabs
the delete tabulation
Definition: MsWrdStruct.hxx:325
void insert(Section const &sec)
insert the new values
Definition: MsWrdStruct.hxx:121
Class to store font.
Definition: MWAWFont.hxx:43
a border
Definition: libmwaw_internal.hxx:314
std::string m_error
the errors
Definition: MsWrdStruct.hxx:280
int getNumLines() const
returns the number of line stored in m_info or -1
Definition: MsWrdStruct.hxx:314
std::string m_extra
the errors
Definition: MsWrdStruct.hxx:226
std::string m_extra
the errors
Definition: MsWrdStruct.hxx:155
std::string m_extra
extra data
Definition: MsWrdStruct.hxx:107
MWAWVariable< int > m_value
a unknown value
Definition: MsWrdStruct.hxx:99
MWAWVariable< float > m_colSep
the spacing between column
Definition: MsWrdStruct.hxx:149
MWAWVariable< bool > m_tableDef
a table flag
Definition: MsWrdStruct.hxx:337
bool isEmpty() const
returns true if no data are been set
Definition: MsWrdStruct.hxx:241
MWAWVariable< std::vector< float > > m_columns
the table columns
Definition: MsWrdStruct.hxx:218
the cells definitions in a Microsoft Word Table
Definition: MsWrdStruct.hxx:177
int cmp(MWAWFont const &oth) const
a comparison function
Definition: MWAWFont.hxx:498
MWAWVariable< int > m_id
the identificator
Definition: MsWrdStruct.hxx:141
Definition: libmwaw_internal.hxx:316
MWAWVariable< bool > m_colBreak
only a column break
Definition: MsWrdStruct.hxx:151
the paragraph information of a Microsoft Word file (PHE)
Definition: MsWrdStruct.hxx:230
MWAWVariable< ParagraphInfo > m_info
the dimension
Definition: MsWrdStruct.hxx:327
a class which stores section properties
Definition: MWAWSection.hxx:45
MWAWVariable< int > m_type
the type
Definition: MsWrdStruct.hxx:143
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:500
MWAWBorder getBorder(int val, std::string &extra)
generic function use to fill a border using the read data
Definition: MsWrdStruct.cxx:1215
MWAWVariable< MWAWBorder > m_bordersStyle
the border style ( old v3)
Definition: MsWrdStruct.hxx:333
MWAWVariable< std::vector< float > > m_columnsWidthMod
the columns width modifier
Definition: MsWrdStruct.hxx:220
MWAWVariable< int > m_unknown
some unknown flag
Definition: MsWrdStruct.hxx:105
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: MsWrdStruct.cxx:44
the section structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:111
shared_ptr< MWAWFontConverter > MWAWFontConverterPtr
a smart pointer of MWAWFontConverter
Definition: libmwaw_internal.hxx:494
MWAWVariable< Cell > m_badCell
empty cell used by getCell to return unknown cell
Definition: MsWrdStruct.hxx:224
class to store the paragraph properties
Definition: MWAWParagraph.hxx:81
MWAWVariable< int > m_numLines
the number of lines
Definition: MsWrdStruct.hxx:278
MWAWVariable< int > m_col
the num of columns
Definition: MsWrdStruct.hxx:147
MWAWVariable< long > m_picturePos
a picture file position (if this corresponds to a picture)
Definition: MsWrdStruct.hxx:103
bool isLineSet() const
returns true if num lines is set
Definition: MsWrdStruct.hxx:236
MWAWVariable< Section > m_section
the section
Definition: MsWrdStruct.hxx:331
Font()
the constructor
Definition: MsWrdStruct.hxx:61
int cmp(Font const &oth) const
a comparison function
Definition: MsWrdStruct.hxx:76
the table in a Microsoft Word file
Definition: MsWrdStruct.hxx:159
friend std::ostream & operator<<(std::ostream &o, ParagraphInfo const &pInfo)
operator<<
Definition: MsWrdStruct.hxx:251
MWAWVariable< int > m_styleId
the style id (if known)
Definition: MsWrdStruct.hxx:321
MWAWVariable< int > m_flag
some flag ( in the main position)
Definition: MsWrdStruct.hxx:153
MWAWVariable< MWAWVec2f > m_dim
the zone dimension
Definition: MsWrdStruct.hxx:276
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:583
void updateFontToFinalState(Font const *styleFont=0)
update the font to obtain the final font
Definition: MsWrdStruct.cxx:98
MWAWVariable< float > m_height
the row height in inches
Definition: MsWrdStruct.hxx:212
std::vector< MWAWVariable< Cell > > m_cells
the table cells
Definition: MsWrdStruct.hxx:222