[Libreoffice-commits] core.git: ucb/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 19 15:55:44 UTC 2021


 ucb/source/core/ucbstore.cxx |   27 ++++++++-------------------
 ucb/source/core/ucbstore.hxx |    8 +++-----
 2 files changed, 11 insertions(+), 24 deletions(-)

New commits:
commit 1e0d4f454202ed19147715be6efba431719f4142
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Jul 19 11:28:13 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jul 19 17:55:08 2021 +0200

    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 at collabora.co.uk>

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 );


More information about the Libreoffice-commits mailing list