Bug 158776 - DOCX import: unnecessary shrinking of spaces
Summary: DOCX import: unnecessary shrinking of spaces
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:24.2.0.2
Keywords:
Depends on:
Blocks: DOCX-Paragraph DOCX-compatibilityMode-15
  Show dependency treegraph
 
Reported: 2023-12-19 13:16 UTC by László Németh
Modified: 2024-03-28 06:02 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
MSO PDF export (10.94 KB, application/pdf)
2023-12-19 21:57 UTC, László Németh
Details
Writer PDF export after the fix (29.39 KB, application/pdf)
2023-12-19 21:57 UTC, László Németh
Details
composite screenshots of before (black) and after (red) (1.04 MB, image/jpeg)
2023-12-20 00:03 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 2023-12-19 13:16:18 UTC
Description:
The fix for Bug 119908 is not fully interoperable: sometimes shrinks spaces more, than needed for interoperability.

Steps to Reproduce:
1. Open (last) test file of Bug 158333.
2. Check line 11 of paragraph 4.

Actual Results:
It "venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus", i.e. it contains the extra word "cursus".

Expected Results:
Only "venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis".


Reproducible: Always


User Profile Reset: No

Additional Info:
See Bug 119908.
Comment 1 Commit Notification 2023-12-19 21:18:59 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/36bfc86e27fa03ee16f87819549ab126c5a68cac

tdf#119908 tdf#158776 sw smart justify: shrink only spaces

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 2 László Németh 2023-12-19 21:57:31 UTC
Created attachment 191516 [details]
MSO PDF export
Comment 3 László Németh 2023-12-19 21:57:51 UTC
Created attachment 191517 [details]
Writer PDF export after the fix
Comment 4 László Németh 2023-12-20 00:03:16 UTC
Created attachment 191520 [details]
composite screenshots of before (black) and after (red)

right composite screenshot shows fixing the last line break difference using space shrinking instead of line shrinking
Comment 5 Mike Kaganski 2023-12-27 02:18:34 UTC
FTR: https://www.unicode.org/reports/tr14/ is a Unicode Standard Annex that describes line breaking algorithm; in particular, it discusses differences of space (SP) and other whitespace characters ("Breaking Spaces" and "Tabs" under BA) wrt shrinking.
Comment 6 Commit Notification 2023-12-28 12:50:25 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/8d247e3ad47e0b828437abb019e1573dbb1c05b1

tdf#119908 tdf#158776 sw smart justify: shrink only spaces

It will be available in 24.2.0.2.

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.