summaryrefslogtreecommitdiff
path: root/chart2/source/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-08 14:22:10 +0200
committerNoel Grandin <noel@peralex.com>2014-12-09 12:55:37 +0200
commit3380e2acdfbb1e83f718369f5a2c5e4a63bc406d (patch)
tree515795a0c174c42337eb9ff7c8f36cc875253d87 /chart2/source/inc
parent389da62249b82afc6614845386163d362094336c (diff)
use cppuhelper::suppportsService helper method in chart2
Change-Id: Ica22513d84061e57c2c3d0fb3b6411c7b0572099
Diffstat (limited to 'chart2/source/inc')
-rw-r--r--chart2/source/inc/ServiceMacros.hxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/chart2/source/inc/ServiceMacros.hxx b/chart2/source/inc/ServiceMacros.hxx
index 69fae2e7adbc..7097eb66d7be 100644
--- a/chart2/source/inc/ServiceMacros.hxx
+++ b/chart2/source/inc/ServiceMacros.hxx
@@ -19,6 +19,8 @@
#ifndef INCLUDED_CHART2_SOURCE_INC_SERVICEMACROS_HXX
#define INCLUDED_CHART2_SOURCE_INC_SERVICEMACROS_HXX
+#include <cppuhelper/supportsservice.hxx>
+
/*
to use these macros the supported services and the implementation name needs to be static
especially you need to implement (declaration is contained in macro already):
@@ -57,18 +59,10 @@ OUString Class::getImplementationName_Static() \
return ImplName; \
} \
\
-sal_Bool SAL_CALL Class::supportsService( const OUString& ServiceName ) \
+sal_Bool SAL_CALL Class::supportsService( const OUString& rServiceName ) \
throw( css::uno::RuntimeException, std::exception ) \
{ \
- css::uno::Sequence< OUString > aSNL = getSupportedServiceNames(); \
- const OUString* pArray = aSNL.getArray(); \
- for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) \
- { \
- if( pArray[ i ] == ServiceName ) \
- return sal_True; \
- } \
- \
- return sal_False; \
+ return cppu::supportsService(this, rServiceName); \
} \
\
css::uno::Sequence< OUString > SAL_CALL Class::getSupportedServiceNames() \