summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-18 14:40:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-18 15:27:07 +0100
commit4eb2c58093123262ee2366898c7ab779db985948 (patch)
treede53e5f574426c773ffa162116f9fa2ea7184334
parent82f79abae5cf92940d8c2d642792da8b44e155d1 (diff)
Use SolarMutexGuard directly
Change-Id: Ib63b12595f4f9a43c4742d8cf8cfea4713ebdf14
-rw-r--r--framework/inc/helper/ocomponentaccess.hxx7
-rw-r--r--framework/source/helper/ocomponentaccess.cxx13
2 files changed, 5 insertions, 15 deletions
diff --git a/framework/inc/helper/ocomponentaccess.hxx b/framework/inc/helper/ocomponentaccess.hxx
index 5e4cb9ae58a9..495d71947163 100644
--- a/framework/inc/helper/ocomponentaccess.hxx
+++ b/framework/inc/helper/ocomponentaccess.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_FRAMEWORK_INC_HELPER_OCOMPONENTACCESS_HXX
#define INCLUDED_FRAMEWORK_INC_HELPER_OCOMPONENTACCESS_HXX
-#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
@@ -50,14 +49,12 @@ namespace framework{
XEnumerationAccess
XElementAccess
- @base ThreadHelpBase
- OWeakObject
+ @base OWeakObject
@devstatus ready to use
*//*-*************************************************************************************************************/
-class OComponentAccess : private ThreadHelpBase , // Must be the first of baseclasses - Is necessary for right initialization of objects!
- public ::cppu::WeakImplHelper1< ::com::sun::star::container::XEnumerationAccess >
+class OComponentAccess : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XEnumerationAccess >
{
// public methods
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx
index 65a150f9648d..f8679988eff1 100644
--- a/framework/source/helper/ocomponentaccess.cxx
+++ b/framework/source/helper/ocomponentaccess.cxx
@@ -20,8 +20,6 @@
#include <helper/ocomponentaccess.hxx>
#include <helper/ocomponentenumeration.hxx>
-#include <threadhelp/guard.hxx>
-
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <vcl/svapp.hxx>
@@ -40,10 +38,7 @@ using namespace ::rtl ;
// constructor
OComponentAccess::OComponentAccess( const css::uno::Reference< XDesktop >& xOwner )
- // Init baseclasses first
- : ThreadHelpBase ( &Application::GetSolarMutex() )
- // Init member
- , m_xOwner ( xOwner )
+ : m_xOwner ( xOwner )
{
// Safe impossible cases
SAL_WARN_IF( !impldbg_checkParameter_OComponentAccessCtor( xOwner ), "fwk", "OComponentAccess::OComponentAccess(): Invalid parameter detected!" );
@@ -60,8 +55,7 @@ OComponentAccess::~OComponentAccess()
// XEnumerationAccess
css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration() throw( RuntimeException, std::exception )
{
- // Ready for multithreading
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
// Set default return value, if method failed.
// If no desktop exist and there is no task container - return an empty enumeration!
@@ -98,8 +92,7 @@ Type SAL_CALL OComponentAccess::getElementType() throw( RuntimeException, std::e
// XElementAccess
sal_Bool SAL_CALL OComponentAccess::hasElements() throw( RuntimeException, std::exception )
{
- // Ready for multithreading
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
// Set default return value, if method failed.
sal_Bool bReturn = sal_False;