summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-05-13 11:57:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-05-14 13:11:50 +0200
commitaf16aa625682b649e8843237652b9246d519cbae (patch)
tree2ea597c328318d6b75761b71af313bef02b5ad77 /xmlsecurity
parentf40cbba63f13e7081fc5901769651fd4d43ea34d (diff)
Improve loplugin:stringview
Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for operator call arguments. (The "rather than copy, pass subView()" diagnostic is already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly for operator call arguments.) (And many call sites don't even require an explicit [u16]string_view, esp. with the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator += overloads". Just some test code in sal/qa/ that explicitly tests the O[U]String functionality had to be excluded.) Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx2
-rw-r--r--xmlsecurity/workben/pdfverify.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index c612962f86e3..5f1e6a1286e7 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -556,7 +556,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testTokenize)
// Just make sure the tokenizer finishes without an error, don't look at the signature.
CPPUNIT_ASSERT(aDocument.Read(aStream));
- if (OUString(rName) == "tdf107149.pdf")
+ if (rName == u"tdf107149.pdf")
// This failed, page list was empty.
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aDocument.GetPages().size());
}
diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx
index 16856129fa5e..0951eb7c5e65 100644
--- a/xmlsecurity/workben/pdfverify.cxx
+++ b/xmlsecurity/workben/pdfverify.cxx
@@ -83,7 +83,7 @@ int pdfVerify(int nArgc, char** pArgv)
InitVCL();
comphelper::ScopeGuard g([] { DeInitVCL(); });
- if (nArgc > 3 && OString(pArgv[3]) == "-p")
+ if (nArgc > 3 && pArgv[3] == std::string_view("-p"))
{
generatePreview(pArgv[1], pArgv[2]);
return 0;
@@ -110,7 +110,7 @@ int pdfVerify(int nArgc, char** pArgv)
osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(pArgv[2]), aOutURL);
bool bRemoveSignature = false;
- if (nArgc > 3 && OString(pArgv[3]) == "-r")
+ if (nArgc > 3 && pArgv[3] == std::string_view("-r"))
bRemoveSignature = true;
SvFileStream aStream(aInURL, StreamMode::READ);