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 /xmlscript | |
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 'xmlscript')
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_export.cxx | 10 | ||||
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_import.cxx | 11 |
2 files changed, 4 insertions, 17 deletions
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx index f033beb12e5b..a5f4b436ba33 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/script/XLibraryContainerPassword.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <cppuhelper/implementationentry.hxx> +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::lang; @@ -111,16 +112,9 @@ namespace xmlscript } // XServiceInfo - sal_Bool XMLBasicExporterBase::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); } // XInitialization diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx index 08a2d54d42f8..85ad94498c6e 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/script/XLibraryContainerPassword.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <cppuhelper/implementationentry.hxx> +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::lang; @@ -569,20 +570,12 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x } // XServiceInfo - sal_Bool XMLBasicImporterBase::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); } // XImporter - void XMLBasicImporterBase::setTargetDocument( const Reference< XComponent >& rxDoc ) throw (IllegalArgumentException, RuntimeException) { |