summaryrefslogtreecommitdiff
path: root/include/vbahelper/vbahelperinterface.hxx
diff options
context:
space:
mode:
authorDouglas Mencken <dougmencken@gmail.com>2015-10-04 22:19:14 -0400
committerMichael Stahl <mstahl@redhat.com>2015-10-06 12:13:54 +0000
commit85b1f91779cd90eb1c7808909c2721239fc51dd1 (patch)
tree21ca582dc9435d15304a9ea80170482cf0c18bfb /include/vbahelper/vbahelperinterface.hxx
parent8e7a2a62d1bd14ea629b4cbbdccd0c9b9b14a6e5 (diff)
vba: convert to variadic InheritedHelperInterfaceImpl&WeakImpl etc
Variadic templates ~-i.e. templates, which can take an arbitrary number of arguments of any type-~ is new C++11 feature note that uno::Reference and cppu::UnoType can only take one parameter thus leave XNamedObjectCollectionHelper non-variadic in vbacollectionimpl.hxx Change-Id: I22e60fa050ee31d39ae8bb7cac06cf243c4587b1 Reviewed-on: https://gerrit.libreoffice.org/19145 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include/vbahelper/vbahelperinterface.hxx')
-rw-r--r--include/vbahelper/vbahelperinterface.hxx40
1 files changed, 9 insertions, 31 deletions
diff --git a/include/vbahelper/vbahelperinterface.hxx b/include/vbahelper/vbahelperinterface.hxx
index 2c9710090d34..989101c9c8f2 100644
--- a/include/vbahelper/vbahelperinterface.hxx
+++ b/include/vbahelper/vbahelperinterface.hxx
@@ -19,9 +19,7 @@
#ifndef INCLUDED_VBAHELPER_VBAHELPERINTERFACE_HXX
#define INCLUDED_VBAHELPER_VBAHELPERINTERFACE_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase.hxx>
#include <ooo/vba/XHelperInterface.hpp>
#include <vbahelper/vbahelper.hxx>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -53,8 +51,8 @@
// }
//
-template< typename Ifc1 >
-class SAL_DLLPUBLIC_TEMPLATE InheritedHelperInterfaceImpl : public Ifc1
+template< typename... Ifc >
+class SAL_DLLPUBLIC_TEMPLATE InheritedHelperInterfaceImpl : public Ifc...
{
protected:
css::uno::WeakReference< ov::XHelperInterface > mxParent;
@@ -99,34 +97,14 @@ public:
}
};
-template< typename Ifc1 >
-class SAL_DLLPUBLIC_TEMPLATE InheritedHelperInterfaceImpl1 : public InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > >
+template <typename... Ifc >
+class SAL_DLLPUBLIC_TEMPLATE InheritedHelperInterfaceWeakImpl : public InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper< Ifc... > >
{
- typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > > Base;
+ typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper< Ifc... > > Base;
public:
- InheritedHelperInterfaceImpl1< Ifc1 >() {}
- InheritedHelperInterfaceImpl1< Ifc1 >( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xContext ) {}
- InheritedHelperInterfaceImpl1< Ifc1 >( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
-};
-
-template< typename Ifc1, typename Ifc2 >
-class SAL_DLLPUBLIC_TEMPLATE InheritedHelperInterfaceImpl2 : public InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper2< Ifc1, Ifc2 > >
-{
- typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper2< Ifc1, Ifc2 > > Base;
-public:
- InheritedHelperInterfaceImpl2< Ifc1, Ifc2 >() {}
- InheritedHelperInterfaceImpl2< Ifc1, Ifc2 >( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xContext ) {}
- InheritedHelperInterfaceImpl2< Ifc1, Ifc2 >( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
-};
-
-template< typename Ifc1, typename Ifc2, typename Ifc3 >
-class SAL_DLLPUBLIC_TEMPLATE InheritedHelperInterfaceImpl3 : public InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper3< Ifc1, Ifc2, Ifc3 > >
-{
- typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper3< Ifc1, Ifc2, Ifc3 > > Base;
-public:
- InheritedHelperInterfaceImpl3< Ifc1, Ifc2, Ifc3 >() {}
- InheritedHelperInterfaceImpl3< Ifc1, Ifc2, Ifc3 >( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xContext ) {}
- InheritedHelperInterfaceImpl3< Ifc1, Ifc2, Ifc3 >( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
+ InheritedHelperInterfaceWeakImpl< Ifc... >() {}
+ InheritedHelperInterfaceWeakImpl< Ifc... >( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xContext ) {}
+ InheritedHelperInterfaceWeakImpl< Ifc... >( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
};