diff options
author | Frank Schönheit <fs@openoffice.org> | 2001-10-16 10:43:05 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2001-10-16 10:43:05 +0000 |
commit | 39efe1647b8dddbf79b844c47e7b44fb1f038c3b (patch) | |
tree | b3b5877433418477a25bb583f95b8bd5e6ceefca /svx | |
parent | ca589afc7a8d7f5afc7c6926700b576803cdd191 (diff) |
#92158# commit before calling external dispatchers for move slots
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 5e64c5d195cf..0d9c4501f0f7 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fmgridif.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: hjs $ $Date: 2001-09-12 16:43:04 $ + * last change: $Author: fs $ $Date: 2001-10-16 11:43:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -471,6 +471,8 @@ sal_Bool SAL_CALL FmXGridControl::supportsService(const ::rtl::OUString& Service //------------------------------------------------------------------------------ void SAL_CALL FmXGridControl::dispose() throw( ::com::sun::star::uno::RuntimeException ) { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + ::com::sun::star::lang::EventObject aEvt; aEvt.Source = static_cast< ::cppu::OWeakObject* >(this); m_aModifyListeners.disposeAndClear(aEvt); @@ -890,9 +892,12 @@ sal_Int16 SAL_CALL FmXGridControl::getCurrentColumnPosition() throw( ::com::sun: //------------------------------------------------------------------------------ void SAL_CALL FmXGridControl::setCurrentColumnPosition(sal_Int16 nPos) throw( ::com::sun::star::uno::RuntimeException ) { - ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid > xGrid(mxPeer, ::com::sun::star::uno::UNO_QUERY); - if (xGrid.is()) - xGrid->setCurrentColumnPosition(nPos); + Reference< XGrid > xGrid( mxPeer, UNO_QUERY ); + if ( xGrid.is() ) + { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + xGrid->setCurrentColumnPosition( nPos ); + } } // ::com::sun::star::container::XElementAccess @@ -2756,7 +2761,10 @@ IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot) { if (m_pDispatchers[i].is()) { - m_pDispatchers[i]->dispatch(*pUrls, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>()); + // commit any changes done so far + if ( commit() ) + m_pDispatchers[i]->dispatch(*pUrls, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>()); + return 1; // handled } } |