diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-10-21 19:04:05 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-22 10:28:10 +0000 |
commit | ee5661ecd3bbeae38b04cd3f582a320a231d11bd (patch) | |
tree | 381d9afa0c831145551ade40b6d68f22919baaf6 /scripting/source/basprov/basprov.cxx | |
parent | c82a36f9c7d89fa434d3dff896c290964326f5bf (diff) |
fdo#54938: Adapt supportsService implementations..
to cppu::supportsService
Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14
Reviewed-on: https://gerrit.libreoffice.org/6370
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'scripting/source/basprov/basprov.cxx')
-rw-r--r-- | scripting/source/basprov/basprov.cxx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index 04e279faa2a4..cc0f4f9ce230 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/uri/UriReferenceFactory.hpp> #include <cppuhelper/implementationentry.hxx> +#include <cppuhelper/supportsservice.hxx> #include <rtl/uri.hxx> #include <osl/process.h> #include <osl/file.hxx> @@ -180,30 +181,17 @@ namespace basprov return bIsShared; } - // ----------------------------------------------------------------------------- // XServiceInfo - // ----------------------------------------------------------------------------- - OUString BasicProviderImpl::getImplementationName( ) throw (RuntimeException) { return getImplementationName_BasicProviderImpl(); } - // ----------------------------------------------------------------------------- - sal_Bool BasicProviderImpl::supportsService( const OUString& rServiceName ) throw (RuntimeException) { - Sequence< OUString > aNames( getSupportedServiceNames() ); - const OUString* pNames = aNames.getConstArray(); - const OUString* pEnd = pNames + aNames.getLength(); - for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames ) - ; - - return pNames != pEnd; + return cppu::supportsService(this, rServiceName); } - // ----------------------------------------------------------------------------- - Sequence< OUString > BasicProviderImpl::getSupportedServiceNames( ) throw (RuntimeException) { return getSupportedServiceNames_BasicProviderImpl(); |