diff options
author | Alexandre Vicenzi <vicenzi.alexandre@gmail.com> | 2014-01-25 16:24:52 -0200 |
---|---|---|
committer | Marcos Souza <marcos.souza.org@gmail.com> | 2014-02-03 14:35:46 +0000 |
commit | f9369d33a455b328f96fa554e3e942e64a40a4da (patch) | |
tree | 20916e357bd757412b977800a74141592928aaaf /embeddedobj | |
parent | some more continuous corrections (diff) | |
download | core-f9369d33a455b328f96fa554e3e942e64a40a4da.tar.gz core-f9369d33a455b328f96fa554e3e942e64a40a4da.zip |
fdo#54938 Convert to cppu::supportsService
Change-Id: I512c525029ebd63d261560d27e9f38bbe94f7e10
Reviewed-on: https://gerrit.libreoffice.org/7649
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
Diffstat (limited to 'embeddedobj')
-rw-r--r-- | embeddedobj/source/commonembedding/xfactory.cxx | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index b592306972f1..9bbb43c32252 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -35,7 +35,6 @@ using namespace ::com::sun::star; -//------------------------------------------------------------------------- uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); @@ -44,20 +43,17 @@ uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSuppo return aRet; } -//------------------------------------------------------------------------- OUString SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetImplementationName() { return OUString("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::impl_staticCreateSelfInstance( const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) { return uno::Reference< uno::XInterface >( *new OOoEmbeddedObjectFactory( comphelper::getComponentContext(xServiceManager) ) ); } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitFromEntry( const uno::Reference< embed::XStorage >& xStorage, const OUString& sEntName, @@ -149,7 +145,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta return xResult; } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor( const uno::Reference< embed::XStorage >& xStorage, const OUString& sEntName, @@ -213,7 +208,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta return xResult; } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitNew( const uno::Sequence< sal_Int8 >& aClassID, const OUString& /*aClassName*/, @@ -264,7 +258,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta return xResult; } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceUserInit( const uno::Sequence< sal_Int8 >& aClassID, const OUString& /*aClassName*/, @@ -326,8 +319,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta return xResult; } - -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceLink( const uno::Reference< embed::XStorage >& /*xStorage*/, const OUString& /*sEntName*/, @@ -381,7 +372,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta return xResult; } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceLinkUserInit( const uno::Sequence< sal_Int8 >& aClassID, const OUString& /*aClassName*/, @@ -447,7 +437,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta return xResult; } -//------------------------------------------------------------------------- OUString SAL_CALL OOoEmbeddedObjectFactory::getImplementationName() throw ( uno::RuntimeException ) { @@ -460,14 +449,12 @@ sal_Bool SAL_CALL OOoEmbeddedObjectFactory::supportsService( const OUString& Ser return cppu::supportsService(this, ServiceName); } -//------------------------------------------------------------------------- uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::getSupportedServiceNames() throw ( uno::RuntimeException ) { return impl_staticGetSupportedServiceNames(); } -//------------------------------------------------------------------------- uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); @@ -476,20 +463,17 @@ uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticG return aRet; } -//------------------------------------------------------------------------- OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetImplementationName() { return OUString("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticCreateSelfInstance( const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) { return uno::Reference< uno::XInterface >( *new OOoSpecialEmbeddedObjectFactory( comphelper::getComponentContext(xServiceManager) ) ); } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::createInstanceUserInit( const uno::Sequence< sal_Int8 >& aClassID, const OUString& /*aClassName*/, @@ -515,32 +499,22 @@ uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::crea return xResult; } -//------------------------------------------------------------------------- OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::getImplementationName() throw ( uno::RuntimeException ) { return impl_staticGetImplementationName(); } -//------------------------------------------------------------------------- sal_Bool SAL_CALL OOoSpecialEmbeddedObjectFactory::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); } -//------------------------------------------------------------------------- uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::getSupportedServiceNames() throw ( uno::RuntimeException ) { return impl_staticGetSupportedServiceNames(); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |