diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-12 21:59:36 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-12 21:59:36 +0100 |
commit | 6fba3904b909f7604a38e58e2a8ac3d2542a9410 (patch) | |
tree | 263c692b5b55f480c07f1be1eb0d2a2a279fc199 /toolkit/source/controls/grid | |
parent | c9eead1b9965c797cca47024d30cb7b8d00c7029 (diff) |
gridsort: removed the XGridDataModel.removeRows flavour which took an arbitrary sequence of indexes - this makes the handling, in particular for listeners, unnecessarily complex, and has a questionable use only
Diffstat (limited to 'toolkit/source/controls/grid')
-rw-r--r-- | toolkit/source/controls/grid/defaultgriddatamodel.cxx | 32 | ||||
-rw-r--r-- | toolkit/source/controls/grid/defaultgriddatamodel.hxx | 1 |
2 files changed, 0 insertions, 33 deletions
diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 698e64c4429c..746be68d3b4e 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -250,38 +250,6 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::removeRows( const Sequence< ::sal_Int32 >& i_rowIndexes ) throw (IndexOutOfBoundsException, RuntimeException) - { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); - - sal_Int32 const rowCount = i_rowIndexes.getLength(); - if ( rowCount == 0 ) - return; - - for ( sal_Int32 row=0; row<rowCount; ++row ) - { - if ( ( i_rowIndexes[row] < 0 ) || ( size_t( i_rowIndexes[row] ) >= m_aData.size() ) ) - throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - } - - Sequence< sal_Int32 > rowIndexes( i_rowIndexes ); - ::std::sort( stl_begin( rowIndexes ), stl_end( rowIndexes ) ); - - for ( sal_Int32 row = rowCount; row > 0; ) - { - sal_Int32 const rowIndex = rowIndexes[--row]; - m_aRowHeaders.erase( m_aRowHeaders.begin() + rowIndex ); - m_aData.erase( m_aData.begin() + rowIndex ); - } - - broadcast( - GridDataEvent( *this, Sequence< sal_Int32 >(), rowIndexes ), - &XGridDataListener::rowsRemoved, - aGuard - ); - } - - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::removeAllRows( ) throw (RuntimeException) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 6dd81b8453ae..842e714c904c 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -65,7 +65,6 @@ public: virtual void SAL_CALL addRow( const ::rtl::OUString& Title, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Data ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& Titles, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeRow( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeRows( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& RowIndexes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCell( ::sal_Int32 RowIndex, ::sal_Int32 ColumnIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRow( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); |