From 3d3293144b0e0d2d28136b1b2c7154d6352463b8 Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Wed, 16 Oct 2013 19:25:05 -0300 Subject: fdo#54938: Adapt svtools and comphelper module ... to use cppu::supportsService and other pieces. Change-Id: I16893b3d31a8055acd214ff23d01e63d38fe0826 Signed-off-by: Stephan Bergmann --- svtools/source/graphic/descriptor.cxx | 12 ++---------- svtools/source/graphic/renderer.cxx | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) (limited to 'svtools/source/graphic') diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 1f6515a5e143..16f3e507ff24 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -245,19 +246,10 @@ OUString SAL_CALL GraphicDescriptor::getImplementationName() return getImplementationName_Static(); } -// ------------------------------------------------------------------------------ - sal_Bool SAL_CALL GraphicDescriptor::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) { - uno::Sequence< OUString > aSNL( getSupportedServiceNames() ); - const OUString* pArray = aSNL.getConstArray(); - - for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) - if( pArray[i] == ServiceName ) - return true; - - return false; + return cppu::supportsService(this, ServiceName); } // ------------------------------------------------------------------------------ diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index 95097fbe7bd1..7d687ef96dce 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -139,19 +140,10 @@ OUString SAL_CALL GraphicRendererVCL::getImplementationName() return getImplementationName_Static(); } -// ------------------------------------------------------------------------------ - sal_Bool SAL_CALL GraphicRendererVCL::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) { - uno::Sequence< OUString > aSNL( getSupportedServiceNames() ); - const OUString* pArray = aSNL.getConstArray(); - - for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) - if( pArray[i] == ServiceName ) - return true; - - return false; + return cppu::supportsService(this, ServiceName); } // ------------------------------------------------------------------------------ -- cgit