diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-09 15:17:26 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-09 18:21:59 +0200 |
commit | fac093e5e63bd53bae3de552fedba927bd5c4561 (patch) | |
tree | 7b921dc813a6d6e0df55ef6d15edabb76e52bd40 /xmlsecurity/source/framework | |
parent | 2479ab8b788ca000f2e979d0858de8d05de8e858 (diff) |
Simplify Sequence iterations in xmlscript, xmlsecurity
Use range-based loops or replace with comphelper or STL functions
Change-Id: I3d63811caf80c87a9d560087e1f0d933ebcc0d55
Reviewed-on: https://gerrit.libreoffice.org/72040
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/framework')
-rw-r--r-- | xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx index c83c7751e794..869f1bf26371 100644 --- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx +++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <rtl/ustring.hxx> #include <framework/xmlsignaturetemplateimpl.hxx> +#include <comphelper/sequence.hxx> using namespace ::com::sun::star::uno ; using ::com::sun::star::lang::XMultiServiceFactory ; @@ -97,12 +98,7 @@ OUString SAL_CALL XMLSignatureTemplateImpl::getImplementationName() { /* XServiceInfo */ sal_Bool SAL_CALL XMLSignatureTemplateImpl::supportsService( const OUString& serviceName) { 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 comphelper::findValue(seqServiceNames, serviceName) != -1; } /* XServiceInfo */ |