summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-12 12:43:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-13 08:38:53 +0200
commitfdfd517a6f75e394ddcb1e195decbfed33ba56b9 (patch)
treee3bff14e5531affcd908415b4e85d7ceac4aa1fd /xmlsecurity
parente568c9dca8b93b96a8a130a8fb6f1bba1a33d6ea (diff)
loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/documentsignaturehelper.hxx2
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx7
2 files changed, 5 insertions, 4 deletions
diff --git a/xmlsecurity/inc/documentsignaturehelper.hxx b/xmlsecurity/inc/documentsignaturehelper.hxx
index d517787af0cf..b18ccf103e20 100644
--- a/xmlsecurity/inc/documentsignaturehelper.hxx
+++ b/xmlsecurity/inc/documentsignaturehelper.hxx
@@ -83,7 +83,7 @@ namespace DocumentSignatureHelper
const SignatureInformation & sigInfo, const DocumentSignatureAlgorithm alg);
bool equalsReferenceUriManifestPath(
- const OUString & rUri, const OUString & rPath);
+ std::u16string_view rUri, std::u16string_view rPath);
OUString GetDocumentContentSignatureDefaultStreamName();
OUString GetScriptingContentSignatureDefaultStreamName();
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 5c264f7885e6..af3d51154b54 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -42,6 +42,7 @@
#include <svx/xoutbmp.hxx>
#include <tools/diagnose_ex.h>
#include <xmloff/attrlist.hxx>
+#include <o3tl/string_view.hxx>
#include <xsecctl.hxx>
@@ -478,16 +479,16 @@ bool DocumentSignatureHelper::checkIfAllFilesAreSigned(
Returns true if both strings are equal.
*/
bool DocumentSignatureHelper::equalsReferenceUriManifestPath(
- const OUString & rUri, const OUString & rPath)
+ std::u16string_view rUri, std::u16string_view rPath)
{
//split up the uri and path into segments. Both are separated by '/'
std::vector<OUString> vUriSegments;
for (sal_Int32 nIndex = 0; nIndex >= 0; )
- vUriSegments.push_back(rUri.getToken( 0, '/', nIndex ));
+ vUriSegments.push_back(OUString(o3tl::getToken(rUri, 0, '/', nIndex )));
std::vector<OUString> vPathSegments;
for (sal_Int32 nIndex = 0; nIndex >= 0; )
- vPathSegments.push_back(rPath.getToken( 0, '/', nIndex ));
+ vPathSegments.push_back(OUString(o3tl::getToken(rPath, 0, '/', nIndex )));
if (vUriSegments.size() != vPathSegments.size())
return false;