sw/source/filter/ww8/docxexport.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 9b2be7d4942a42ff21f68f2949625398e163b787 Author: Noel Grandin <[email protected]> AuthorDate: Tue Oct 28 10:49:50 2025 +0200 Commit: Miklos Vajna <[email protected]> CommitDate: Fri Oct 31 10:56:36 2025 +0100 mso-test: emit w:hyphenationZone in correct place When loading and then saving the document from tdf#100072 , we end up with incorrect ordering of the w:hyphenationZone element, which causes ms-office to think the document is corrupt Change-Id: Ic34407cbbfc61ed160d079c2cd20adefe3acf901 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193081 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 632cdb7b7bbfd17e11e75a408f8adf51a979c8b2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193208 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193240 Reviewed-by: Miklos Vajna <[email protected]> diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index e3c72dcb585a..3f608f7c9a1a 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1271,9 +1271,6 @@ void DocxExport::WriteSettings() bool bHyphenationZone = false; if (pColl && (pZoneItem = pColl->GetItemIfSet(RES_PARATR_HYPHENZONE, false))) { - if (pZoneItem->IsNoCapsHyphenation()) - pFS->singleElementNS(XML_w, XML_doNotHyphenateCaps); - if ( sal_Int16 nHyphenZone = pZoneItem->GetTextHyphenZone() ) { pFS->singleElementNS(XML_w, XML_hyphenationZone, FSNS(XML_w, XML_val), @@ -1281,6 +1278,9 @@ void DocxExport::WriteSettings() bHyphenationZone = true; } + if (pZoneItem->IsNoCapsHyphenation()) + pFS->singleElementNS(XML_w, XML_doNotHyphenateCaps); + if ( sal_Int16 nMaxHyphens = pZoneItem->GetMaxHyphens() ) pFS->singleElementNS(XML_w, XML_consecutiveHyphenLimit, FSNS(XML_w, XML_val), OString::number(nMaxHyphens));
