47 #include "MWAWFont.hxx"
62 for (
int i = 0; i < NumFlags; i++) m_flags[i]=Variable<int>(0);
72 friend std::ostream &
operator<<(std::ostream &o,
Font const &font);
77 if (diff)
return diff;
81 if (diff)
return diff;
84 if (diff)
return diff;
89 if (diff)
return diff;
168 size_t tNumCells = table.
m_cells.size();
169 if (tNumCells >
m_cells.size())
171 for (
size_t i=0; i < tNumCells; i++) {
174 else if (table.
m_cells[i].isSet())
209 size_t cNumBorders = cell.
m_borders.size();
212 for (
size_t i=0; i < cNumBorders; i++)
219 for (
size_t i = 0; i <
m_borders.size(); i++)
225 friend std::ostream &
operator<<(std::ostream &o,
Cell const &cell);
247 if (!
m_dim.isSet())
return true;
248 if ((*
m_dim)[0] > 0 || (*m_dim)[1] > 0)
return false;
256 if (*pInfo.
m_type&0xd0) o <<
"type?=" << ((*pInfo.
m_type&0xd0)>>4) <<
",";
257 if (*pInfo.
m_type&0x0f) o <<
"#unkn=" << (*pInfo.
m_type&0xf) <<
",";
258 if (pInfo.
m_dim.isSet()) {
259 if ((*pInfo.
m_dim)[0] > 0)
260 o <<
"width=" << (*pInfo.
m_dim)[0] <<
",";
261 if ((*pInfo.
m_dim)[1] > 0) {
262 o <<
"height=" << (*pInfo.
m_dim)[1];
311 return m_info.get().m_numLines.get();
the section structure of a Microsoft Word file
Definition: MSWStruct.hxx:109
Variable< Vec2f > m_dim
the zone dimension
Definition: MSWStruct.hxx:278
bool readV3(MWAWInputStreamPtr &input, long endPos)
try to read a data ( v3 code )
Definition: MSWStruct.cxx:233
Variable< Font > m_font
the font
Definition: MSWStruct.hxx:322
std::string m_extra
the errors
Definition: MSWStruct.hxx:151
void updateFontToFinalState(Font const *styleFont=0)
update the font to obtain the final font
Definition: MSWStruct.cxx:98
friend std::ostream & operator<<(std::ostream &o, Paragraph const &ind)
operator<<
Definition: MSWStruct.cxx:1052
std::vector< Variable< Cell > > m_cells
the table cells
Definition: MSWStruct.hxx:198
Variable< bool > m_inCell
a cell/textbox
Definition: MSWStruct.hxx:328
void insert(Variable const &orig)
update the current value if orig is set
Definition: libmwaw_internal.hxx:374
void print(std::ostream &o, MWAWFontConverterPtr converter) const
operator<<
Definition: MSWStruct.cxx:1132
friend std::ostream & operator<<(std::ostream &o, Table const &table)
operator<<
Definition: MSWStruct.cxx:617
void insert(Font const &font, Font const *styleFont=0)
insert new font data ( beginning by updating font flags )
Definition: MSWStruct.cxx:82
the paragraph structure of a Microsoft Word file
Definition: MSWStruct.hxx:286
MWAWBorder getBorder(int val, std::string &extra)
generic function use to fill a border using the read data
Definition: MSWStruct.cxx:1142
Variable< Font > m_modFont
font (modifier)
Definition: MSWStruct.hxx:322
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:403
Variable< float > m_indent
the indent
Definition: MSWStruct.hxx:192
Variable< MWAWBorder > m_bordersStyle
the border style ( old v3)
Definition: MSWStruct.hxx:326
std::string m_extra
extra data
Definition: MSWStruct.hxx:231
Variable< int > m_value
a unknown value
Definition: MSWStruct.hxx:97
the table in a Microsoft Word file
Definition: MSWStruct.hxx:155
the cells definitions in a Microsoft Word Table
Definition: MSWStruct.hxx:203
Variable< MWAWParagraph::Justification > m_justify
the justification
Definition: MSWStruct.hxx:190
the number of flags needed to store all datas
Definition: MSWStruct.hxx:58
Variable< int > m_col
the num of columns
Definition: MSWStruct.hxx:143
bool read(MWAWInputStreamPtr &input, long endPos)
try to read a data
Definition: MSWStruct.cxx:167
Variable< bool > m_colBreak
only a column break
Definition: MSWStruct.hxx:147
Variable< float > m_height
the row height in inches
Definition: MSWStruct.hxx:188
friend std::ostream & operator<<(std::ostream &o, Cell const &cell)
operator<<
Definition: MSWStruct.cxx:599
a border
Definition: libmwaw_internal.hxx:232
Paragraph(int version)
Constructor.
Definition: MSWStruct.hxx:288
Cell()
constructor
Definition: MSWStruct.hxx:205
bool inTable() const
returns true if we are in table
Definition: MSWStruct.hxx:300
bool read(MWAWInputStreamPtr &input, long endPos)
try to read a data
Definition: MSWStruct.cxx:435
Variable< long > m_picturePos
a picture file position (if this corresponds to a picture)
Definition: MSWStruct.hxx:101
MWAWSection getSection(double pageWidth) const
returns a section
Definition: MSWStruct.cxx:150
Variable< 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:154
void insert(ParagraphInfo const &pInfo)
insert the new values
Definition: MSWStruct.cxx:681
std::string m_extra
extra data
Definition: MSWStruct.hxx:105
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: MSWStruct.cxx:44
Variable< float > m_backColor
the table background gray color
Definition: MSWStruct.hxx:194
Definition: libmwaw_internal.hxx:234
Variable< bool > m_tableDef
a table flag
Definition: MSWStruct.hxx:330
Variable< std::vector< float > > m_columns
the table columns
Definition: MSWStruct.hxx:196
a class which stores section properties
Definition: MWAWSection.hxx:45
std::vector< Variable< MWAWBorder > > m_borders
the borders TLBR
Definition: MSWStruct.hxx:227
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:336
void insert(Cell const &cell)
update the cell data by merging
Definition: MSWStruct.hxx:208
the paragraph information of a Microsoft Word file (PHE)
Definition: MSWStruct.hxx:236
Variable< ParagraphInfo > m_info
the dimension
Definition: MSWStruct.hxx:320
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:399
bool isLineSet() const
returns true if num lines is set
Definition: MSWStruct.hxx:241
Variable< Section > m_section
the section
Definition: MSWStruct.hxx:324
ParagraphInfo()
constructor
Definition: MSWStruct.hxx:238
std::string m_error
the errors
Definition: MSWStruct.hxx:282
Variable< float > m_backColor
the background gray color
Definition: MSWStruct.hxx:229
shared_ptr< MWAWFontConverter > MWAWFontConverterPtr
a smart pointer of MWAWFontConverter
Definition: libmwaw_internal.hxx:334
void insert(Table const &table)
insert the new values
Definition: MSWStruct.hxx:162
Variable< float > m_colSep
the spacing between column
Definition: MSWStruct.hxx:145
friend std::ostream & operator<<(std::ostream &o, Section const §ion)
operator<<
Definition: MSWStruct.cxx:406
int m_version
the file version
Definition: MSWStruct.hxx:314
class to store the paragraph properties
Definition: MWAWParagraph.hxx:83
bool getFont(Font &font, Font const *styleFont=0) const
returns the font which correspond to the paragraph if possible
Definition: MSWStruct.cxx:1074
bool read(MWAWInputStreamPtr &input, long endPos)
try to read a data
Definition: MSWStruct.cxx:690
Variable< MWAWFont > m_font
the font
Definition: MSWStruct.hxx:93
the font structure of a Microsoft Word file
Definition: MSWStruct.hxx:57
Font()
the constructor
Definition: MSWStruct.hxx:61
bool hasBorders() const
returns true if the cell has borders
Definition: MSWStruct.hxx:218
Section()
constructor
Definition: MSWStruct.hxx:111
Variable< int > m_flags[NumFlags]
a list of flags
Definition: MSWStruct.hxx:99
void insert(Paragraph const ¶, bool insertModif=true)
insert the new values
Definition: MSWStruct.cxx:1088
Variable< Table > m_table
the table
Definition: MSWStruct.hxx:332
Variable< int > m_unknown
some unknown flag
Definition: MSWStruct.hxx:103
int cmp(Font const &oth) const
operator==
Definition: MSWStruct.hxx:75
bool isEmpty() const
returns true if no data are been set
Definition: MSWStruct.hxx:245
friend std::ostream & operator<<(std::ostream &o, ParagraphInfo const &pInfo)
operator<<
Definition: MSWStruct.hxx:254
Variable< Cell > & getCell(int id)
returns the ith Cell
Definition: MSWStruct.cxx:424
bool read(MWAWInputStreamPtr &input, long endPos, int vers)
try to read a data
Definition: MSWStruct.cxx:666
Variable< int > m_styleId
the style id (if known)
Definition: MSWStruct.hxx:316
Variable< int > m_paragraphId
the paragraph id
Definition: MSWStruct.hxx:141
Variable< int > m_numLines
the number of lines
Definition: MSWStruct.hxx:280
void insert(Section const &sec)
insert the new values
Definition: MSWStruct.hxx:118
Variable< int > m_type
the type
Definition: MSWStruct.hxx:276
int getNumLines() const
returns the number of line stored in m_info or -1
Definition: MSWStruct.hxx:310
Variable< std::vector< float > > m_deletedTabs
the delete tabulation
Definition: MSWStruct.hxx:318
Variable< int > m_id
the identificator
Definition: MSWStruct.hxx:137
Variable< float > m_size
a second size
Definition: MSWStruct.hxx:95
std::string m_extra
the errors
Definition: MSWStruct.hxx:200
Variable< int > m_type
the type
Definition: MSWStruct.hxx:139
Variable< int > m_flag
some flag ( in the main position)
Definition: MSWStruct.hxx:149
Table()
constructor
Definition: MSWStruct.hxx:158