diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-03 19:05:27 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-14 07:54:39 +0000 |
commit | c1c12bd160099bb4061aad814368192e396adc3d (patch) | |
tree | 90e4f8f4a84f6985e28b568c91d2414e73b92f48 /toolkit/source | |
parent | a6754e5a09afd62ae431a279fa30be5e0506ad39 (diff) |
gridfixes: ensure removal of a column in grid control adjusts the cursor
Change-Id: I99be214bf12d340cc5e9330d1c21046dd366b07a
Reviewed-on: https://gerrit.libreoffice.org/554
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/controls/grid/gridcontrol.cxx | 8 | ||||
-rw-r--r-- | toolkit/source/controls/grid/gridcontrol.hxx | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index fdd33ff82c08..7efcbb10d0c2 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -53,6 +53,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::view; +using namespace ::com::sun::star::util; namespace toolkit { @@ -393,6 +394,13 @@ sal_Bool SAL_CALL UnoGridControl::setModel( const Reference< XControlModel >& i_ } //---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoGridControl::goToCell( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) throw (RuntimeException, IndexOutOfBoundsException, VetoException) +{ + Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW ); + xGrid->goToCell( i_columnIndex, i_rowIndex ); +} + +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (RuntimeException, IndexOutOfBoundsException ) { Reference< XGridRowSelection >( getPeer(), UNO_QUERY_THROW )->selectRow( i_rowIndex ); diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index 450e248a3977..f5088b1357e5 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -103,6 +103,7 @@ public: virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getCurrentColumn( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getCurrentRow( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL goToCell( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::util::VetoException); // ::com::sun::star::awt::grid::XGridRowSelection virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException ); |