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 /unoxml/source/rdf | |
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 'unoxml/source/rdf')
-rw-r--r-- | unoxml/source/rdf/CBlankNode.cxx | 8 | ||||
-rw-r--r-- | unoxml/source/rdf/CLiteral.cxx | 8 | ||||
-rw-r--r-- | unoxml/source/rdf/CURI.cxx | 8 | ||||
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 9 |
4 files changed, 8 insertions, 25 deletions
diff --git a/unoxml/source/rdf/CBlankNode.cxx b/unoxml/source/rdf/CBlankNode.cxx index f4540cfd1d0f..8b469299765c 100644 --- a/unoxml/source/rdf/CBlankNode.cxx +++ b/unoxml/source/rdf/CBlankNode.cxx @@ -20,6 +20,7 @@ #include "CNodes.hxx" #include <cppuhelper/implbase3.hxx> +#include <cppuhelper/supportsservice.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/rdf/XBlankNode.hpp> @@ -72,12 +73,7 @@ OUString SAL_CALL CBlankNode::getImplementationName() throw (css::uno::RuntimeEx ::sal_Bool SAL_CALL CBlankNode::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > serviceNames = comp_CBlankNode::_getSupportedServiceNames(); - for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) { - if (serviceNames[i] == serviceName) - return sal_True; - } - return sal_False; + return cppu::supportsService(this, serviceName); } css::uno::Sequence< OUString > SAL_CALL CBlankNode::getSupportedServiceNames() throw (css::uno::RuntimeException) diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx index 14c3fca88d95..e19d4cfaab42 100644 --- a/unoxml/source/rdf/CLiteral.cxx +++ b/unoxml/source/rdf/CLiteral.cxx @@ -20,6 +20,7 @@ #include "CNodes.hxx" #include <cppuhelper/implbase3.hxx> +#include <cppuhelper/supportsservice.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/rdf/XLiteral.hpp> @@ -81,12 +82,7 @@ OUString SAL_CALL CLiteral::getImplementationName() throw (css::uno::RuntimeExce ::sal_Bool SAL_CALL CLiteral::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > serviceNames = comp_CLiteral::_getSupportedServiceNames(); - for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) { - if (serviceNames[i] == serviceName) - return sal_True; - } - return sal_False; + return cppu::supportsService(this, serviceName); } css::uno::Sequence< OUString > SAL_CALL CLiteral::getSupportedServiceNames() throw (css::uno::RuntimeException) diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx index 63ff77ed0c7a..474135e77d47 100644 --- a/unoxml/source/rdf/CURI.cxx +++ b/unoxml/source/rdf/CURI.cxx @@ -20,6 +20,7 @@ #include "CNodes.hxx" #include <cppuhelper/implbase3.hxx> +#include <cppuhelper/supportsservice.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/rdf/XURI.hpp> @@ -81,12 +82,7 @@ OUString SAL_CALL CURI::getImplementationName() throw (css::uno::RuntimeExceptio ::sal_Bool SAL_CALL CURI::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > serviceNames = comp_CURI::_getSupportedServiceNames(); - for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) { - if (serviceNames[i] == serviceName) - return sal_True; - } - return sal_False; + return cppu::supportsService(this, serviceName); } css::uno::Sequence< OUString > SAL_CALL CURI::getSupportedServiceNames() throw (css::uno::RuntimeException) diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 120c0cad26a3..e25514f3ca05 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -54,6 +54,7 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase3.hxx> #include <cppuhelper/basemutex.hxx> +#include <cppuhelper/supportsservice.hxx> #include <comphelper/stlunosequence.hxx> #include <comphelper/sequenceasvector.hxx> @@ -820,13 +821,7 @@ throw (uno::RuntimeException) ::sal_Bool SAL_CALL librdf_Repository::supportsService( OUString const & serviceName) throw (uno::RuntimeException) { - uno::Sequence< OUString > serviceNames - = comp_librdf_Repository::_getSupportedServiceNames(); - for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) { - if (serviceNames[i] == serviceName) - return sal_True; - } - return sal_False; + return cppu::supportsService(this, serviceName); } uno::Sequence< OUString > SAL_CALL |