sw/source/filter/ww8/docxexport.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit bb7fd5f928da6fa051d9d238d7c5b754a53020f1 Author: Noel Grandin <[email protected]> AuthorDate: Tue Oct 28 10:49:50 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Oct 30 18:28:32 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 diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 14c59e0d5424..5ed61dba6249 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1277,9 +1277,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), @@ -1287,6 +1284,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));
