diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-27 09:49:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-27 13:28:56 +0100 |
commit | 42ac3410c0642c5c00023c3d6fb2df093af5fe94 (patch) | |
tree | 09d6fe0c007fee8bf926b928ffdcaf22c32bc5bb /ucb | |
parent | 0f3d19d2ce953b5e2883ecb51643fd3c47bf7ec7 (diff) |
use comphelper::WeakComponentImplHelper in UcbStore
Change-Id: I0246fe4c93208e87bddcf08ce6423d1e8f7505d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127552
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/ucbstore.cxx | 7 | ||||
-rw-r--r-- | ucb/source/core/ucbstore.hxx | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index a0eece461c7d..fcdc0138ede0 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -128,8 +128,7 @@ public: UcbStore::UcbStore( const Reference< XComponentContext >& xContext ) -: UcbStore_Base(m_aMutex), - m_xContext( xContext ) +: m_xContext( xContext ) { } @@ -174,7 +173,7 @@ UcbStore::createPropertySetRegistry( const OUString& ) if ( !m_xTheRegistry.is() ) { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); if ( !m_xTheRegistry.is() ) m_xTheRegistry = new PropertySetRegistry( m_xContext, m_aInitArgs ); } @@ -189,7 +188,7 @@ UcbStore::createPropertySetRegistry( const OUString& ) // virtual void SAL_CALL UcbStore::initialize( const Sequence< Any >& aArguments ) { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); m_aInitArgs = aArguments; } diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx index de9488b28c05..0042bbafadc2 100644 --- a/ucb/source/core/ucbstore.hxx +++ b/ucb/source/core/ucbstore.hxx @@ -35,17 +35,16 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <comphelper/interfacecontainer3.hxx> #include <comphelper/multiinterfacecontainer3.hxx> -#include <cppuhelper/compbase.hxx> -#include <cppuhelper/basemutex.hxx> +#include <comphelper/compbase.hxx> #include <unordered_map> -using UcbStore_Base = cppu::WeakComponentImplHelper < +using UcbStore_Base = comphelper::WeakComponentImplHelper < css::lang::XServiceInfo, css::ucb::XPropertySetRegistryFactory, css::lang::XInitialization >; -class UcbStore : public cppu::BaseMutex, public UcbStore_Base +class UcbStore : public UcbStore_Base { css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Sequence< css::uno::Any > m_aInitArgs; |