sw/source/filter/ww8/docxattributeoutput.cxx | 5 +++++ sw/source/filter/ww8/docxexport.cxx | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-)
New commits: commit 6639498a1517d1c8ba48db04c28207630945aa15 Author: Noel Grandin <[email protected]> AuthorDate: Tue Oct 28 15:03:04 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Oct 31 10:55:51 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 diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index f70ade9e3b48..d201a872eab8 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1321,7 +1321,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" ) commit 25ad702447b849767446f8d59e03d3b623d7ad7f Author: Noel Grandin <[email protected]> AuthorDate: Tue Oct 28 13:48:48 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Oct 31 10:55:41 2025 +0100 mso-test: emit w:sz in correct order in numbering xml When loading and then saving the document from moz#1197332-4, we end up with incorrect ordering of w:sz under w:rPr in numbering.xml Re-use our existing ordering logic to get the right order here. Change-Id: I218c52d36235a023d64420c41423daf09c87a89c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193090 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit a2cb8cd8f680c0a8b7f04162573603b4449018c5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193235 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 2ed1e16449be..56c0373e868b 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7953,6 +7953,8 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, if ( pOutSet ) { m_pSerializer->startElementNS(XML_w, XML_rPr); + // mark() before child elements. + InitCollectedRunProperties(); SfxItemSet aTempSet(*pOutSet); if ( pFont ) @@ -7971,6 +7973,9 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, WriteCollectedRunProperties(); + // Merge the marks for the ordered elements + m_pSerializer->mergeTopMarks(Tag_InitCollectedRunProperties); + m_pSerializer->endElementNS( XML_w, XML_rPr ); }
