gridsort: minor changes to the new API:
- renamed XMutableGridDataModel::setRowHeading to updateRowHeading for consistency reasons - renamed XSortableGridDataModel to XSortableGridData - actually, this is not a full-fledged model in itself.
This commit is contained in:
parent
23933ae6f6
commit
75a441f652
6 changed files with 13 additions and 13 deletions
|
@ -38,7 +38,7 @@
|
|||
#include <com/sun/star/awt/grid/XGridColumn.hpp>
|
||||
#include <com/sun/star/view/SelectionType.hpp>
|
||||
#include <com/sun/star/awt/grid/XGridColumnListener.hpp>
|
||||
#include <com/sun/star/awt/grid/XSortableGridDataModel.hpp>
|
||||
#include <com/sun/star/awt/grid/XSortableGridData.hpp>
|
||||
/** === end UNO includes === **/
|
||||
|
||||
#include <comphelper/stlunosequence.hxx>
|
||||
|
@ -74,7 +74,7 @@ namespace svt { namespace table
|
|||
using ::com::sun::star::style::VerticalAlignment;
|
||||
using ::com::sun::star::uno::WeakReference;
|
||||
using ::com::sun::star::awt::grid::GridDataEvent;
|
||||
using ::com::sun::star::awt::grid::XSortableGridDataModel;
|
||||
using ::com::sun::star::awt::grid::XSortableGridData;
|
||||
using ::com::sun::star::beans::Pair;
|
||||
/** === end UNO using === **/
|
||||
|
||||
|
@ -748,7 +748,7 @@ namespace svt { namespace table
|
|||
{
|
||||
DBG_CHECK_ME();
|
||||
|
||||
Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY );
|
||||
Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY );
|
||||
if ( xSortAccess.is() )
|
||||
return this;
|
||||
return NULL;
|
||||
|
@ -761,7 +761,7 @@ namespace svt { namespace table
|
|||
|
||||
try
|
||||
{
|
||||
Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY_THROW );
|
||||
Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW );
|
||||
xSortAccess->sortByColumn( i_column, i_sortDirection == ColumnSortAscending );
|
||||
}
|
||||
catch( const Exception& )
|
||||
|
@ -778,7 +778,7 @@ namespace svt { namespace table
|
|||
ColumnSort currentSort;
|
||||
try
|
||||
{
|
||||
Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY_THROW );
|
||||
Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW );
|
||||
Pair< ::sal_Int32, ::sal_Bool > const aCurrentSortOrder( xSortAccess->getCurrentSortOrder() );
|
||||
currentSort.nColumnPos = aCurrentSortOrder.First;
|
||||
currentSort.eSortDirection = aCurrentSortOrder.Second ? ColumnSortAscending : ColumnSortDescending;
|
||||
|
|
|
@ -205,7 +205,7 @@ public class TMutableGridDataModel
|
|||
}
|
||||
|
||||
/**
|
||||
* tests the XMutableGridDataModel.setRowHeading method
|
||||
* tests the XMutableGridDataModel.updateRowHeading method
|
||||
*/
|
||||
public void testUpdateRowHeading() throws IndexOutOfBoundsException
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ public class TMutableGridDataModel
|
|||
|
||||
final int rowToUpdate = 2;
|
||||
final String valueToUpdate = "some text";
|
||||
m_dataModel.setRowHeading( rowToUpdate, valueToUpdate );
|
||||
m_dataModel.updateRowHeading( rowToUpdate, valueToUpdate );
|
||||
final GridDataEvent event = m_listener.assertSingleRowHeadingChangeEvent();
|
||||
assertEquals( "row heading update notification: FirstRow is invalid", rowToUpdate, event.FirstRow );
|
||||
assertEquals( "row heading update notification: FirstRow is invalid", rowToUpdate, event.LastRow );
|
||||
|
|
|
@ -340,7 +340,7 @@ namespace toolkit
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
void SAL_CALL DefaultGridDataModel::setRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||
void SAL_CALL DefaultGridDataModel::updateRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||
{
|
||||
::comphelper::ComponentGuard aGuard( *this, rBHelper );
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateRowData( 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);
|
||||
virtual void SAL_CALL setRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
|
||||
|
|
|
@ -670,7 +670,7 @@ namespace toolkit
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
void SAL_CALL SortableGridDataModel::setRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||
void SAL_CALL SortableGridDataModel::updateRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||
{
|
||||
MethodGuard aGuard( *this, rBHelper );
|
||||
DBG_CHECK_ME();
|
||||
|
@ -679,7 +679,7 @@ namespace toolkit
|
|||
|
||||
Reference< XMutableGridDataModel > const delegator( m_delegator );
|
||||
aGuard.clear();
|
||||
delegator->setRowHeading( rowIndex, i_heading );
|
||||
delegator->updateRowHeading( rowIndex, i_heading );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace toolkit
|
|||
~SortableGridDataModel();
|
||||
|
||||
public:
|
||||
// XSortableGridDataModel
|
||||
// XSortableGridData
|
||||
virtual void SAL_CALL sortByColumn( ::sal_Int32 ColumnIndex, ::sal_Bool SortAscending ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL removeColumnSort( ) throw (::com::sun::star::uno::RuntimeException);
|
||||
virtual ::com::sun::star::beans::Pair< ::sal_Int32, ::sal_Bool > SAL_CALL getCurrentSortOrder( ) throw (::com::sun::star::uno::RuntimeException);
|
||||
|
@ -89,7 +89,7 @@ namespace toolkit
|
|||
virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateRowData( 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);
|
||||
virtual void SAL_CALL setRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
|
||||
|
|
Loading…
Reference in a new issue