LibreOffice Module svx (master) 1
|
#include <tablemodel.hxx>
Public Member Functions | |
TableModel (SdrTableObj *pTableObj) | |
TableModel (SdrTableObj *pTableObj, const TableModelRef &xSourceTable) | |
virtual | ~TableModel () override |
void | init (sal_Int32 nColumns, sal_Int32 nRows) |
SdrTableObj * | getSdrTableObj () const |
void | optimize () |
deletes rows and columns that are completely merged. More... | |
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 More... | |
std::vector< sal_Int32 > | getColumnWidths () |
Get the width of all columns in this table. More... | |
void | dumpAsXml (xmlTextWriterPtr pWriter) const |
virtual sal_Int32 | getLeft () override |
virtual sal_Int32 | getTop () override |
virtual sal_Int32 | getRight () override |
virtual sal_Int32 | getBottom () override |
virtual css::uno::Reference< css::table::XTable > | getTable () override |
virtual css::uno::Reference< css::table::XCellCursor > SAL_CALL | createCursor () override |
virtual css::uno::Reference< css::table::XCellCursor > SAL_CALL | createCursorByRange (const css::uno::Reference< css::table::XCellRange > &rRange) override |
virtual ::sal_Int32 SAL_CALL | getRowCount () override |
virtual ::sal_Int32 SAL_CALL | getColumnCount () override |
virtual void SAL_CALL | dispose () override |
virtual sal_Bool SAL_CALL | isModified () override |
virtual void SAL_CALL | setModified (sal_Bool bModified) override |
virtual void SAL_CALL | addModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override |
virtual void SAL_CALL | removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override |
virtual css::uno::Reference< css::table::XTableColumns > SAL_CALL | getColumns () override |
virtual css::uno::Reference< css::table::XTableRows > SAL_CALL | getRows () override |
virtual css::uno::Reference< css::table::XCell > SAL_CALL | getCellByPosition (::sal_Int32 nColumn, ::sal_Int32 nRow) 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::XCellRange > SAL_CALL | getCellRangeByName (const OUString &aRange) override |
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | getPropertySetInfo () override |
virtual void SAL_CALL | setPropertyValue (const OUString &aPropertyName, const css::uno::Any &aValue) override |
virtual css::uno::Any SAL_CALL | getPropertyValue (const OUString &PropertyName) override |
virtual void SAL_CALL | addPropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override |
virtual void SAL_CALL | removePropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override |
virtual void SAL_CALL | addVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override |
virtual void SAL_CALL | removeVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override |
virtual void SAL_CALL | setFastPropertyValue (::sal_Int32 nHandle, const css::uno::Any &aValue) override |
virtual css::uno::Any SAL_CALL | getFastPropertyValue (::sal_Int32 nHandle) override |
virtual void SAL_CALL | lockBroadcasts () override |
virtual void SAL_CALL | unlockBroadcasts () override |
Private Member Functions | |
void | notifyModification () |
void | insertColumns (sal_Int32 nIndex, sal_Int32 nCount) |
void | removeColumns (sal_Int32 nIndex, sal_Int32 nCount) |
void | insertRows (sal_Int32 nIndex, sal_Int32 nCount) |
void | removeRows (sal_Int32 nIndex, sal_Int32 nCount) |
sal_Int32 | getRowCountImpl () const |
sal_Int32 | getColumnCountImpl () const |
CellRef | createCell () |
CellRef | getCell (::sal_Int32 nCol, ::sal_Int32 nRow) const |
void | UndoInsertRows (sal_Int32 nIndex, sal_Int32 nCount) |
void | UndoRemoveRows (sal_Int32 nIndex, RowVector &aNewRows) |
void | UndoInsertColumns (sal_Int32 nIndex, sal_Int32 nCount) |
void | UndoRemoveColumns (sal_Int32 nIndex, ColumnVector &aNewCols, CellVector &aCells) |
virtual void SAL_CALL | disposing () override |
this function is called upon disposing the component More... | |
TableRowRef const & | getRow (sal_Int32 nRow) const |
TableColumnRef const & | getColumn (sal_Int32 nColumn) const |
void | updateRows () |
void | updateColumns () |
Private Attributes | |
RowVector | maRows |
ColumnVector | maColumns |
rtl::Reference< TableColumns > | mxTableColumns |
rtl::Reference< TableRows > | mxTableRows |
SdrTableObj * | mpTableObj |
bool | mbModified |
bool | mbNotifyPending |
sal_Int32 | mnNotifyLock |
Friends | |
class | InsertRowUndo |
class | RemoveRowUndo |
class | InsertColUndo |
class | RemoveColUndo |
class | TableColumnUndo |
class | TableRowUndo |
class | TableColumn |
class | TableRow |
class | TableRows |
class | TableColumns |
class | TableModelNotifyGuard |
Additional Inherited Members | |
Protected Attributes inherited from cppu::BaseMutex | |
mutable::osl::Mutex | m_aMutex |
Definition at line 53 of file tablemodel.hxx.
|
explicit |
Definition at line 97 of file tablemodel.cxx.
References m_aMutex.
sdr::table::TableModel::TableModel | ( | SdrTableObj * | pTableObj, |
const TableModelRef & | xSourceTable | ||
) |
|
overridevirtual |
Definition at line 142 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 349 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 440 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 450 of file tablemodel.cxx.
|
private |
Definition at line 581 of file tablemodel.cxx.
References sdr::table::SdrTableObj::createCell(), and mpTableObj.
|
overridevirtual |
Definition at line 275 of file tablemodel.cxx.
References createCursorByRange().
|
overridevirtual |
|
overridevirtual |
Definition at line 318 of file tablemodel.cxx.
|
overrideprivatevirtual |
this function is called upon disposing the component
Definition at line 490 of file tablemodel.cxx.
References maColumns, maRows, mpTableObj, mxTableColumns, and mxTableRows.
void sdr::table::TableModel::dumpAsXml | ( | xmlTextWriterPtr | pWriter | ) | const |
Definition at line 1108 of file tablemodel.cxx.
References getColumnCountImpl(), getRowCountImpl(), and maRows.
|
overridevirtual |
Definition at line 190 of file tablemodel.cxx.
References getRowCount().
|
private |
Definition at line 567 of file tablemodel.cxx.
References getColumnCountImpl(), getRowCountImpl(), and maRows.
Referenced by getCellByPosition(), insertColumns(), insertRows(), removeColumns(), removeRows(), and TableModel().
|
overridevirtual |
Definition at line 387 of file tablemodel.cxx.
References getCell().
Referenced by merge(), and optimize().
|
overridevirtual |
Definition at line 413 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 399 of file tablemodel.cxx.
References getColumnCountImpl(), getRowCountImpl(), and xModel.
|
private |
css::lang::IndexOutOfBoundsException |
Definition at line 949 of file tablemodel.cxx.
References getColumnCountImpl(), and maColumns.
|
override |
Definition at line 301 of file tablemodel.cxx.
References getColumnCountImpl().
Referenced by getRight(), and merge().
|
private |
Definition at line 484 of file tablemodel.cxx.
References maColumns.
Referenced by dumpAsXml(), getCell(), getCellRangeByPosition(), getColumn(), getColumnCount(), insertRows(), optimize(), removeColumns(), and removeRows().
|
overridevirtual |
Definition at line 364 of file tablemodel.cxx.
References mxTableColumns, and TableColumns.
std::vector< sal_Int32 > sdr::table::TableModel::getColumnWidths | ( | ) |
Get the width of all columns in this table.
Definition at line 307 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 468 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 172 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 422 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 434 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 184 of file tablemodel.cxx.
References getColumnCount().
|
private |
css::lang::IndexOutOfBoundsException |
Definition at line 940 of file tablemodel.cxx.
References getRowCountImpl(), and maRows.
|
override |
Definition at line 295 of file tablemodel.cxx.
References getRowCountImpl().
Referenced by getBottom(), and merge().
|
private |
Definition at line 478 of file tablemodel.cxx.
References maRows.
Referenced by dumpAsXml(), getCell(), getCellRangeByPosition(), getRow(), getRowCount(), insertColumns(), optimize(), removeColumns(), removeRows(), UndoInsertColumns(), and UndoRemoveColumns().
|
overridevirtual |
Definition at line 374 of file tablemodel.cxx.
References mxTableRows, and TableRows.
|
inline |
Definition at line 76 of file tablemodel.hxx.
References mpTableObj.
|
overridevirtual |
Definition at line 196 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 178 of file tablemodel.cxx.
void sdr::table::TableModel::init | ( | sal_Int32 | nColumns, |
sal_Int32 | nRows | ||
) |
Definition at line 147 of file tablemodel.cxx.
References maColumns, maRows, TableColumn, and TableRow.
Referenced by TableModel().
|
private |
Definition at line 590 of file tablemodel.cxx.
References SdrModel::AddUndo(), SdrModel::BegUndo(), SdrUndoFactory::CreateUndoGeoObject(), SdrModel::EndUndo(), getCell(), getRowCountImpl(), SdrObject::getSdrModelFromSdrObject(), SdrModel::GetSdrUndoFactory(), SdrObject::IsInserted(), SdrModel::IsUndoEnabled(), maColumns, maRows, merge(), mpTableObj, nCount, nIndex, SdrModel::SetChanged(), setModified(), SvxResId(), TableColumn, TOOLS_WARN_EXCEPTION, and updateColumns().
|
private |
Definition at line 780 of file tablemodel.cxx.
References SdrModel::AddUndo(), SdrModel::BegUndo(), SdrUndoFactory::CreateUndoGeoObject(), SdrModel::EndUndo(), getCell(), getColumnCountImpl(), SdrObject::getSdrModelFromSdrObject(), SdrModel::GetSdrUndoFactory(), SdrObject::IsInserted(), SdrModel::IsUndoEnabled(), maRows, merge(), mpTableObj, nCount, nIndex, SdrModel::SetChanged(), setModified(), SvxResId(), TableRow, TOOLS_WARN_EXCEPTION, and updateRows().
|
overridevirtual |
Definition at line 328 of file tablemodel.cxx.
References mbModified.
|
overridevirtual |
Definition at line 525 of file tablemodel.cxx.
References mnNotifyLock.
void sdr::table::TableModel::merge | ( | sal_Int32 | nCol, |
sal_Int32 | nRow, | ||
sal_Int32 | nColSpan, | ||
sal_Int32 | nRowSpan | ||
) |
merges the cell at the given position with the given span
Definition at line 1046 of file tablemodel.cxx.
References get(), getCellByPosition(), getColumnCount(), getRowCount(), SdrObject::getSdrModelFromSdrObject(), SdrObject::IsInserted(), SdrModel::IsUndoEnabled(), and mpTableObj.
Referenced by insertColumns(), and insertRows().
|
private |
Definition at line 545 of file tablemodel.cxx.
References cppu::BaseMutex::m_aMutex, mbNotifyPending, mnNotifyLock, mpTableObj, and cppu::OInterfaceContainerHelper::notifyEach().
Referenced by setModified(), and unlockBroadcasts().
void sdr::table::TableModel::optimize | ( | ) |
deletes rows and columns that are completely merged.
Must be called between BegUndo/EndUndo!
Definition at line 959 of file tablemodel.cxx.
References get(), getCellByPosition(), getColumnCountImpl(), getRowCountImpl(), maColumns, maRows, removeColumns(), removeRows(), o3tl::saturating_add(), setModified(), TOOLS_WARN_EXCEPTION, and u.
|
private |
Definition at line 668 of file tablemodel.cxx.
References SdrModel::AddUndo(), SdrModel::BegUndo(), SdrUndoFactory::CreateUndoGeoObject(), SdrModel::EndUndo(), getCell(), getColumnCountImpl(), getRowCountImpl(), SdrObject::getSdrModelFromSdrObject(), SdrModel::GetSdrUndoFactory(), SdrObject::IsInserted(), SdrModel::IsUndoEnabled(), maColumns, maRows, mpTableObj, nCount, nIndex, SdrModel::SetChanged(), setModified(), SvxResId(), TOOLS_WARN_EXCEPTION, and updateColumns().
Referenced by optimize().
|
overridevirtual |
Definition at line 355 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 445 of file tablemodel.cxx.
|
private |
Definition at line 842 of file tablemodel.cxx.
References SdrModel::AddUndo(), SdrModel::BegUndo(), SdrUndoFactory::CreateUndoGeoObject(), SdrModel::EndUndo(), getCell(), getColumnCountImpl(), getRowCountImpl(), SdrObject::getSdrModelFromSdrObject(), SdrModel::GetSdrUndoFactory(), SdrObject::IsInserted(), SdrModel::IsUndoEnabled(), maRows, mpTableObj, nCount, nIndex, SdrModel::SetChanged(), setModified(), SvxResId(), TOOLS_WARN_EXCEPTION, and updateRows().
Referenced by optimize().
|
overridevirtual |
Definition at line 455 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 463 of file tablemodel.cxx.
|
overridevirtual |
Definition at line 335 of file tablemodel.cxx.
References mbModified, and notifyModification().
Referenced by insertColumns(), insertRows(), optimize(), removeColumns(), removeRows(), UndoInsertColumns(), UndoInsertRows(), UndoRemoveColumns(), and UndoRemoveRows().
|
overridevirtual |
Definition at line 429 of file tablemodel.cxx.
|
private |
Definition at line 229 of file tablemodel.cxx.
References getRowCountImpl(), maColumns, maRows, nCount, nIndex, setModified(), and updateColumns().
|
private |
Definition at line 202 of file tablemodel.cxx.
References maRows, nCount, nIndex, setModified(), and updateRows().
|
private |
Definition at line 244 of file tablemodel.cxx.
References DBG_ASSERT, getRowCountImpl(), maColumns, maRows, nCount, nIndex, setModified(), and updateColumns().
|
private |
Definition at line 213 of file tablemodel.cxx.
References maRows, nCount, nIndex, setModified(), and updateRows().
|
overridevirtual |
Definition at line 532 of file tablemodel.cxx.
References mbNotifyPending, mnNotifyLock, and notifyModification().
|
private |
Definition at line 1099 of file tablemodel.cxx.
References maColumns.
Referenced by insertColumns(), removeColumns(), UndoInsertColumns(), and UndoRemoveColumns().
|
private |
Definition at line 1090 of file tablemodel.cxx.
References maRows.
Referenced by insertRows(), removeRows(), UndoInsertRows(), and UndoRemoveRows().
|
friend |
Definition at line 59 of file tablemodel.hxx.
|
friend |
Definition at line 57 of file tablemodel.hxx.
|
friend |
Definition at line 60 of file tablemodel.hxx.
|
friend |
Definition at line 58 of file tablemodel.hxx.
|
friend |
Definition at line 63 of file tablemodel.hxx.
Referenced by init(), and insertColumns().
|
friend |
Definition at line 66 of file tablemodel.hxx.
Referenced by getColumns().
|
friend |
Definition at line 61 of file tablemodel.hxx.
|
friend |
Definition at line 67 of file tablemodel.hxx.
|
friend |
Definition at line 64 of file tablemodel.hxx.
Referenced by init(), and insertRows().
|
friend |
Definition at line 65 of file tablemodel.hxx.
Referenced by getRows().
|
friend |
Definition at line 62 of file tablemodel.hxx.
|
private |
Definition at line 172 of file tablemodel.hxx.
Referenced by disposing(), getColumn(), getColumnCountImpl(), getColumnWidths(), init(), insertColumns(), optimize(), removeColumns(), TableModel(), UndoInsertColumns(), UndoRemoveColumns(), and updateColumns().
|
private |
Definition at line 171 of file tablemodel.hxx.
Referenced by disposing(), dumpAsXml(), getCell(), getRow(), getRowCountImpl(), init(), insertColumns(), insertRows(), optimize(), removeColumns(), removeRows(), TableModel(), UndoInsertColumns(), UndoInsertRows(), UndoRemoveColumns(), UndoRemoveRows(), and updateRows().
|
private |
Definition at line 179 of file tablemodel.hxx.
Referenced by isModified(), and setModified().
|
private |
Definition at line 180 of file tablemodel.hxx.
Referenced by notifyModification(), and unlockBroadcasts().
|
private |
Definition at line 182 of file tablemodel.hxx.
Referenced by lockBroadcasts(), notifyModification(), and unlockBroadcasts().
|
private |
Definition at line 177 of file tablemodel.hxx.
Referenced by createCell(), disposing(), getSdrTableObj(), insertColumns(), insertRows(), merge(), notifyModification(), removeColumns(), and removeRows().
|
private |
Definition at line 174 of file tablemodel.hxx.
Referenced by disposing(), and getColumns().
|
private |
Definition at line 175 of file tablemodel.hxx.
Referenced by disposing(), and getRows().