diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-19 11:28:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-19 17:55:08 +0200 |
commit | 1e0d4f454202ed19147715be6efba431719f4142 (patch) | |
tree | 64527973db2c5bb2cc5a550017379a25ec7e8e3c /ucb | |
parent | 5d4a59fd1e14e07d06f560a353e59df14dec5dd4 (diff) |
no need for pimpl in UcbStore
Change-Id: I2cb101a9bbb01a5d48d6eeb3aca08a2befa89133
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119205
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/ucbstore.cxx | 27 | ||||
-rw-r--r-- | ucb/source/core/ucbstore.hxx | 8 |
2 files changed, 11 insertions, 24 deletions
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 735d83fb2991..91df7dc6a1cd 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -130,24 +130,13 @@ public: } -// UcbStore_Impl. - - -struct UcbStore_Impl -{ - osl::Mutex m_aMutex; - Sequence< Any > m_aInitArgs; - Reference< XPropertySetRegistry > m_xTheRegistry; -}; - // UcbStore Implementation. UcbStore::UcbStore( const Reference< XComponentContext >& xContext ) : UcbStore_Base(m_aMutex), - m_xContext( xContext ), - m_pImpl( new UcbStore_Impl ) + m_xContext( xContext ) { } @@ -190,14 +179,14 @@ UcbStore::createPropertySetRegistry( const OUString& ) // The URL parameter is ignored by this interface implementation. It always // uses the configuration server as storage medium. - if ( !m_pImpl->m_xTheRegistry.is() ) + if ( !m_xTheRegistry.is() ) { - osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex ); - if ( !m_pImpl->m_xTheRegistry.is() ) - m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xContext, m_pImpl->m_aInitArgs ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); + if ( !m_xTheRegistry.is() ) + m_xTheRegistry = new PropertySetRegistry( m_xContext, m_aInitArgs ); } - return m_pImpl->m_xTheRegistry; + return m_xTheRegistry; } @@ -207,8 +196,8 @@ UcbStore::createPropertySetRegistry( const OUString& ) // virtual void SAL_CALL UcbStore::initialize( const Sequence< Any >& aArguments ) { - osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex ); - m_pImpl->m_aInitArgs = aArguments; + osl::Guard< osl::Mutex > aGuard( m_aMutex ); + m_aInitArgs = aArguments; } diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx index 423920b8712d..e86af48a0162 100644 --- a/ucb/source/core/ucbstore.hxx +++ b/ucb/source/core/ucbstore.hxx @@ -35,11 +35,8 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> -#include <memory> -struct UcbStore_Impl; - using UcbStore_Base = cppu::WeakComponentImplHelper < css::lang::XServiceInfo, css::ucb::XPropertySetRegistryFactory, @@ -47,8 +44,9 @@ using UcbStore_Base = cppu::WeakComponentImplHelper < class UcbStore : public cppu::BaseMutex, public UcbStore_Base { - css::uno::Reference< css::uno::XComponentContext > m_xContext; - std::unique_ptr<UcbStore_Impl> m_pImpl; + css::uno::Reference< css::uno::XComponentContext > m_xContext; + css::uno::Sequence< css::uno::Any > m_aInitArgs; + css::uno::Reference< css::ucb::XPropertySetRegistry > m_xTheRegistry; public: explicit UcbStore( const css::uno::Reference< css::uno::XComponentContext >& xContext ); |