Bug 162220 - LibreOffice 24 justifies a wide range of paragraphs incorrectly (in the case of paragraph lines without portions, i.e. without text spans)
Summary: LibreOffice 24 justifies a wide range of paragraphs incorrectly (in the case ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.2 target:24...
Keywords: regression
: 162934 162977 162980 163079 (view as bug list)
Depends on: 162109
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2024-07-27 05:18 UTC by OldCoder
Modified: 2024-11-01 16:09 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX file that demonstrates the issue (7.19 KB, application/octet-stream)
2024-07-27 05:20 UTC, OldCoder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description OldCoder 2024-07-27 05:18:44 UTC
Description:
All releases or snapshots of LibreOffice 24 that I've tested, including (a) both 24.2 and 24.8 and (b) both official EXEs and copies of LibreOffice built from source, justify a wide range of paragraohs incorrectly.

The problem doesn't occur with LibreOffice 7.

I've tested this for months. It happens under both Linux and Windows. The problem is 100% reproducible; i.e., for documents that demonstrate the issue, it occurs every time.

The problem doesn't occur with every font. However, it does occur with common fonts such as Liberation Serif.

If I set a minimum character spacing manually, the problem seems to go away. I've tried to produce a patch to do that without causing other issues, but so far I've been unsuccessful.

I don't see a way to attach a DOCX file to a Bugzilla report. So, I've uploaded a DOCX file that demonstrates the issue to the following link:

https://laclin.com/test240726.docx

Just open that file in LibreOffice 24.2 or 24.8 and you should observe the issue.

If you'd like me to test a source patch, I can do that. I can build either 24.2 or 24.8.


Steps to Reproduce:
1. Download the short DOCX file at https://laclin.com/test240726.docx
2. I'll try to attach the DOCX file here as well
3. Open the DOCX file in Libreoffice 24.2 or 24.8
4. You can use either Windows or Linux
5. The document is a single paragraph. Look at the last line.


Actual Results:
The last line of the paragraph extends past the paragraph width instead of wrapping to produce a justified paragraph.


Expected Results:
The paragraph should be justified.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
The following is copied manually because copy-paste isn't working for that window:

LibreOffice
Version: 24.2.3.2 (x86) / LibreOffice Community
Build: 433d9c2 ... this part is too long to copy by hand
Environment: CPU threads: 8; OS: Windows 10.0 Build 19045

The problem occurs with *every* release of LibreOffice [Writer] 24 that I've tried, not just the release identified above. It occurs both with official EXEs and with copies built from source. It also occurs both with Windows and with Linux.
Comment 1 OldCoder 2024-07-27 05:20:46 UTC
Created attachment 195547 [details]
DOCX file that demonstrates the issue
Comment 2 Mike Kaganski 2024-07-27 06:54:33 UTC
Thanks for the report!

(In reply to OldCoder from comment #0)
> The following is copied manually because copy-paste isn't working for that
> window:

Note that there is a dedicated button for copying in the About dialog.

*** This bug has been marked as a duplicate of bug 162109 ***
Comment 3 László Németh 2024-08-25 11:27:21 UTC
Not a duplicate (missing portion length, not only missing justification of the last line).
Comment 4 László Németh 2024-08-29 15:06:58 UTC
Proposed fix: https://gerrit.libreoffice.org/c/core/+/172599
Comment 5 Commit Notification 2024-08-29 22:59:46 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22eac3145ca62d15b47d95f4df60ce38d4f5aa46

tdf#162220 sw smart justify: fix shrinking for single portion lines

It will be available in 25.2.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 László Németh 2024-08-29 23:03:12 UTC
Fixed in master, back-port has been started to version 24.8.

@OldCoder, Mike: many thanks for the report and feedback!
Comment 7 Commit Notification 2024-08-31 14:20:23 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1a87cd290282ea723c5d1a0d80c958b705b9d7ec

tdf#162109 tdf#162220 sw smart justify: add unit tests

It will be available in 25.2.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 8 Commit Notification 2024-09-03 06:31:46 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/53d132f07f273f9795ad04a6f36fe7c4478faed7

tdf#162220 sw smart justify: fix shrinking for single portion lines

It will be available in 24.8.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.
Comment 9 Commit Notification 2024-09-03 06:32:50 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/5bf29163c0242b2d113d1d6019ed83f41299c0e4

tdf#162109 tdf#162220 sw smart justify: add unit tests

It will be available in 24.8.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.
Comment 10 Commit Notification 2024-09-03 09:41:35 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/4de11f83776600d732daeea5ddf9906effb89ee5

tdf#162220 sw smart justify: fix shrinking for single portion lines

It will be available in 24.2.7.

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 11 Commit Notification 2024-09-03 09:41:39 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/309baeb104310708f771f50b8481654b0ac251ac

tdf#162109 tdf#162220 sw smart justify: add unit tests

It will be available in 24.2.7.

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 12 Xisco Faulí 2024-09-13 10:17:44 UTC
*** Bug 162934 has been marked as a duplicate of this bug. ***
Comment 13 steve 2024-09-13 12:06:43 UTC
Fix verified in Version: 25.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: bcadc9a6ec5be2541e259f0fa18022c0661c8df7
CPU threads: 12; OS: macOS 14.6.1; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 14 steve 2024-09-16 14:20:28 UTC
*** Bug 162977 has been marked as a duplicate of this bug. ***
Comment 15 steve 2024-09-16 14:21:42 UTC
*** Bug 162980 has been marked as a duplicate of this bug. ***
Comment 16 Mike Kaganski 2024-09-21 13:01:36 UTC
*** Bug 163079 has been marked as a duplicate of this bug. ***