40 #ifndef MWAW_TABLE_HELPER
41 # define MWAW_TABLE_HELPER
80 o <<
"box=" << cell.
m_box <<
",";
112 if (diffF < 0)
return true;
113 if (diffF > 0)
return false;
115 if (diff)
return (diff < 0);
118 if (diffF < 0)
return true;
119 if (diffF > 0)
return false;
145 void add(shared_ptr<MWAWTableCell> cell) {
154 shared_ptr<MWAWTableCell>
get(
int id);
void setBox(Box2f const &dim)
set the bounding box (units in point)
Definition: MWAWTable.hxx:65
MWAWTable()
the constructor
Definition: MWAWTable.hxx:139
Vec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:719
std::vector< shared_ptr< MWAWTableCell > > m_cellsList
the list of cells
Definition: MWAWTable.hxx:175
Vec2i m_position
the final position in the table
Definition: MWAWTable.hxx:132
a virtual structure used to store/send a cell to a listener
Definition: MWAWTable.hxx:55
Definition: MWAWTable.hxx:135
a comparaison structure used retrieve the rows and the columns
Definition: MWAWTable.hxx:92
shared_ptr< MWAWContentListener > MWAWContentListenerPtr
Definition: MWAWContentListener.hxx:260
virtual bool send(MWAWContentListenerPtr listener)=0
call when a cell must be send
float getPos(int coord) const
Definition: MWAWTable.hxx:97
int m_coord
the coord to compare
Definition: MWAWTable.hxx:124
Vec2< T > const & max() const
the maximum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:723
void add(shared_ptr< MWAWTableCell > cell)
add a new cells
Definition: MWAWTable.hxx:145
virtual ~MWAWTable()
the destructor
Definition: MWAWTable.cxx:52
T x() const
first element
Definition: libmwaw_internal.hxx:395
friend std::ostream & operator<<(std::ostream &o, MWAWTableCell const &cell)
operator<<
Definition: MWAWTable.hxx:74
MWAWTableCell const * m_cell
Definition: MWAWTable.hxx:106
virtual bool sendContent(MWAWContentListenerPtr listener)=0
call when the content of a cell must be send
bool sendAsText(MWAWContentListenerPtr listener)
try to send the table as basic text
Definition: MWAWTable.cxx:217
MWAWTableCell()
constructor
Definition: MWAWTable.hxx:60
std::vector< float > m_rowsSize
the final row and col size (in point)
Definition: MWAWTable.hxx:177
small structure to define a cell point
Definition: MWAWTable.hxx:95
Box2f const & box() const
return the bounding box
Definition: MWAWTable.hxx:69
bool sendTable(MWAWContentListenerPtr listener)
try to send the table
Definition: MWAWTable.cxx:153
std::vector< float > m_colsSize
Definition: MWAWTable.hxx:177
bool operator()(Point const &c1, Point const &c2) const
comparaison function
Definition: MWAWTable.hxx:110
Vec2i m_numberCellSpanned
the number of cell span
Definition: MWAWTable.hxx:132
virtual ~MWAWTableCell()
destructor
Definition: MWAWTable.hxx:63
Definition: MWAWContentListener.hxx:68
virtual void sendPreTableData(MWAWContentListenerPtr)
a function called just before calling listener->openTable(), to insert extra data ...
Definition: MWAWTable.hxx:165
bool buildStructures()
create the correspondance list, ...
Definition: MWAWTable.cxx:67
Point(int wh, MWAWTableCell const *cell)
Definition: MWAWTable.hxx:96
Vec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:743
int m_which
Definition: MWAWTable.hxx:105
Box2f m_box
the cell bounding box (unit in point)
Definition: MWAWTable.hxx:129
Compare(int dim)
Definition: MWAWTable.hxx:93
float getSize(int coord) const
Definition: MWAWTable.hxx:102
int numCells() const
returns the number of cell
Definition: MWAWTable.hxx:150