[Libreoffice-commits] core.git: dbaccess/source include/cppuhelper

Stephan Bergmann sbergman at redhat.com
Wed Jan 7 08:42:52 PST 2015


 dbaccess/source/ui/inc/brwctrlr.hxx |    4 +--
 include/cppuhelper/implbase.hxx     |   43 ++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 2 deletions(-)

New commits:
commit 8ad48d881b5d36af4d2e744cf8031b5f4b2f43e1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jan 7 17:42:07 2015 +0100

    Variadic cppu::ImplInheritanceHelper
    
    Change-Id: I7d958fdf328e44a0d299b29a3a165425731ccf7c

diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 87c0fd3..4644830 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -43,7 +43,7 @@
 #include <svtools/transfer.hxx>
 #include <osl/mutex.hxx>
 #include <osl/thread.hxx>
-#include <cppuhelper/implbase9.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <svtools/cliplistener.hxx>
 
 struct FmFoundRecordInformation;
@@ -57,7 +57,7 @@ namespace dbtools
 namespace dbaui
 {
 
-    typedef ::cppu::ImplInheritanceHelper9  <   OGenericUnoController
+    typedef ::cppu::ImplInheritanceHelper  <   OGenericUnoController
                                             ,   ::com::sun::star::sdb::XSQLErrorListener
                                             ,   ::com::sun::star::form::XDatabaseParameterListener
                                             ,   ::com::sun::star::form::XConfirmDeleteListener
diff --git a/include/cppuhelper/implbase.hxx b/include/cppuhelper/implbase.hxx
index 813ea3d..e97196d 100644
--- a/include/cppuhelper/implbase.hxx
+++ b/include/cppuhelper/implbase.hxx
@@ -24,6 +24,7 @@
 
 #include <cstddef>
 #include <exception>
+#include <utility>
 
 #include <com/sun/star/lang/XTypeProvider.hpp>
 #include <com/sun/star/uno/Any.hxx>
@@ -89,6 +90,11 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper:
             class_data, detail::ImplClassData<WeakImplHelper, Ifc...>>
     {};
 
+protected:
+    WeakImplHelper() {}
+
+    virtual ~WeakImplHelper() {}
+
 public:
     css::uno::Any SAL_CALL queryInterface(css::uno::Type const & aType)
         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -107,6 +113,43 @@ public:
     { return css::uno::Sequence<sal_Int8>(); }
 };
 
+template<typename BaseClass, typename... Ifc>
+class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper:
+    public BaseClass, public Ifc...
+{
+    struct cd:
+        rtl::StaticAggregate<
+            class_data, detail::ImplClassData<ImplInheritanceHelper, Ifc...>>
+    {};
+
+protected:
+    template<typename... Arg> ImplInheritanceHelper(Arg &&... arg):
+        BaseClass(std::forward<Arg>(arg)...)
+    {}
+
+    virtual ~ImplInheritanceHelper() {}
+
+public:
+    css::uno::Any SAL_CALL queryInterface(css::uno::Type const & aType)
+        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+    {
+        css::uno::Any ret(ImplHelper_queryNoXInterface(aType, cd::get(), this));
+        return ret.hasValue() ? ret : BaseClass::queryInterface(aType);
+    }
+
+    void SAL_CALL acquire() throw () SAL_OVERRIDE { BaseClass::acquire(); }
+
+    void SAL_CALL release() throw () SAL_OVERRIDE { BaseClass::release(); }
+
+    css::uno::Sequence<css::uno::Type> SAL_CALL getTypes()
+        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+    { return ImplInhHelper_getTypes(cd::get(), BaseClass::getTypes()); }
+
+    css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId()
+        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+    { return css::uno::Sequence<sal_Int8>(); }
+};
+
 }
 
 #endif


More information about the Libreoffice-commits mailing list