From 1e0d4f454202ed19147715be6efba431719f4142 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 19 Jul 2021 11:28:13 +0200 Subject: 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 --- ucb/source/core/ucbstore.cxx | 27 ++++++++------------------- 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 #include #include -#include -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 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 ); -- cgit