Use SolarMutexGuard directly
Change-Id: Iffc5e75c45502c770e9a3eee2a327df1e6843c9f
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#ifndef INCLUDED_FRAMEWORK_INC_HELPER_UIELEMENTWRAPPERBASE_HXX
|
||||
#define INCLUDED_FRAMEWORK_INC_HELPER_UIELEMENTWRAPPERBASE_HXX
|
||||
|
||||
#include <threadhelp/threadhelpbase.hxx>
|
||||
#include <macros/generic.hxx>
|
||||
#include <macros/xinterface.hxx>
|
||||
#include <macros/xtypeprovider.hxx>
|
||||
@@ -32,6 +31,7 @@
|
||||
#include <com/sun/star/util/XUpdatable.hpp>
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <cppuhelper/basemutex.hxx>
|
||||
#include <cppuhelper/propshlp.hxx>
|
||||
#include <cppuhelper/implbase4.hxx>
|
||||
|
||||
@@ -44,7 +44,7 @@ typedef ::cppu::WeakImplHelper4<
|
||||
::com::sun::star::lang::XComponent,
|
||||
::com::sun::star::util::XUpdatable > UIElementWrapperBase_BASE;
|
||||
|
||||
class UIElementWrapperBase : protected ThreadHelpBase ,
|
||||
class UIElementWrapperBase : private cppu::BaseMutex,
|
||||
public ::cppu::OBroadcastHelper ,
|
||||
public ::cppu::OPropertySetHelper ,
|
||||
public UIElementWrapperBase_BASE
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <helper/uielementwrapperbase.hxx>
|
||||
#include <general.h>
|
||||
#include <properties.h>
|
||||
#include <threadhelp/guard.hxx>
|
||||
|
||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
@@ -45,10 +44,9 @@ namespace framework
|
||||
{
|
||||
|
||||
UIElementWrapperBase::UIElementWrapperBase( 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_aListenerContainer ( m_aLock.getShareableOslMutex() )
|
||||
, m_aListenerContainer ( m_aMutex )
|
||||
, m_nType ( nType )
|
||||
, m_bInitialized ( sal_False )
|
||||
, m_bDisposed ( sal_False )
|
||||
@@ -88,7 +86,7 @@ void SAL_CALL UIElementWrapperBase::removeEventListener( const ::com::sun::star:
|
||||
void SAL_CALL UIElementWrapperBase::initialize( const Sequence< Any >& aArguments )
|
||||
throw ( Exception, RuntimeException, std::exception )
|
||||
{
|
||||
Guard aLock( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( !m_bInitialized )
|
||||
{
|
||||
|
@@ -71,7 +71,7 @@ void SAL_CALL AddonsToolBarWrapper::dispose() throw ( RuntimeException, std::exc
|
||||
com::sun::star::lang::EventObject aEvent( xThis );
|
||||
m_aListenerContainer.disposeAndClear( aEvent );
|
||||
|
||||
Guard aLock( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_xToolBarManager.is() )
|
||||
m_xToolBarManager->dispose();
|
||||
@@ -83,7 +83,7 @@ void SAL_CALL AddonsToolBarWrapper::dispose() throw ( RuntimeException, std::exc
|
||||
// XInitialization
|
||||
void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception )
|
||||
{
|
||||
Guard aLock( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
throw DisposedException();
|
||||
@@ -145,7 +145,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument
|
||||
// XUIElement interface
|
||||
Reference< XInterface > SAL_CALL AddonsToolBarWrapper::getRealInterface() throw (::com::sun::star::uno::RuntimeException, std::exception)
|
||||
{
|
||||
Guard aLock( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_xToolBarManager.is() )
|
||||
{
|
||||
@@ -163,7 +163,7 @@ Reference< XInterface > SAL_CALL AddonsToolBarWrapper::getRealInterface() throw
|
||||
// allow late population of images for add-on toolbars
|
||||
void AddonsToolBarWrapper::populateImages()
|
||||
{
|
||||
Guard aLock( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if (m_bCreatedImages)
|
||||
return;
|
||||
|
@@ -49,7 +49,7 @@ ProgressBarWrapper::~ProgressBarWrapper()
|
||||
// public interfaces
|
||||
void ProgressBarWrapper::setStatusBar( const uno::Reference< awt::XWindow >& rStatusBar, sal_Bool bOwnsInstance )
|
||||
{
|
||||
Guard aGuard( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
return;
|
||||
@@ -75,7 +75,7 @@ void ProgressBarWrapper::setStatusBar( const uno::Reference< awt::XWindow >& rSt
|
||||
|
||||
uno::Reference< awt::XWindow > ProgressBarWrapper::getStatusBar() const
|
||||
{
|
||||
Guard aGuard( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
return uno::Reference< awt::XWindow >();
|
||||
@@ -91,7 +91,7 @@ throw (uno::RuntimeException)
|
||||
sal_Int32 nValue( 0 );
|
||||
|
||||
{
|
||||
Guard aGuard( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
return;
|
||||
@@ -130,7 +130,7 @@ throw (uno::RuntimeException)
|
||||
uno::Reference< awt::XWindow > xWindow;
|
||||
|
||||
{
|
||||
Guard aGuard( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
return;
|
||||
@@ -160,7 +160,7 @@ throw (uno::RuntimeException)
|
||||
sal_Int32 nValue( 0 );
|
||||
|
||||
{
|
||||
Guard aGuard( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
return;
|
||||
@@ -199,7 +199,7 @@ throw (uno::RuntimeException)
|
||||
sal_Bool bSetValue( sal_False );
|
||||
|
||||
{
|
||||
Guard aGuard( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
return;
|
||||
@@ -267,7 +267,7 @@ throw (uno::RuntimeException, std::exception)
|
||||
uno::UNO_QUERY );
|
||||
|
||||
{
|
||||
Guard aLock( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
return;
|
||||
@@ -277,7 +277,7 @@ throw (uno::RuntimeException, std::exception)
|
||||
lang::EventObject aEvent( xThis );
|
||||
m_aListenerContainer.disposeAndClear( aEvent );
|
||||
|
||||
Guard aLock( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
if ( m_bOwnsInstance )
|
||||
{
|
||||
try
|
||||
@@ -300,9 +300,7 @@ throw (uno::RuntimeException, std::exception)
|
||||
uno::Reference< uno::XInterface > SAL_CALL ProgressBarWrapper::getRealInterface()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
|
||||
// Ready for multithreading
|
||||
Guard aLock( m_aLock );
|
||||
SolarMutexGuard g;
|
||||
|
||||
if ( m_bDisposed )
|
||||
return uno::Reference< uno::XInterface >();
|
||||
|
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <uielement/addonstoolbarwrapper.hxx>
|
||||
#include <threadhelp/guard.hxx>
|
||||
#include <threadhelp/threadhelpbase.hxx>
|
||||
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
#include <com/sun/star/frame/ModuleManager.hpp>
|
||||
|
Reference in New Issue
Block a user