From 218cd09611583437c05c33e2aa3b2b81cb416f98 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 14 Mar 2016 10:49:08 +0200 Subject: inline some use-once macros Change-Id: I7ebd8fe70b083a772118a1aab8cdfbf795d6f1e5 Reviewed-on: https://gerrit.libreoffice.org/23235 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/vbahelper/vbahelperinterface.hxx | 43 +++++++++++--------------------- 1 file changed, 14 insertions(+), 29 deletions(-) (limited to 'include/vbahelper') 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 -- cgit