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

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


 ucb/source/ucp/file/bc.cxx |   51 ---------------------------------------------
 ucb/source/ucp/file/bc.hxx |   42 +++++++++----------------------------
 2 files changed, 11 insertions(+), 82 deletions(-)

New commits:
commit 41772463ca1ab22b213dbf1cb7449ec695b2f457
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 15:14:41 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 13:59:53 2019 +0200

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

diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 34ce91c146f5..fe00d74c8533 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -126,43 +126,6 @@ BaseContent::~BaseContent( )
 }
 
 
-// XInterface
-
-
-void SAL_CALL
-BaseContent::acquire()
-    throw()
-{
-    OWeakObject::acquire();
-}
-
-
-void SAL_CALL
-BaseContent::release()
-    throw()
-{
-    OWeakObject::release();
-}
-
-
-Any SAL_CALL
-BaseContent::queryInterface( const Type& rType )
-{
-    Any aRet = cppu::queryInterface( rType,
-                                     static_cast< lang::XComponent* >(this),
-                                     static_cast< lang::XTypeProvider* >(this),
-                                     static_cast< lang::XServiceInfo* >(this),
-                                     static_cast< XCommandProcessor* >(this),
-                                     static_cast< container::XChild* >(this),
-                                     static_cast< beans::XPropertiesChangeNotifier* >(this),
-                                     static_cast< beans::XPropertyContainer* >(this),
-                                     static_cast< XContentCreator* >(this),
-                                     static_cast< beans::XPropertySetInfoChangeNotifier* >(this),
-                                     static_cast< XContent* >(this) );
-    return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
-}
-
-
 // XComponent
 
 
@@ -241,20 +204,6 @@ BaseContent::getSupportedServiceNames()
     return ret;
 }
 
-//  XTypeProvider
-XTYPEPROVIDER_IMPL_10( BaseContent,
-                       lang::XComponent,
-                       lang::XTypeProvider,
-                       lang::XServiceInfo,
-                       XCommandProcessor,
-                       XContentCreator,
-                       XContent,
-                       container::XChild,
-                       beans::XPropertiesChangeNotifier,
-                       beans::XPropertyContainer,
-                       beans::XPropertySetInfoChangeNotifier )
-
-
 //  XCommandProcessor
 
 
diff --git a/ucb/source/ucp/file/bc.hxx b/ucb/source/ucp/file/bc.hxx
index 4bfd72abc4de..5d6e36d88957 100644
--- a/ucb/source/ucp/file/bc.hxx
+++ b/ucb/source/ucp/file/bc.hxx
@@ -22,7 +22,7 @@
 
 #include <osl/mutex.hxx>
 #include <rtl/ustring.hxx>
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <comphelper/interfacecontainer2.hxx>
 #include <com/sun/star/uno/XInterface.hpp>
 #include <com/sun/star/lang/XTypeProvider.hpp>
@@ -54,17 +54,16 @@ namespace fileaccess {
     class TaskManager;
 
     class BaseContent:
-        public cppu::OWeakObject,
-        public css::lang::XComponent,
-        public css::lang::XServiceInfo,
-        public css::lang::XTypeProvider,
-        public css::ucb::XCommandProcessor,
-        public css::beans::XPropertiesChangeNotifier,
-        public css::beans::XPropertyContainer,
-        public css::beans::XPropertySetInfoChangeNotifier,
-        public css::ucb::XContentCreator,
-        public css::container::XChild,
-        public css::ucb::XContent,
+        public cppu::WeakImplHelper<
+            css::lang::XComponent,
+            css::lang::XServiceInfo,
+            css::ucb::XCommandProcessor,
+            css::beans::XPropertiesChangeNotifier,
+            css::beans::XPropertyContainer,
+            css::beans::XPropertySetInfoChangeNotifier,
+            css::ucb::XContentCreator,
+            css::container::XChild,
+            css::ucb::XContent>,
         public fileaccess::Notifier    // implementation class
     {
     private:
@@ -82,19 +81,6 @@ namespace fileaccess {
 
         virtual ~BaseContent() override;
 
-        // XInterface
-        virtual css::uno::Any SAL_CALL
-        queryInterface( const css::uno::Type& aType ) override;
-
-        virtual void SAL_CALL
-        acquire()
-            throw() override;
-
-        virtual void SAL_CALL
-        release()
-            throw() override;
-
-
         // XComponent
         virtual void SAL_CALL
         dispose() override;
@@ -107,12 +93,6 @@ namespace fileaccess {
         removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) 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;


More information about the Libreoffice-commits mailing list