From 74c876e615fe575657d0a083f5a3781d4020f0c4 Mon Sep 17 00:00:00 2001 From: Alexandre Vicenzi Date: Sat, 25 Jan 2014 10:06:29 -0200 Subject: fdo#54938 Convert chart2 to cppu::supportsService Change-Id: I26e993a6b0dfc54637651b1a093d896faf5b42d3 Reviewed-on: https://gerrit.libreoffice.org/7644 Tested-by: LibreOffice gerrit bot Reviewed-by: Marcos Souza Tested-by: Marcos Souza --- chart2/workbench/addin/sampleaddin.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'chart2/workbench') diff --git a/chart2/workbench/addin/sampleaddin.cxx b/chart2/workbench/addin/sampleaddin.cxx index 7fe53ae1c02d..1c964f7cf67e 100644 --- a/chart2/workbench/addin/sampleaddin.cxx +++ b/chart2/workbench/addin/sampleaddin.cxx @@ -18,6 +18,7 @@ */ #include "sampleaddin.hxx" +#include #include #include @@ -633,16 +634,7 @@ OUString SAL_CALL SampleAddIn::getImplementationName() throw( uno::RuntimeExcept sal_Bool SAL_CALL SampleAddIn::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) { - uno::Sequence< OUString > aServiceSeq = getSupportedServiceNames_Static(); - - sal_Int32 nLength = aServiceSeq.getLength(); - for( sal_Int32 i=0; i < nLength; i++ ) - { - if( ServiceName.equals( aServiceSeq[ i ] )) - return sal_True; - } - - return sal_False; + return cppu::supportsService(this, ServiceName); } uno::Sequence< OUString > SAL_CALL SampleAddIn::getSupportedServiceNames() -- cgit