diff options
-rw-r--r-- | framework/inc/helper/uiconfigelementwrapperbase.hxx | 4 | ||||
-rw-r--r-- | framework/source/helper/uiconfigelementwrapperbase.cxx | 22 | ||||
-rw-r--r-- | framework/source/uielement/menubarwrapper.cxx | 15 | ||||
-rw-r--r-- | framework/source/uielement/statusbarwrapper.cxx | 8 | ||||
-rw-r--r-- | framework/source/uielement/toolbarwrapper.cxx | 20 |
5 files changed, 33 insertions, 36 deletions
diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx index 3f1a360b3e14..f44df0038724 100644 --- a/framework/inc/helper/uiconfigelementwrapperbase.hxx +++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_FRAMEWORK_INC_HELPER_UICONFIGELEMENTWRAPPERBASE_HXX #define INCLUDED_FRAMEWORK_INC_HELPER_UICONFIGELEMENTWRAPPERBASE_HXX -#include <threadhelp/threadhelpbase.hxx> #include <macros/generic.hxx> #include <macros/xinterface.hxx> #include <macros/xtypeprovider.hxx> @@ -36,6 +35,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <rtl/ustring.hxx> +#include <cppuhelper/basemutex.hxx> #include <cppuhelper/propshlp.hxx> #include <cppuhelper/implbase6.hxx> @@ -50,7 +50,7 @@ typedef ::cppu::WeakImplHelper6< ::com::sun::star::util::XUpdatable, ::com::sun::star::ui::XUIConfigurationListener > UIConfigElementWrapperBase_BASE; -class UIConfigElementWrapperBase : protected ThreadHelpBase , +class UIConfigElementWrapperBase : private cppu::BaseMutex, public ::cppu::OBroadcastHelper , public ::cppu::OPropertySetHelper , public UIConfigElementWrapperBase_BASE diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index 446ab6ad86b3..2bbccfee7c8c 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -20,7 +20,6 @@ #include <helper/uiconfigelementwrapperbase.hxx> #include <general.h> #include <properties.h> -#include <threadhelp/guard.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> @@ -60,8 +59,7 @@ namespace framework { UIConfigElementWrapperBase::UIConfigElementWrapperBase( sal_Int16 nType ) - : ThreadHelpBase ( &Application::GetSolarMutex() ) - , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) + : ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aMutex ) , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) , m_nType ( nType ) , m_bPersistent ( true ) @@ -70,7 +68,7 @@ UIConfigElementWrapperBase::UIConfigElementWrapperBase( sal_Int16 nType ) , m_bConfigListening ( false ) , m_bDisposed ( false ) , m_bNoClose ( false ) - , m_aListenerContainer ( m_aLock.getShareableOslMutex() ) + , m_aListenerContainer ( m_aMutex ) { } @@ -109,14 +107,14 @@ void SAL_CALL UIConfigElementWrapperBase::removeEventListener( const ::com::sun: void SAL_CALL UIConfigElementWrapperBase::disposing( const EventObject& ) throw( RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexGuard g; m_xConfigSource.clear(); } void SAL_CALL UIConfigElementWrapperBase::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( !m_bInitialized ) { @@ -452,7 +450,7 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigE } void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAccess >& xSettings ) throw ( RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexClearableGuard aLock; if ( xSettings.is() ) @@ -469,7 +467,7 @@ void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAc OUString aResourceURL( m_aResourceURL ); Reference< XUIConfigurationManager > xUICfgMgr( m_xConfigSource ); - aLock.unlock(); + aLock.clear(); try { @@ -491,7 +489,7 @@ void UIConfigElementWrapperBase::impl_fillNewData() } Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_Bool bWriteable ) throw ( RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( bWriteable ) @@ -502,20 +500,20 @@ Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_ Reference< XFrame > SAL_CALL UIConfigElementWrapperBase::getFrame() throw (RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; Reference< XFrame > xFrame( m_xWeakFrame ); return xFrame; } OUString SAL_CALL UIConfigElementWrapperBase::getResourceURL() throw (RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; return m_aResourceURL; } ::sal_Int16 SAL_CALL UIConfigElementWrapperBase::getType() throw (RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; return m_nType; } diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index 2da99756bdf3..5dcb1845c07e 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -98,7 +98,7 @@ void SAL_CALL MenuBarWrapper::dispose() throw (::com::sun::star::uno::RuntimeExc com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - Guard aLock( m_aLock ); + SolarMutexGuard g; m_xMenuBarManager->dispose(); m_xMenuBarManager.clear(); @@ -112,8 +112,7 @@ void SAL_CALL MenuBarWrapper::dispose() throw (::com::sun::star::uno::RuntimeExc // XInitialization void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -202,7 +201,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th // XUIElementSettings void SAL_CALL MenuBarWrapper::updateSettings() throw ( RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -261,7 +260,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) ::sal_Bool SAL_CALL MenuBarWrapper::hasElements() throw (::com::sun::star::uno::RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -277,7 +276,7 @@ throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -298,7 +297,7 @@ throw ( container::NoSuchElementException, Sequence< OUString > SAL_CALL MenuBarWrapper::getElementNames() throw (::com::sun::star::uno::RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -322,7 +321,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) const OUString& aName ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 3c1c89f0eb2c..528bed496d8c 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -71,7 +71,7 @@ void SAL_CALL StatusBarWrapper::dispose() throw (::com::sun::star::uno::RuntimeE com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( !m_bDisposed ) { if ( m_xStatusBarManager.is() ) @@ -90,7 +90,7 @@ void SAL_CALL StatusBarWrapper::dispose() throw (::com::sun::star::uno::RuntimeE // XInitialization void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -139,7 +139,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) // XUIElementSettings void SAL_CALL StatusBarWrapper::updateSettings() throw ( RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -164,7 +164,7 @@ void SAL_CALL StatusBarWrapper::updateSettings() throw ( RuntimeException, std:: Reference< XInterface > SAL_CALL StatusBarWrapper::getRealInterface() throw ( RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_xStatusBarManager.is() ) { diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 076cfca74e46..f9295f9c39b3 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -93,7 +93,7 @@ void SAL_CALL ToolBarWrapper::dispose() throw ( RuntimeException, std::exception Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) return; } @@ -101,7 +101,7 @@ void SAL_CALL ToolBarWrapper::dispose() throw ( RuntimeException, std::exception com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_xToolBarManager.is() ) m_xToolBarManager->dispose(); @@ -115,7 +115,7 @@ void SAL_CALL ToolBarWrapper::dispose() throw ( RuntimeException, std::exception // XInitialization void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -201,7 +201,7 @@ void SAL_CALL ToolBarWrapper::disposing( const ::com::sun::star::lang::EventObje // XUpdatable void SAL_CALL ToolBarWrapper::update() throw (::com::sun::star::uno::RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -214,7 +214,7 @@ void SAL_CALL ToolBarWrapper::update() throw (::com::sun::star::uno::RuntimeExce // XUIElementSettings void SAL_CALL ToolBarWrapper::updateSettings() throw (::com::sun::star::uno::RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_bDisposed ) throw DisposedException(); @@ -253,7 +253,7 @@ void ToolBarWrapper::impl_fillNewData() // XUIElement interface Reference< XInterface > SAL_CALL ToolBarWrapper::getRealInterface( ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_xToolBarManager.is() ) { @@ -274,7 +274,7 @@ void SAL_CALL ToolBarWrapper::functionExecute( const OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - Guard aLock( m_aLock ); + SolarMutexGuard g; if ( m_xToolBarManager.is() ) { @@ -286,13 +286,13 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) void SAL_CALL ToolBarWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception, std::exception ) { - Guard aLock( m_aLock ); + SolarMutexResettableGuard aLock; sal_Bool bNoClose( m_bNoClose ); - aLock.unlock(); + aLock.clear(); UIConfigElementWrapperBase::setFastPropertyValue_NoBroadcast( nHandle, aValue ); - aLock.lock(); + aLock.reset(); sal_Bool bNewNoClose( m_bNoClose ); if ( m_xToolBarManager.is() && !m_bDisposed && ( bNewNoClose != bNoClose )) |