Bug 160518 - DOCX: fix layout of hyphenated text by supporting allowHyphenationAtTrackBottom and useWord2013TrackBottomHyphenation
Summary: DOCX: fix layout of hyphenated text by supporting allowHyphenationAtTrackBott...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on: 132599
Blocks: Hyphenation
  Show dependency treegraph
 
Reported: 2024-04-04 10:01 UTC by László Németh
Modified: 2024-06-03 21:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
3-page document (useWord2013TrackBottomHyphenation = "1" and allowHyphenationAtTrackBottom = "0") (19.48 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-04-04 10:06 UTC, László Németh
Details
2-page document (allowHyphenationAtTrackBottom="1") (19.29 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-04-04 10:10 UTC, László Németh
Details
2-page flat ODF document (allowHyphenationAtTrackBottom="1") (4.81 KB, application/vnd.oasis.opendocument.text-flat-xml)
2024-05-20 10:52 UTC, László Németh
Details
3-page flat ODF document (4.81 KB, application/vnd.oasis.opendocument.text-flat-xml)
2024-05-20 10:53 UTC, László Németh
Details
composite screenshots of DOCX export of the 2-page flat ODF document (269.23 KB, image/jpeg)
2024-05-20 10:59 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2024-04-04 10:01:33 UTC
Description:
usage of compatSetting elements allowHyphenationAtTrackBottom and useWord2013TrackBottomHyphenation changes the layout of the DOCX documents, shifting the last hyphenated line of pages or columns to the next page or column. 

Steps to Reproduce:
1. Open the attached test document.

Actual Results:
Only 2 pages.

Expected Results:
Typeset in 3 pages, like MSO does. 


Reproducible: Always


User Profile Reset: No

Additional Info:
Documentation:

https://learn.microsoft.com/en-us/openspecs/office_standards/ms-docx/e0c0663e-a5e7-4a44-8360-b0b5df1f43e6

https://learn.microsoft.com/en-us/openspecs/office_standards/ms-docx/e6cd53b7-89ac-4c64-a6b2-cd1df8b08228
Comment 1 László Németh 2024-04-04 10:06:36 UTC
Created attachment 193486 [details]
3-page document (useWord2013TrackBottomHyphenation = "1" and allowHyphenationAtTrackBottom = "0")
Comment 2 László Németh 2024-04-04 10:10:03 UTC
Created attachment 193487 [details]
2-page document (allowHyphenationAtTrackBottom="1")
Comment 3 Commit Notification 2024-04-04 20:46:44 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c8ee0e8f581b8a6e41b1a6b8aa4d40b442c1d463

tdf160518 DOCX: import hyphenation-keep to fix layout

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2024-05-16 23:50:02 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b538729c90af470c33aeb3002750321ac8ac88be

tdf#160518 sw: fix DOCX import/export of hyphenation-keep

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 László Németh 2024-05-20 10:52:23 UTC
Created attachment 194211 [details]
2-page flat ODF document (allowHyphenationAtTrackBottom="1")
Comment 6 László Németh 2024-05-20 10:53:01 UTC
Created attachment 194212 [details]
3-page flat ODF document
Comment 7 László Németh 2024-05-20 10:59:10 UTC
Created attachment 194214 [details]
composite screenshots of DOCX export of the 2-page flat ODF document

Before the export fix (upper row): The document has 3-page broken layout in MSO (red).
After the export fix (bottom row): The document has 2-page layout in MSO, too.

Note: for the export, use "Word 2010–365 Document (.docx)" format, or in the command line:

soffice --convert-to "docx:Office Open XML Text" tdf160518_auto_in_default_paragraph_style.fodt