diff options
Diffstat (limited to 'framework/source/uielement/langselectionmenucontroller.cxx')
-rw-r--r-- | framework/source/uielement/langselectionmenucontroller.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 38523d8033..22154db372 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -77,6 +77,7 @@ #include <dispatch/uieventloghelper.hxx> #include "helper/mischelper.hxx" +#include <vos/mutex.hxx> #include <map> #include <set> @@ -106,9 +107,9 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( LanguageSelectionMenuController , DEFINE_INIT_SERVICE ( LanguageSelectionMenuController, {} ) LanguageSelectionMenuController::LanguageSelectionMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ), + svt::PopupMenuControllerBase( xServiceManager ), m_bShowMenu( sal_True ), - m_aLangGuessHelper(xServiceManager) + m_aLangGuessHelper( xServiceManager ) { } @@ -121,7 +122,7 @@ void SAL_CALL LanguageSelectionMenuController::disposing( const EventObject& ) t { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xLanguageDispatch.clear(); @@ -137,7 +138,7 @@ void SAL_CALL LanguageSelectionMenuController::statusChanged( const FeatureState { vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - if ( m_bDisposed ) + if (rBHelper.bDisposed || rBHelper.bInDispose) return; m_bShowMenu = sal_True; @@ -321,15 +322,15 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException ) { - PopupMenuControllerBase::updatePopupMenu(); + svt::PopupMenuControllerBase::updatePopupMenu(); // Force status update to get information about the current languages - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); Reference< XDispatch > xDispatch( m_xLanguageDispatch ); com::sun::star::util::URL aTargetURL; aTargetURL.Complete = m_aLangStatusCommandURL; m_xURLTransformer->parseStrict( aTargetURL ); - aLock.unlock(); + aLock.clear(); if ( xDispatch.is() ) { @@ -356,12 +357,12 @@ void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com:: // XInitialization void SAL_CALL LanguageSelectionMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); sal_Bool bInitalized( m_bInitialized ); if ( !bInitalized ) { - PopupMenuControllerBase::initialize(aArguments); + svt::PopupMenuControllerBase::initialize(aArguments); if ( m_bInitialized ) { |