Bug 153136 - Lines with spaces have wrong height in DOCX
Summary: Lines with spaces have wrong height in DOCX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.6.0 target:7.5.1
Keywords: filter:docx
Depends on:
Blocks:
 
Reported: 2023-01-21 07:12 UTC by Mike Kaganski
Modified: 2023-12-20 11:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Large space characters (16.35 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-01-21 07:12 UTC, Mike Kaganski
Details
Large space characters (16.43 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-01-21 08:22 UTC, Mike Kaganski
Details
Word (left) vs. Writer (right): page 1 (44.59 KB, image/png)
2023-01-21 08:38 UTC, Mike Kaganski
Details
Word (left) vs. Writer (right): page 2 (42.81 KB, image/png)
2023-01-21 08:40 UTC, Mike Kaganski
Details
Word (left) vs. Writer (right): page 3 (51.47 KB, image/png)
2023-01-21 08:41 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2023-01-21 07:12:28 UTC
Created attachment 184813 [details]
Large space characters

The attachment has three pages, each of them listing the Unicode characters from 'Separator, Space' category [Zs]. The first page uses normal paragraphs, the second and the third have tables with them. The space characters are formatted with text size 48, while labels have size 12.

In Word, some paragraphs on the first and the second pages have resulting height corresponding to text size 12, ignoring the height of space characters on them. These lines are marked red. On the third page, all table rows have automatic heights corresponding to text size 48.

This is related to the IgnoreTabsAndBlanksForLineCalculation compat flag.
Comment 1 Mike Kaganski 2023-01-21 08:22:28 UTC
Created attachment 184814 [details]
Large space characters

A better sample with line shading
Comment 2 Mike Kaganski 2023-01-21 08:38:33 UTC
Created attachment 184815 [details]
Word (left) vs. Writer (right): page 1

On page 1:

Word has small line heights for:   U+0020, U+2002, U+2003, U+2005, and U+3000.
Writer has small line heights for: U+0020, U+2006, and U+3000.
Comment 3 Mike Kaganski 2023-01-21 08:40:31 UTC
Created attachment 184816 [details]
Word (left) vs. Writer (right): page 2

On page 2:

Word has small line heights for:   U+0020, U+2002, U+2003, U+2005, and U+3000.
Writer has small line heights for: U+0020, U+2006, and U+3000.

This is the same as on page 1, so in this case, table cells behave as simple paragraphs.
Comment 4 Mike Kaganski 2023-01-21 08:41:33 UTC
Created attachment 184817 [details]
Word (left) vs. Writer (right): page 3

On page 3:

Word has all cells' heights large.
Writer has small line heights for: U+0020, U+2006, and U+3000.
Comment 5 Commit Notification 2023-01-23 16:57:01 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/23555ec4058521262860d48d976eba8563d9ba98

tdf#153136: fix IgnoreTabsAndBlanksForLineCalculation compat flag

It will be available in 7.6.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 6 Commit Notification 2023-01-24 11:48:06 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/5609e09b1a145da28d74e3c5929be7efdc1a301c

tdf#153136: fix IgnoreTabsAndBlanksForLineCalculation compat flag

It will be available in 7.5.1.

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 7 Timur 2023-09-15 14:18:32 UTC
I guess we can close this. Thanks Mike.