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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 8 12:46:29 UTC 2019


 ucb/source/core/ucb.cxx |   44 --------------------------------------------
 ucb/source/core/ucb.hxx |   24 ++++++------------------
 2 files changed, 6 insertions(+), 62 deletions(-)

New commits:
commit 9f981916f21ac38bb81d14b55ac031961ee732fd
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 15:12:51 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 14:45:27 2019 +0200

    use cppu::WeakImplHelper in UniversalContentBroker
    
    Change-Id: Iaeb88801faab2c9e45b19751ab44c0f800d3c5ec
    Reviewed-on: https://gerrit.libreoffice.org/80424
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index d10780047e2b..cc2490120173 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -248,50 +248,6 @@ UniversalContentBroker::~UniversalContentBroker()
 }
 
 
-// XInterface methods.
-void SAL_CALL UniversalContentBroker::acquire()
-    throw()
-{
-    OWeakObject::acquire();
-}
-
-void SAL_CALL UniversalContentBroker::release()
-    throw()
-{
-    OWeakObject::release();
-}
-
-css::uno::Any SAL_CALL UniversalContentBroker::queryInterface( const css::uno::Type & rType )
-{
-    css::uno::Any aRet = cppu::queryInterface( rType,
-                                               static_cast< XUniversalContentBroker* >(this),
-                                               static_cast< XTypeProvider* >(this),
-                                               static_cast< XComponent* >(this),
-                                               static_cast< XServiceInfo* >(this),
-                                               static_cast< XInitialization* >(this),
-                                               static_cast< XContentProviderManager* >(this),
-                                               static_cast< XContentProvider* >(this),
-                                               static_cast< XContentIdentifierFactory* >(this),
-                                               static_cast< XCommandProcessor* >(this)
-                                               );
-    return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
-}
-
-// XTypeProvider methods.
-
-
-XTYPEPROVIDER_IMPL_9( UniversalContentBroker,
-                      XUniversalContentBroker,
-                      XTypeProvider,
-                      XComponent,
-                      XServiceInfo,
-                      XInitialization,
-                      XContentProviderManager,
-                      XContentProvider,
-                      XContentIdentifierFactory,
-                      XCommandProcessor );
-
-
 // XComponent methods.
 
 
diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx
index a5edcc770a7b..f4236bc7ebbe 100644
--- a/ucb/source/core/ucb.hxx
+++ b/ucb/source/core/ucb.hxx
@@ -31,7 +31,7 @@
 #include <com/sun/star/util/XChangesListener.hpp>
 #include <com/sun/star/util/XChangesNotifier.hpp>
 
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <osl/mutex.hxx>
 #include "providermap.hxx"
 #include <ucbhelper/registerucb.hxx>
@@ -50,28 +50,16 @@ namespace com { namespace sun { namespace star { namespace ucb {
 } } } }
 
 class UniversalContentBroker :
-                public cppu::OWeakObject,
-                public css::ucb::XUniversalContentBroker,
-                public css::lang::XTypeProvider,
-                public css::lang::XServiceInfo,
-                public css::lang::XInitialization,
-                public css::util::XChangesListener
+                public cppu::WeakImplHelper<
+                    css::ucb::XUniversalContentBroker,
+                    css::lang::XServiceInfo,
+                    css::lang::XInitialization,
+                    css::util::XChangesListener>
 {
 public:
     explicit UniversalContentBroker( const css::uno::Reference< css::uno::XComponentContext >& xContext );
     virtual ~UniversalContentBroker() override;
 
-    // XInterface
-    virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
-    virtual void SAL_CALL acquire()
-        throw() override;
-    virtual void SAL_CALL release()
-        throw() override;
-
-    // XTypeProvider
-    virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
-    virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
-
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;


More information about the Libreoffice-commits mailing list