sw/source/filter/ww8/docxexport.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit f1a5e69c51c95ae7f87d5a818555ed94116fefb9 Author: Noel Grandin <[email protected]> AuthorDate: Tue Oct 28 15:03:04 2025 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Mon Nov 3 15:57:07 2025 +0100 mso-test: do not emit empty cryptAlgorithmSid attribute which is not valid. When loading and then saving the forum-mso-en4-551337.docx document. Change-Id: Id67844b25b264e937b3bcdbf7a9dcbea76c2cd40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193092 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit d2c71e9b6054fae66a553da869e752f8c55f76d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193236 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193275 diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 7832509fa8f7..10313ee9c4ea 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1315,7 +1315,10 @@ void DocxExport::WriteSettings() if (sal_Int32 nToken = DocxStringGetToken(aTokens, rAttribute.Name)) { OUString sValue = rAttribute.Value.get<OUString>(); - xAttributeList->add(FSNS(XML_w, nToken), sValue.toUtf8()); + if (nToken == XML_cryptAlgorithmSid && sValue.isEmpty()) + ; // ignore, empty is not valid OOXML + else + xAttributeList->add(FSNS(XML_w, nToken), sValue.toUtf8()); if ( nToken == XML_edit && sValue == "trackedChanges" ) bIsProtectionTrackChanges = true; else if ( nToken == XML_edit && sValue == "readOnly" )
