Bug 160342 - Unwanted spaces in the printout
Summary: Unwanted spaces in the printout
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
24.2.0.3 release
Hardware: All All
: medium normal
Assignee: Aron Budea
URL:
Whiteboard: target:24.8.0 target:24.2.3
Keywords: bibisected, bisected, regression
: 160438 160642 160664 (view as bug list)
Depends on:
Blocks: Print
  Show dependency treegraph
 
Reported: 2024-03-24 16:10 UTC by bernhard.weber
Modified: 2024-08-07 05:03 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Open the document, ignore macros, print into file (45.33 KB, application/vnd.oasis.opendocument.text)
2024-03-24 17:22 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bernhard.weber 2024-03-24 16:10:56 UTC
Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 12; OS: Windows 10.0 Build 22631; UI render: Skia/Grid; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

There is a problem with expression: the last character of a paragraph (letter, number or punctuation) is separated by a space.
Example: “Daten” becomes “Date n”, the house number “244” becomes “24 4”. The end of sentence character (., !, ?) is also separated from the text by a space.
The spaces that are not present in the text do not appear in the print preview in Libre Office (CTRL+Shift+O) but in the printer's print preview and in the printout.

You may find the original text and the result of printing here:
https://1drv.ms/f/s!AjORKledQKcygYUrBYEgXzwDcnSM5w?e=wPfhfD
Comment 1 Robert Großkopf 2024-03-24 17:22:20 UTC
Created attachment 193273 [details]
Open the document, ignore macros, print into file

Could confirm the buggy behavior with the attached document.

Open the document, print to file: At the end of many paragraphs will be added a space when using LO 24.2.2.1 on OpenSUSE 15.4 64bit rpm Linux.

This buggy behavior doesn't appear with LO 7.6.5.1 on the same system. So a regression.
Comment 2 BogdanB 2024-03-24 20:27:32 UTC
Also in
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c900850742efd4e1fb7c79c13c1b9a17fcd4981d
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

and in

Version: 24.2.1.1 (X86_64) / LibreOffice Community
Build ID: 359ef544e625d2ffbfced462ab37bd593ca85fa7
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 3 m_a_riosv 2024-03-24 23:51:31 UTC
Reproducible with
Version: 24.2.2.1 (X86_64) / LibreOffice Community
Build ID: bf759d854b5ab45b6ef0bfd22e51c6dc4fb8b882
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

But selecting with [Ctrl+A] and pasting in a new file, the issue is not reproduced.

On the attached file after [Ctrl+A] and [Ctrl+M], there are a couple of direct list style in paragraph of point 1.
Comment 4 Aron Budea 2024-03-25 01:47:11 UTC
The bug can be seen in the preview of the Print dialog as well (but not in Print Preview).

Bibisected to the following commit using repo bibisect-linux-64-24.2. Adding CC: to خالد حسني (Khaled Hosny).

https://cgit.freedesktop.org/libreoffice/core/commit/?id=172b500ccbc8dac0496cc2936a9bcca793c0b594
author		Khaled Hosny <khaled@libreoffice.org>	2023-07-16 21:11:40 +0300
committer	خالد حسني <khaled@libreoffice.org>	2023-07-23 06:01:23 +0200

vcl: Use more doubles for text measurements
Comment 5 Aron Budea 2024-04-06 20:52:32 UTC
https://gerrit.libreoffice.org/c/core/+/165860
Comment 6 Commit Notification 2024-04-07 07:36:05 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

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

tdf#160342 Unwanted space before end of line when printing

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 7 Aron Budea 2024-04-07 07:36:32 UTC
Backport to 24.2 is on gerrit.
Comment 8 Mike Kaganski 2024-04-07 08:16:38 UTC
*** Bug 160438 has been marked as a duplicate of this bug. ***
Comment 9 Commit Notification 2024-04-08 14:56:31 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

tdf#160342 Unwanted space before end of line when printing

It will be available in 24.2.3.

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 ProfYaffle 2024-04-09 10:28:47 UTC
I can confirm that the specific behaviour I reported in https://bugs.documentfoundation.org/show_bug.cgi?id=160342 is no longer apparent in the latest development builds, so it looks like you've fixed it for me (at least).

Thanks for the speedy response and action here, everyone. And nobody from MS even had to raise a "high priority ticket" ;)

Tested as fixed on:

Version: 24.2.3.0.0+ (X86_64) / LibreOffice Community
Build ID: 843b3abd2ab05c66533b12ef6a4b155247f99e58
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 11 ProfYaffle 2024-04-09 10:30:09 UTC
... or as I reported in https://bugs.documentfoundation.org/show_bug.cgi?id=160438, even. D'oh.
Comment 12 m_a_riosv 2024-04-12 15:53:06 UTC
*** Bug 160642 has been marked as a duplicate of this bug. ***
Comment 13 Mike Kaganski 2024-04-15 07:48:53 UTC
*** Bug 160664 has been marked as a duplicate of this bug. ***