diff options
-rw-r--r-- | xmlsecurity/source/helper/documentsignaturemanager.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx index 218360d2f60c..c65b73c3b85d 100644 --- a/xmlsecurity/source/helper/documentsignaturemanager.cxx +++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx @@ -355,11 +355,10 @@ bool DocumentSignatureManager::add(const uno::Reference<security::XCertificate>& std::vector< OUString > aElements = DocumentSignatureHelper::CreateElementList(mxStore, meSignatureMode, DocumentSignatureAlgorithm::OOo3_2); DocumentSignatureHelper::AppendContentTypes(mxStore, aElements); - sal_Int32 nElements = aElements.size(); - for (sal_Int32 n = 0; n < nElements; n++) + for (OUString const& rUri : aElements) { - bool bBinaryMode = !isXML(aElements[n]); - maSignatureHelper.AddForSigning(nSecurityId, aElements[n], bBinaryMode, bAdESCompliant); + bool bBinaryMode = !isXML(rUri); + maSignatureHelper.AddForSigning(nSecurityId, rUri, bBinaryMode, bAdESCompliant); } maSignatureHelper.SetDateTime(nSecurityId, Date(Date::SYSTEM), tools::Time(tools::Time::SYSTEM)); |