39 # define MS_WRD_STRUCT 80 friend std::ostream &
operator<<(std::ostream &o,
Font const &font);
86 if (diff)
return diff;
90 if (diff)
return diff;
93 if (diff)
return diff;
98 if (diff)
return diff;
123 , m_paragraphId(-9999)
137 m_id.insert(sec.
m_id);
138 m_type.insert(sec.
m_type);
140 m_col.insert(sec.
m_col);
143 m_flag.insert(sec.
m_flag);
181 , m_columnsWidthMod()
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++)
220 for (
auto const &bd : m_borders)
226 friend std::ostream &
operator<<(std::ostream &o,
Cell const &cell);
266 return *m_numLines!=0;
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;
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];
329 m_tabsRelativeToLeftMargin=
false;
340 void updateParagraphToFinalState(
Paragraph const *style=
nullptr);
342 bool getFont(
Font &font,
Font const *styleFont=
nullptr)
const;
346 return m_inCell.get();
357 return m_info.get().m_numLines.get();
MWAWVariable< int > m_flags[NumFlags]
a list of flags
Definition: MsWrdStruct.hxx:108
the font structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:57
std::string m_extra
extra data
Definition: MsWrdStruct.hxx:232
the number of flags needed to store all datas
Definition: MsWrdStruct.hxx:58
MWAWVariable< float > m_size
a second size
Definition: MsWrdStruct.hxx:104
MWAWVariable< int > m_type
the type
Definition: MsWrdStruct.hxx:302
MWAWVariable< float > m_backColor
the background gray color
Definition: MsWrdStruct.hxx:230
Cell()
constructor
Definition: MsWrdStruct.hxx:200
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:628
bool isLineSet() const
returns true if num lines is set
Definition: MsWrdStruct.hxx:264
ParagraphInfo()
constructor
Definition: MsWrdStruct.hxx:256
MWAWVariable< Table > m_table
the table
Definition: MsWrdStruct.hxx:380
int m_version
the file version
Definition: MsWrdStruct.hxx:360
std::vector< MWAWVariable< MWAWBorder > > m_borders
the borders TLBR
Definition: MsWrdStruct.hxx:228
void insert(Cell const &cell)
update the cell data by merging
Definition: MsWrdStruct.hxx:207
void insert(Font const &font, Font const *styleFont=nullptr)
insert new font data ( beginning by updating font flags )
Definition: MsWrdStruct.cxx:83
MWAWVariable< bool > m_inCell
a cell/textbox
Definition: MsWrdStruct.hxx:376
MWAWVariable< MWAWParagraph::Justification > m_justify
the justification
Definition: MsWrdStruct.hxx:238
Font & operator=(Font const &)=default
Section()
constructor
Definition: MsWrdStruct.hxx:120
void updateFontToFinalState(Font const *styleFont=nullptr)
update the font to obtain the final font
Definition: MsWrdStruct.cxx:99
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:312
MWAWVariable< int > m_paragraphId
the paragraph id
Definition: MsWrdStruct.hxx:159
Table()
constructor
Definition: MsWrdStruct.hxx:176
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:633
Paragraph(int version)
Constructor.
Definition: MsWrdStruct.hxx:314
MWAWVariable< float > m_indent
the indent
Definition: MsWrdStruct.hxx:240
MWAWVariable< MWAWFont > m_font
the font
Definition: MsWrdStruct.hxx:102
MWAWVariable< double > m_interline
the interline if set
Definition: MsWrdStruct.hxx:364
std::vector< float > m_deletedTabs
the delete tabulation
Definition: MsWrdStruct.hxx:366
void insert(Section const &sec)
insert the new values
Definition: MsWrdStruct.hxx:135
Class to store font.
Definition: MWAWFont.hxx:43
a border
Definition: libmwaw_internal.hxx:333
std::string m_error
the errors
Definition: MsWrdStruct.hxx:308
std::string m_extra
the errors
Definition: MsWrdStruct.hxx:250
static Section getSection(const State &state, const long id)
Definition: HanMacWrdKText.cxx:270
int getNumLines() const
returns the number of line stored in m_info or -1
Definition: MsWrdStruct.hxx:355
std::string m_extra
the errors
Definition: MsWrdStruct.hxx:169
std::string m_extra
extra data
Definition: MsWrdStruct.hxx:114
MWAWVariable< int > m_value
a unknown value
Definition: MsWrdStruct.hxx:106
MWAWVariable< float > m_colSep
the spacing between column
Definition: MsWrdStruct.hxx:163
MWAWVariable< bool > m_tableDef
a table flag
Definition: MsWrdStruct.hxx:378
MWAWVariable< std::vector< float > > m_columns
the table columns
Definition: MsWrdStruct.hxx:242
the cells definitions in a Microsoft Word Table
Definition: MsWrdStruct.hxx:198
MWAWVariable< int > m_id
the identificator
Definition: MsWrdStruct.hxx:155
int cmp(Font const &oth) const
a comparison function
Definition: MsWrdStruct.hxx:83
Definition: libmwaw_internal.hxx:335
MWAWVariable< bool > m_colBreak
only a column break
Definition: MsWrdStruct.hxx:165
the paragraph information of a Microsoft Word file (PHE)
Definition: MsWrdStruct.hxx:254
MWAWVariable< ParagraphInfo > m_info
the dimension
Definition: MsWrdStruct.hxx:368
bool inTable() const
returns true if we are in table
Definition: MsWrdStruct.hxx:344
bool hasBorders() const
returns true if the cell has borders
Definition: MsWrdStruct.hxx:218
a class which stores section properties
Definition: MWAWSection.hxx:45
MWAWVariable< int > m_type
the type
Definition: MsWrdStruct.hxx:157
MWAWBorder getBorder(int val, std::string &extra)
generic function use to fill a border using the read data
Definition: MsWrdStruct.cxx:1207
MWAWVariable< MWAWBorder > m_bordersStyle
the border style ( old v3)
Definition: MsWrdStruct.hxx:374
MWAWVariable< std::vector< float > > m_columnsWidthMod
the columns width modifier
Definition: MsWrdStruct.hxx:244
MWAWVariable< int > m_unknown
some unknown flag
Definition: MsWrdStruct.hxx:112
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:118
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:549
MWAWVariable< Cell > m_badCell
empty cell used by getCell to return unknown cell
Definition: MsWrdStruct.hxx:248
bool isEmpty() const
returns true if no data are been set
Definition: MsWrdStruct.hxx:269
class to store the paragraph properties
Definition: MWAWParagraph.hxx:84
std::shared_ptr< MWAWFontConverter > MWAWFontConverterPtr
a smart pointer of MWAWFontConverter
Definition: libmwaw_internal.hxx:541
MWAWVariable< int > m_numLines
the number of lines
Definition: MsWrdStruct.hxx:306
MWAWVariable< int > m_col
the num of columns
Definition: MsWrdStruct.hxx:161
MWAWVariable< long > m_picturePos
a picture file position (if this corresponds to a picture)
Definition: MsWrdStruct.hxx:110
MWAWVariable< Section > m_section
the section
Definition: MsWrdStruct.hxx:372
Font()
the constructor
Definition: MsWrdStruct.hxx:61
the table in a Microsoft Word file
Definition: MsWrdStruct.hxx:173
int cmp(MWAWFont const &oth) const
a comparison function
Definition: MWAWFont.hxx:524
friend std::ostream & operator<<(std::ostream &o, ParagraphInfo const &pInfo)
operator<<
Definition: MsWrdStruct.hxx:279
MWAWVariable< int > m_styleId
the style id (if known)
Definition: MsWrdStruct.hxx:362
MWAWVariable< int > m_flag
some flag ( in the main position)
Definition: MsWrdStruct.hxx:167
MWAWVariable< MWAWVec2f > m_dim
the zone dimension
Definition: MsWrdStruct.hxx:304
MWAWVariable< float > m_height
the row height in inches
Definition: MsWrdStruct.hxx:236
std::vector< MWAWVariable< Cell > > m_cells
the table cells
Definition: MsWrdStruct.hxx:246