diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-09-25 15:41:29 -0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-07 17:01:33 +0000 |
commit | 7235d23267e4591e5cf47762abd3f63421b06904 (patch) | |
tree | 6353239b1c586642e22c5df892a7c0560e632fa5 /embeddedobj/test | |
parent | html: <li> is on/off - arrange list correctly (diff) | |
download | core-7235d23267e4591e5cf47762abd3f63421b06904.tar.gz core-7235d23267e4591e5cf47762abd3f63421b06904.zip |
fdo#54938: Adapt supportsService implementations to cppu::supportsService
Change-Id: I683c0d30c3286ed5d725d4eefe8b3977b82ee316
Reviewed-on: https://gerrit.libreoffice.org/6035
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embeddedobj/test')
-rw-r--r-- | embeddedobj/test/MainThreadExecutor/xexecutor.cxx | 10 | ||||
-rw-r--r-- | embeddedobj/test/mtexecutor/bitmapcreator.cxx | 10 | ||||
-rw-r--r-- | embeddedobj/test/mtexecutor/mainthreadexecutor.cxx | 10 |
3 files changed, 6 insertions, 24 deletions
diff --git a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx index 2634e7a336ff..1fdbb1092ac8 100644 --- a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx +++ b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx @@ -20,6 +20,7 @@ #include "xexecutor.hxx" #include <vcl/svapp.hxx> #include <osl/thread.hxx> +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star; @@ -109,17 +110,10 @@ OUString SAL_CALL UNOMainThreadExecutor::getImplementationName() return impl_staticGetImplementationName(); } -//------------------------------------------------------------------------- sal_Bool SAL_CALL UNOMainThreadExecutor::supportsService( const OUString& ServiceName ) throw ( uno::RuntimeException ) { - uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames(); - - for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( ServiceName == aSeq[nInd] ) - return sal_True; - - return sal_False; + return cppu::supportsService(this, ServiceName); } //------------------------------------------------------------------------- diff --git a/embeddedobj/test/mtexecutor/bitmapcreator.cxx b/embeddedobj/test/mtexecutor/bitmapcreator.cxx index 7f0907835681..3c81ccaa41c7 100644 --- a/embeddedobj/test/mtexecutor/bitmapcreator.cxx +++ b/embeddedobj/test/mtexecutor/bitmapcreator.cxx @@ -19,6 +19,7 @@ #include "bitmapcreator.hxx" +#include <cppuhelper/supportsservice.hxx> #include <vcl/bitmapex.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/stream.hxx> @@ -90,17 +91,10 @@ OUString SAL_CALL VCLBitmapCreator::getImplementationName() return impl_staticGetImplementationName(); } -//------------------------------------------------------------------------- sal_Bool SAL_CALL VCLBitmapCreator::supportsService( const OUString& ServiceName ) throw ( uno::RuntimeException ) { - uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames(); - - for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( ServiceName == aSeq[nInd] ) - return sal_True; - - return sal_False; + return cppu::supportsService(this, ServiceName); } //------------------------------------------------------------------------- diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx index 788c0e819fd1..1a0b70f6fa64 100644 --- a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx +++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx @@ -19,6 +19,7 @@ #include "mainthreadexecutor.hxx" +#include <cppuhelper/supportsservice.hxx> #include <vcl/svapp.hxx> using namespace ::com::sun::star; @@ -91,17 +92,10 @@ OUString SAL_CALL MainThreadExecutor::getImplementationName() return impl_staticGetImplementationName(); } -//------------------------------------------------------------------------- sal_Bool SAL_CALL MainThreadExecutor::supportsService( const OUString& ServiceName ) throw ( uno::RuntimeException ) { - uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames(); - - for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( ServiceName == aSeq[nInd] ) - return sal_True; - - return sal_False; + return cppu::supportsService(this, ServiceName); } //------------------------------------------------------------------------- |