22#include <com/sun/star/text/XTextRange.hpp>
40 css::uno::Reference<css::text::XTextRange>
mStart;
45 css::uno::Reference<css::text::XTextRange>
mEnd;
88 const css::uno::Reference<css::text::XTextRange>&
getStart()
const {
return mStart; }
93 const css::uno::Reference<css::text::XTextRange>&
getEnd()
const {
return mEnd; }
111 typedef ::std::vector<CellData::Pointer_t>
Cells;
159 mCells.push_back(pCellData);
162 void endCell(
const css::uno::Reference<css::text::XTextRange>& end)
195 mCells.back()->insertProperties(pProps);
211 const css::uno::Reference<css::text::XTextRange>&
getCellStart(
unsigned int i)
const
221 const css::uno::Reference<css::text::XTextRange>&
getCellEnd(
unsigned int i)
const
233 return mCells[
i]->getProperties();
251 std::vector< sal_uInt32 > nRet;
252 for (
auto const& aCell:
mCells)
253 nRet.push_back(aCell->getGridSpan());
261 mCells.front()->setGridSpan(nSpan);
263 mCells.back()->setGridSpan(nSpan);
274 typedef ::std::vector<RowPointer_t>
Rows;
311 mpRow->insertProperties(pProperties);
333 void endCell(
const css::uno::Reference<css::text::XTextRange>& end)
343 return mpRow->isCellOpen();
353 mpRow->insertCellProperties(pProps);
Class containing the data to describe a table cell.
TablePropertyMapPtr mpProps
Pointer to properties of cell.
void setEnd(css::uno::Reference< css::text::XTextRange > const &end)
Set the end handle of a cell.
sal_uInt32 m_nGridSpan
number of grid columns in the parent table's table grid which this cell defines
css::uno::Reference< css::text::XTextRange > mStart
Handle to start of cell.
CellData(css::uno::Reference< css::text::XTextRange > const &start, TablePropertyMapPtr pProps)
css::uno::Reference< css::text::XTextRange > mEnd
Handle to end of cell.
void insertProperties(TablePropertyMapPtr pProps)
Adds properties to the cell.
tools::SvRef< CellData > Pointer_t
const TablePropertyMapPtr & getProperties() const
Return properties of the cell.
const css::uno::Reference< css::text::XTextRange > & getEnd() const
Return end handle of the cell.
sal_uInt32 getGridSpan() const
void setGridSpan(sal_uInt32 nSpan)
const css::uno::Reference< css::text::XTextRange > & getStart() const
Return start handle of the cell.
Class to handle data of a table row.
sal_uInt32 getGridSpan(sal_uInt32 i)
void endCell(const css::uno::Reference< css::text::XTextRange > &end)
void insertProperties(TablePropertyMapPtr pProperties)
Add properties to the row.
const css::uno::Reference< css::text::XTextRange > & getCellStart(unsigned int i) const
Return start handle of a cell in the row.
void insertCellProperties(TablePropertyMapPtr pProps)
Add properties to the last cell of the row.
TablePropertyMapPtr const & getCellProperties(unsigned int i) const
Return the properties of a cell in the row.
sal_uInt32 m_nGridAfter
number of grid columns in the parent table's table grid which shall be left after the last cell in th...
void setCurrentGridSpan(sal_uInt32 nSpan, bool bFirstCell=false)
TablePropertyMapPtr mpProperties
the properties of the row
void addCell(const css::uno::Reference< css::text::XTextRange > &start, TablePropertyMapPtr pProps, bool bAddBefore=false)
Add a cell to the row.
std::vector< sal_uInt32 > getGridSpans()
::std::vector< CellData::Pointer_t > Cells
const css::uno::Reference< css::text::XTextRange > & getCellEnd(unsigned int i) const
Return end handle of a cell in the row.
sal_uInt32 getGridBefore() const
void setGridBefore(sal_uInt32 nSkipGrids)
void setGridAfter(sal_uInt32 nSkipGrids)
sal_uInt32 getGridAfter() const
Cells mCells
the cell data of the row
tools::SvRef< RowData > Pointer_t
RowData(const RowData &rRowData)
const TablePropertyMapPtr & getProperties() const
Return properties of the row.
sal_uInt32 m_nGridBefore
number of grid columns in the parent table's table grid which must be skipped before the contents of ...
unsigned int getCellCount() const
Return number of cells in the row.
Class that holds the data of a table.
bool isCellOpen() const
Return if the current cell of the current row is open.
RowPointer_t const & getRow(unsigned int i) const
Return row data of a certain row.
unsigned int mnDepth
depth of the current table in a hierarchy of tables
Rows mRows
the data of the rows of the table
unsigned int getDepth() const
Return depth of table in surrounding table hierarchy.
::std::vector< RowPointer_t > Rows
void endRow(TablePropertyMapPtr pProperties)
End the current row.
void addCell(const css::uno::Reference< css::text::XTextRange > &start, TablePropertyMapPtr pProps)
Add a cell to the current row.
unsigned int getRowCount() const
Return number of rows in the table.
RowData::Pointer_t RowPointer_t
void newRow()
initialize mpRow
void endCell(const css::uno::Reference< css::text::XTextRange > &end)
End the current cell of the current row.
const RowPointer_t & getCurrentRow() const
TableData(unsigned int nDepth)
tools::SvRef< TableData > Pointer_t
RowPointer_t mpRow
pointer to the data of the current row (while building up the table data).
void insertCellProperties(TablePropertyMapPtr pProps)
Insert properties to the current cell of the current row.