summaryrefslogtreecommitdiff
path: root/xmlsecurity/source
diff options
context:
space:
mode:
authorCanberk TURAN <canberkkturann@gmail.com>2020-01-27 11:01:25 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2020-02-01 10:20:28 +0100
commita2c9b446243c153653537227da4731ebc945fb73 (patch)
tree2f09b21965968e4c72122c0b8acb1d345a1d19a1 /xmlsecurity/source
parent322f31dcf5c07025cf96b3de3fb1f258acce27c7 (diff)
tdf#54938: Adapt supportsService implementations to cppu::supportsService
Change-Id: I82fa5528c879f288822fe9795d7d7da19f0abbee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87485 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r--xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx11
2 files changed, 4 insertions, 11 deletions
diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
index 586a8f70c7a1..de6cf54cd206 100644
--- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
+++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
@@ -21,6 +21,7 @@
#include <rtl/ustring.hxx>
#include <framework/xmlsignaturetemplateimpl.hxx>
#include <comphelper/sequence.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star::uno ;
using ::com::sun::star::lang::XMultiServiceFactory ;
@@ -97,8 +98,7 @@ OUString SAL_CALL XMLSignatureTemplateImpl::getImplementationName() {
/* XServiceInfo */
sal_Bool SAL_CALL XMLSignatureTemplateImpl::supportsService( const OUString& serviceName) {
- Sequence< OUString > seqServiceNames = getSupportedServiceNames() ;
- return comphelper::findValue(seqServiceNames, serviceName) != -1;
+ return cppu::supportsService(this, serviceName);
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index e1e7b8d12760..d296d885e0f3 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -34,7 +34,7 @@
#include "x509certificate_mscryptimpl.hxx"
#include <comphelper/servicehelper.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
+#include <cppuhelper/supportsservice.hxx>
#include <xmlsec-wrapper.h>
#include "akmngr.hxx"
@@ -164,15 +164,8 @@ OUString SAL_CALL SecurityEnvironment_MSCryptImpl::getImplementationName() {
/* XServiceInfo */
sal_Bool SAL_CALL SecurityEnvironment_MSCryptImpl::supportsService( const OUString& serviceName) {
- uno::Sequence< OUString > seqServiceNames = getSupportedServiceNames() ;
- const OUString* pArray = seqServiceNames.getConstArray() ;
- for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) {
- if( *( pArray + i ) == serviceName )
- return true ;
- }
- return false ;
+ return cppu::supportsService(this, serviceName);
}
-
/* XServiceInfo */
uno::Sequence< OUString > SAL_CALL SecurityEnvironment_MSCryptImpl::getSupportedServiceNames() {
uno::Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.SecurityEnvironment" };