xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx             |    4 
+--
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |   11 
+---------
 2 files changed, 4 insertions(+), 11 deletions(-)

New commits:
commit a2c9b446243c153653537227da4731ebc945fb73
Author:     Canberk TURAN <[email protected]>
AuthorDate: Mon Jan 27 11:01:25 2020 +0300
Commit:     Muhammet Kara <[email protected]>
CommitDate: Sat Feb 1 10:20:28 2020 +0100

    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 <[email protected]>

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" };
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to