summaryrefslogtreecommitdiff
path: root/include/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-14 10:49:08 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-14 11:06:48 +0000
commit218cd09611583437c05c33e2aa3b2b81cb416f98 (patch)
tree1b3b99677e6acff1f6224f9bd7441f161fcf2596 /include/vbahelper
parentf7965b0bcd559451c471a26bf5fd6f542887d95e (diff)
inline some use-once macros
Change-Id: I7ebd8fe70b083a772118a1aab8cdfbf795d6f1e5 Reviewed-on: https://gerrit.libreoffice.org/23235 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/vbahelper')
-rw-r--r--include/vbahelper/vbahelperinterface.hxx43
1 files changed, 14 insertions, 29 deletions
diff --git a/include/vbahelper/vbahelperinterface.hxx b/include/vbahelper/vbahelperinterface.hxx
index 1ec99155e270..d72200771350 100644
--- a/include/vbahelper/vbahelperinterface.hxx
+++ b/include/vbahelper/vbahelperinterface.hxx
@@ -108,33 +108,6 @@ public:
};
-/** Helper macro to implement the method 'getServiceImplName()' of the
- 'ooo.vba.XHelperInterface' interface. Will return the class name as service
- implementation name.
- */
-#define VBAHELPER_IMPL_GETSERVICEIMPLNAME( classname ) \
-OUString classname::getServiceImplName() \
-{ \
- return OUString( #classname ); \
-}
-
-
-/** Helper macro to implement the method 'getServiceNames()' for a single
- service name.
- */
-#define VBAHELPER_IMPL_GETSERVICENAMES( classname, servicename ) \
-css::uno::Sequence< OUString > classname::getServiceNames() \
-{ \
- static css::uno::Sequence< OUString > saServiceNames; \
- if( saServiceNames.getLength() == 0 ) \
- { \
- saServiceNames.realloc( 1 ); \
- saServiceNames[ 0 ] = servicename; \
- } \
- return saServiceNames; \
-}
-
-
/** Helper macro to declare the methods 'getServiceImplName()' and
'getServiceNames()' of the 'ooo.vba.XHelperInterface' interface in a class
declaration.
@@ -149,8 +122,20 @@ css::uno::Sequence< OUString > classname::getServiceNames() \
return the class name as service implementation name.
*/
#define VBAHELPER_IMPL_XHELPERINTERFACE( classname, servicename ) \
-VBAHELPER_IMPL_GETSERVICEIMPLNAME( classname ) \
-VBAHELPER_IMPL_GETSERVICENAMES( classname, servicename )
+OUString classname::getServiceImplName() \
+{ \
+ return OUString( #classname ); \
+} \
+css::uno::Sequence< OUString > classname::getServiceNames() \
+{ \
+ static css::uno::Sequence< OUString > saServiceNames; \
+ if( saServiceNames.getLength() == 0 ) \
+ { \
+ saServiceNames.realloc( 1 ); \
+ saServiceNames[ 0 ] = servicename; \
+ } \
+ return saServiceNames; \
+}
#endif