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 | |
parent | 8e37c7ae282f10724d6322aa028a7dd6b698f071 (diff) |
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')
-rw-r--r-- | embeddedobj/source/commonembedding/xfactory.cxx | 11 | ||||
-rw-r--r-- | embeddedobj/source/general/xcreator.cxx | 11 | ||||
-rw-r--r-- | embeddedobj/source/msole/xdialogcreator.cxx | 9 | ||||
-rw-r--r-- | embeddedobj/source/msole/xolefactory.cxx | 10 | ||||
-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 |
7 files changed, 14 insertions, 57 deletions
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 58567275318e..5a964bcaedb8 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -25,7 +25,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <comphelper/processfactory.hxx> - +#include <cppuhelper/supportsservice.hxx> #include "xfactory.hxx" #include "commonembobj.hxx" @@ -454,17 +454,10 @@ OUString SAL_CALL OOoEmbeddedObjectFactory::getImplementationName() return impl_staticGetImplementationName(); } -//------------------------------------------------------------------------- sal_Bool SAL_CALL OOoEmbeddedObjectFactory::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/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index d3bb4ccbeb11..64d2e03ee395 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -30,7 +30,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <comphelper/processfactory.hxx> - +#include <cppuhelper/supportsservice.hxx> #include <xcreator.hxx> #include <dummyobject.hxx> @@ -445,17 +445,10 @@ OUString SAL_CALL UNOEmbeddedObjectCreator::getImplementationName() return impl_staticGetImplementationName(); } -//------------------------------------------------------------------------- sal_Bool SAL_CALL UNOEmbeddedObjectCreator::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/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index 72d950836a6e..dce9eba9971d 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -33,6 +33,7 @@ #include "platform.h" #include <comphelper/mimeconfighelper.hxx> #include <comphelper/processfactory.hxx> +#include <cppuhelper/supportsservice.hxx> #include "xdialogcreator.hxx" #include "oleembobj.hxx" @@ -343,13 +344,7 @@ OUString SAL_CALL MSOLEDialogObjectCreator::getImplementationName() sal_Bool SAL_CALL MSOLEDialogObjectCreator::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/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index 11e7a7f6fe3f..65bf507c9078 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -27,6 +27,7 @@ #include "xolefactory.hxx" #include "oleembobj.hxx" +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star; @@ -307,17 +308,10 @@ OUString SAL_CALL OleEmbeddedObjectFactory::getImplementationName() return impl_staticGetImplementationName(); } -//------------------------------------------------------------------------- sal_Bool SAL_CALL OleEmbeddedObjectFactory::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/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); } //------------------------------------------------------------------------- |