summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx2
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx4
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 40e085349403..aeb401328429 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -464,7 +464,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLRemoveAll)
uno::Reference<io::XInputStream> xInputStream = xStream->getInputStream();
uno::Sequence<uno::Sequence<beans::StringPair>> aContentTypeInfo
= comphelper::OFOPXMLHelper::ReadContentTypeSequence(xInputStream, mxComponentContext);
- uno::Sequence<beans::StringPair>& rOverrides = aContentTypeInfo[1];
+ const uno::Sequence<beans::StringPair>& rOverrides = aContentTypeInfo[1];
CPPUNIT_ASSERT(
std::none_of(rOverrides.begin(), rOverrides.end(), [](const beans::StringPair& rPair) {
return rPair.First.startsWith("/_xmlsignatures/sig");
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 5852d16afd39..c222824376a5 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -303,8 +303,8 @@ void DocumentSignatureHelper::AppendContentTypes(const uno::Reference<embed::XSt
SAL_WARN("xmlsecurity.helper", "no defaults or overrides in aContentTypeInfo");
return;
}
- uno::Sequence<beans::StringPair>& rDefaults = aContentTypeInfo[0];
- uno::Sequence<beans::StringPair>& rOverrides = aContentTypeInfo[1];
+ const uno::Sequence<beans::StringPair>& rDefaults = aContentTypeInfo[0];
+ const uno::Sequence<beans::StringPair>& rOverrides = aContentTypeInfo[1];
for (OUString& rElement : rElements)
{
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 78ba5246cba9..f97de99c537f 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -511,10 +511,10 @@ void XMLSignatureHelper::ExportSignatureContentTypes(const css::uno::Reference<c
// Append rels and sigs to defaults, if it's not there already.
uno::Sequence<beans::StringPair>& rDefaults = aContentTypeInfo[0];
auto aDefaults = comphelper::sequenceToContainer< std::vector<beans::StringPair> >(rDefaults);
- if (std::none_of(rDefaults.begin(), rDefaults.end(), [](const beans::StringPair& rPair) { return rPair.First == "rels"; }))
+ if (std::none_of(std::cbegin(rDefaults), std::cend(rDefaults), [](const beans::StringPair& rPair) { return rPair.First == "rels"; }))
aDefaults.emplace_back("rels", "application/vnd.openxmlformats-package.relationships+xml");
- if (std::none_of(rDefaults.begin(), rDefaults.end(), [](const beans::StringPair& rPair) { return rPair.First == "sigs"; }))
+ if (std::none_of(std::cbegin(rDefaults), std::cend(rDefaults), [](const beans::StringPair& rPair) { return rPair.First == "sigs"; }))
aDefaults.emplace_back("sigs", "application/vnd.openxmlformats-package.digital-signature-origin");
rDefaults = comphelper::containerToSequence(aDefaults);