diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-12-05 19:18:01 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-09 17:08:33 +0100 |
commit | cccc6c4ebcc508576d9cf609a649d4d3d76d61eb (patch) | |
tree | 0e467741d6abd39915ecd6ed4ffbf71cce956c0c /sd/source/ui/unoidl/randomnode.cxx | |
parent | 326aa3ff4d86c5709ae85ab71fd2c6828bbe7559 (diff) |
fdo#54938: Convert sd to use cppu::supportsService
Change-Id: I1aaecbc9f7b5ca0ca2009caf38013054f84cbecc
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/source/ui/unoidl/randomnode.cxx')
-rw-r--r-- | sd/source/ui/unoidl/randomnode.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sd/source/ui/unoidl/randomnode.cxx b/sd/source/ui/unoidl/randomnode.cxx index a18fd1c22619..45221ce0fc48 100644 --- a/sd/source/ui/unoidl/randomnode.cxx +++ b/sd/source/ui/unoidl/randomnode.cxx @@ -31,6 +31,7 @@ #include <comphelper/processfactory.hxx> #include <cppuhelper/implbase5.hxx> +#include <cppuhelper/supportsservice.hxx> #include <osl/mutex.hxx> #include "CustomAnimationPreset.hxx" @@ -153,11 +154,6 @@ private: // -------------------------------------------------------------------- -static const sal_Char* pSN1 = "com.sun.star.animations.ParallelTimeContainer"; -static const sal_Char* pSN2 = "com.sun.star.comp.sd.RandomAnimationNode"; - -// -------------------------------------------------------------------- - SD_DLLPUBLIC Reference< XInterface > RandomAnimationNode_createInstance( sal_Int16 nPresetClass ) { Reference< XInterface > xInt( static_cast<XWeak*>( new RandomAnimationNode( nPresetClass ) ) ); @@ -183,8 +179,9 @@ OUString RandomNode__getImplementationName() throw( RuntimeException ) Sequence< OUString > SAL_CALL RandomNode_getSupportedServiceNames() throw( RuntimeException ) { - static const OUString aSN2( OUString::createFromAscii( pSN2 ) ); - Sequence< OUString > aSeq( &aSN2, 1 ); + Sequence< OUString > aSeq( 2 ); + aSeq[0] = "com.sun.star.animations.ParallelTimeContainer"; + aSeq[1] = "com.sun.star.comp.sd.RandomAnimationNode"; return aSeq; } @@ -671,7 +668,7 @@ OUString RandomAnimationNode::getImplementationName() throw() // XServiceInfo sal_Bool RandomAnimationNode::supportsService(const OUString& ServiceName) throw() { - return ServiceName.equalsAscii( pSN1 ) || ServiceName.equalsAscii( pSN2 ); + return cppu::supportsService(this, ServiceName); } // XServiceInfo |