20#ifndef INCLUDED_SVX_SOURCE_INC_TABLEMODEL_HXX
21#define INCLUDED_SVX_SOURCE_INC_TABLEMODEL_HXX
24#include <com/sun/star/util/XBroadcaster.hpp>
25#include <com/sun/star/table/XTable.hpp>
41 virtual sal_Int32 getLeft() = 0;
42 virtual sal_Int32 getTop() = 0;
43 virtual sal_Int32 getRight() = 0;
44 virtual sal_Int32 getBottom() = 0;
45 virtual css::uno::Reference< css::table::XTable > getTable() = 0;
51typedef ::cppu::WeakComponentImplHelper< css::table::XTable, css::util::XBroadcaster >
TableModelBase;
74 void init( sal_Int32 nColumns, sal_Int32 nRows );
82 void merge( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan );
89 virtual sal_Int32
getLeft()
override;
90 virtual sal_Int32
getTop()
override;
91 virtual sal_Int32
getRight()
override;
93 virtual css::uno::Reference< css::table::XTable >
getTable()
override;
96 virtual css::uno::Reference< css::table::XCellCursor > SAL_CALL
createCursor( )
override;
97 virtual css::uno::Reference< css::table::XCellCursor > SAL_CALL
createCursorByRange(
const css::uno::Reference< css::table::XCellRange >& rRange )
override;
98 virtual ::sal_Int32 SAL_CALL
getRowCount()
override;
102 virtual void SAL_CALL
dispose( )
override;
109 virtual void SAL_CALL
addModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
110 virtual void SAL_CALL
removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
113 virtual css::uno::Reference< css::table::XTableColumns > SAL_CALL
getColumns()
override;
114 virtual css::uno::Reference< css::table::XTableRows > SAL_CALL
getRows()
override;
117 virtual css::uno::Reference< css::table::XCell > SAL_CALL
getCellByPosition( ::sal_Int32 nColumn, ::sal_Int32 nRow )
override;
118 virtual css::uno::Reference< css::table::XCellRange > SAL_CALL
getCellRangeByPosition( ::sal_Int32 nLeft, ::sal_Int32 nTop, ::sal_Int32 nRight, ::sal_Int32 nBottom )
override;
119 virtual css::uno::Reference< css::table::XCellRange > SAL_CALL
getCellRangeByName(
const OUString& aRange )
override;
122 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo( )
override;
123 virtual void SAL_CALL
setPropertyValue(
const OUString& aPropertyName,
const css::uno::Any& aValue )
override;
124 virtual css::uno::Any SAL_CALL
getPropertyValue(
const OUString& PropertyName )
override;
125 virtual void SAL_CALL
addPropertyChangeListener(
const OUString& aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener )
override;
126 virtual void SAL_CALL
removePropertyChangeListener(
const OUString& aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener )
override;
127 virtual void SAL_CALL
addVetoableChangeListener(
const OUString& PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener )
override;
128 virtual void SAL_CALL
removeVetoableChangeListener(
const OUString& PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener )
override;
131 virtual void SAL_CALL
setFastPropertyValue( ::sal_Int32 nHandle,
const css::uno::Any& aValue )
override;
143 void insertRows( sal_Int32 nIndex, sal_Int32 nCount );
144 void removeRows( sal_Int32 nIndex, sal_Int32 nCount );
161 virtual void SAL_CALL
disposing()
override;
189 :
mxBroadcaster( static_cast< css::util::XBroadcaster* >( pModel ) )
TableModelNotifyGuard(TableModel *pModel)
css::uno::Reference< css::util::XBroadcaster > mxBroadcaster
SdrTableObj * getSdrTableObj() const
void insertRows(sal_Int32 nIndex, sal_Int32 nCount)
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
rtl::Reference< TableRows > mxTableRows
virtual css::uno::Reference< css::table::XTableColumns > SAL_CALL getColumns() override
virtual sal_Bool SAL_CALL isModified() override
void notifyModification()
void insertColumns(sal_Int32 nIndex, sal_Int32 nCount)
virtual void SAL_CALL lockBroadcasts() override
void removeRows(sal_Int32 nIndex, sal_Int32 nCount)
virtual ::sal_Int32 SAL_CALL getColumnCount() override
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition(::sal_Int32 nColumn, ::sal_Int32 nRow) override
sal_Int32 getRowCountImpl() const
virtual css::uno::Any SAL_CALL getFastPropertyValue(::sal_Int32 nHandle) override
virtual ~TableModel() override
void init(sal_Int32 nColumns, sal_Int32 nRows)
virtual sal_Int32 getRight() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
TableColumnRef const & getColumn(sal_Int32 nColumn) const
virtual void SAL_CALL setFastPropertyValue(::sal_Int32 nHandle, const css::uno::Any &aValue) override
virtual css::uno::Reference< css::table::XTable > getTable() override
CellRef getCell(::sal_Int32 nCol, ::sal_Int32 nRow) const
virtual void SAL_CALL setModified(sal_Bool bModified) override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition(::sal_Int32 nLeft, ::sal_Int32 nTop, ::sal_Int32 nRight, ::sal_Int32 nBottom) override
virtual css::uno::Reference< css::table::XCellCursor > SAL_CALL createCursorByRange(const css::uno::Reference< css::table::XCellRange > &rRange) override
void merge(sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan)
merges the cell at the given position with the given span
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Reference< css::table::XTableRows > SAL_CALL getRows() override
virtual void SAL_CALL unlockBroadcasts() override
virtual sal_Int32 getLeft() override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName(const OUString &aRange) override
void UndoInsertColumns(sal_Int32 nIndex, sal_Int32 nCount)
TableRowRef const & getRow(sal_Int32 nRow) const
std::vector< sal_Int32 > getColumnWidths()
Get the width of all columns in this table.
virtual sal_Int32 getBottom() override
virtual css::uno::Reference< css::table::XCellCursor > SAL_CALL createCursor() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual void SAL_CALL dispose() override
virtual sal_Int32 getTop() override
virtual void SAL_CALL disposing() override
this function is called upon disposing the component
void removeColumns(sal_Int32 nIndex, sal_Int32 nCount)
void optimize()
deletes rows and columns that are completely merged.
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
rtl::Reference< TableColumns > mxTableColumns
TableModel(SdrTableObj *pTableObj)
void UndoInsertRows(sal_Int32 nIndex, sal_Int32 nCount)
sal_Int32 getColumnCountImpl() const
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
void UndoRemoveColumns(sal_Int32 nIndex, ColumnVector &aNewCols, CellVector &aCells)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual ::sal_Int32 SAL_CALL getRowCount() override
void dumpAsXml(xmlTextWriterPtr pWriter) const
void UndoRemoveRows(sal_Int32 nIndex, RowVector &aNewRows)
struct _xmlTextWriter * xmlTextWriterPtr
std::vector< CellRef > CellVector
class SAL_LOPLUGIN_ANNOTATE("crosscast") ICellRange
base class for each object implementing an XCellRange
std::vector< TableColumnRef > ColumnVector
std::vector< TableRowRef > RowVector
::cppu::WeakComponentImplHelper< css::table::XTable, css::util::XBroadcaster > TableModelBase
struct _xmlTextWriter * xmlTextWriterPtr