diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-18 12:54:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-18 13:29:13 +0100 |
commit | af181dc1fca626a5b7f9afb3cb69c76ed5d46aa0 (patch) | |
tree | 2166ed73e4911b8a1b05b5b4490fe6895c963d74 /binaryurp | |
parent | 17c17017458519e2c13c43fb362320a127c65135 (diff) |
Use cppu::BaseMutex instead of plain osl::Mutex as base
Change-Id: I3dcae6482afe9e2b1a33261583dce41ddc91b67b
Diffstat (limited to 'binaryurp')
-rw-r--r-- | binaryurp/source/bridgefactory.cxx | 10 | ||||
-rw-r--r-- | binaryurp/source/bridgefactory.hxx | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/binaryurp/source/bridgefactory.cxx b/binaryurp/source/bridgefactory.cxx index 4e832a7b2ef8..93cd22b3efea 100644 --- a/binaryurp/source/bridgefactory.cxx +++ b/binaryurp/source/bridgefactory.cxx @@ -62,7 +62,7 @@ void BridgeFactory::removeBridge( { assert(bridge.is()); OUString n(bridge->getName()); - osl::MutexGuard g(*this); + osl::MutexGuard g(m_aMutex); if (n.isEmpty()) { BridgeList::iterator i( std::find(unnamed_.begin(), unnamed_.end(), bridge)); @@ -79,7 +79,7 @@ void BridgeFactory::removeBridge( BridgeFactory::BridgeFactory( css::uno::Reference< css::uno::XComponentContext > const & context): - BridgeFactoryBase(*static_cast< osl::Mutex * >(this)), context_(context) + BridgeFactoryBase(m_aMutex), context_(context) { assert(context.is()); } @@ -115,7 +115,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( { rtl::Reference< Bridge > b; { - osl::MutexGuard g(*this); + osl::MutexGuard g(m_aMutex); if (named_.find(sName) != named_.end()) { throw css::bridge::BridgeExistsException( sName, static_cast< cppu::OWeakObject * >(this)); @@ -141,7 +141,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( css::uno::Reference< css::bridge::XBridge > BridgeFactory::getBridge( OUString const & sName) throw (css::uno::RuntimeException, std::exception) { - osl::MutexGuard g(*this); + osl::MutexGuard g(m_aMutex); BridgeMap::iterator i(named_.find(sName)); return i == named_.end() ? css::uno::Reference< css::bridge::XBridge >() : i->second; @@ -149,7 +149,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::getBridge( css::uno::Sequence< css::uno::Reference< css::bridge::XBridge > > BridgeFactory::getExistingBridges() throw (css::uno::RuntimeException, std::exception) { - osl::MutexGuard g(*this); + osl::MutexGuard g(m_aMutex); if (unnamed_.size() > SAL_MAX_INT32) { throw css::uno::RuntimeException( "BridgeFactory::getExistingBridges: too many", diff --git a/binaryurp/source/bridgefactory.hxx b/binaryurp/source/bridgefactory.hxx index 075975c53a0d..4da73fff3b9e 100644 --- a/binaryurp/source/bridgefactory.hxx +++ b/binaryurp/source/bridgefactory.hxx @@ -32,6 +32,7 @@ #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" +#include "cppuhelper/basemutex.hxx" #include "cppuhelper/compbase2.hxx" #include "sal/types.h" @@ -55,7 +56,8 @@ typedef BridgeFactoryBase; class BridgeFactory: - private osl::Mutex, public BridgeFactoryBase, private boost::noncopyable + private cppu::BaseMutex, public BridgeFactoryBase, + private boost::noncopyable { public: static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > |