Bug 32181 - PRINTING: underlining in "Justified" aligned paragraph bleed over margin, also PDFEXPORT
Summary: PRINTING: underlining in "Justified" aligned paragraph bleed over margin, als...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.1.0 target:4.0.0.0.beta0 tar...
Keywords:
Depends on:
Blocks: mab3.5
  Show dependency treegraph
 
Reported: 2010-12-07 06:20 UTC by siriusb
Modified: 2023-10-16 13:38 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
The odt document (8.80 KB, application/vnd.oasis.opendocument.text)
2011-08-05 08:55 UTC, siriusb
Details
The result (5.07 KB, application/pdf)
2011-08-05 08:57 UTC, siriusb
Details
PDF screenshot in LO Draw (70.92 KB, image/png)
2011-08-22 02:55 UTC, ndd.filter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description siriusb 2010-12-07 06:20:36 UTC
Using LibreOffice on Arch Linux x64. Exporting doc to pdf with either cups-pdf or built-in pdf converter, underline doesn't stop at margin, so empty space is underlined after the text.

This bug is reported here, too :

[url]http://qa.openoffice.org/issues/show_bug.cgi?id=68503[/url]

[url]http://user.services.openoffice.org/en/forum/viewtopic.php?f=7&t=36431[/url]
Comment 1 siriusb 2010-12-29 00:35:44 UTC
Hi,

Is there any chance that it will be fixed? Or is there a solution how to deal with it until a fix is created? Thank you.
Comment 2 siriusb 2011-03-09 04:17:41 UTC
Bug still exist in the latest release, 3.3.1.
Comment 3 Don't use this account, use tml@iki.fi 2011-03-09 04:36:59 UTC
Please don't add comments like that. If there is no indication in a bug report that the bug has been fixed, it is safe to assume it has not been fixed in a micro update. Adding such comments just increases the amount of pointless mail developers need to "read". (As does this comment, of course, ha ha.)
Comment 4 Francisco Pina Martins 2011-03-09 08:20:48 UTC
I can confirm this bug.
Also in Archlinux x86_64. Version is the same: 3.3.1
Comment 5 siriusb 2011-04-26 07:27:49 UTC
Confirmed on irc channel freenode#libreoffice:
confirmed w/ distro-packed LO 3.3.2.2 (OOO330m19 Build:202), openSUSE 11.4/Tumbleweed x86_64

Also, I checked it on Win7 LO 3.3.2, same outcome.
Comment 6 Petr Mladek 2011-08-05 05:11:19 UTC
Could you please attach a test document that shows this behavior?
Comment 7 siriusb 2011-08-05 08:55:11 UTC
Created attachment 49967 [details]
The odt document

Exporting this document to pdf shows the underline goes over the margin.
Comment 8 siriusb 2011-08-05 08:57:27 UTC
Created attachment 49968 [details]
The result

You can see in this pdf file that underline doesn't stop at margin.
Comment 9 Petr Mladek 2011-08-15 04:00:53 UTC
I see it with LO-3.4.2 as well.
Comment 10 ndd.filter 2011-08-22 02:55:58 UTC
Created attachment 50445 [details]
PDF screenshot in LO Draw
Comment 11 ndd.filter 2011-08-22 02:58:12 UTC
(In reply to comment #10)
> Created an attachment (id=50445) [details]
> PDF screenshot in LO Draw

This might be obvious from the screenshot. The last justification area appears to duplicate itself before a new line.
Comment 12 Björn Michaelsen 2011-12-23 11:34:18 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 13 Goran Rakic 2011-12-23 14:28:40 UTC
Confirmed on GNU/Linux 64bit with 3.5.0-beta1
Comment 14 Rainer Bielefeld Retired 2012-03-27 07:32:49 UTC
[Reproducible] with "LibreOffice 3.5.1.2 German UI/Locale [Build-ID: dc9775d-05ecbee-0851ad3-1586698-727bf66] on German WIN7 Home Premium (64bit) 
and with "LibreOffice Portable 3.3.0  - WIN7  Home Premium (64bit) German UI [OOO330m19 (Build:6) tag libreoffice-3.3.0.4]" 

Problem already visible in Print dialog print preview (but not in Page preview from menu or toolbar), and still a problem with in 3.6.

Modified Version due to
<http://wiki.documentfoundation.org/BugReport_Details#Version>

3.4 lifecycle is terminated, so shift to “Bug 37361 LibreOffice 3.5 most annoying bugs”

@Cédric:
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug
Comment 15 Rainer Bielefeld Retired 2012-03-27 07:40:40 UTC
Only for the sake of completeness: similar effects overline, strikethrough show the same problem.
Comment 16 dE 2012-04-01 09:24:14 UTC
This's not reproducible using 3.5.1.2 (350m1(Build:102))
Comment 17 dE 2012-04-01 09:28:32 UTC
No, actually it is, but here the margins in the original document are not respected.
Comment 18 tommy27 2012-10-15 21:02:58 UTC
"printing bleed" and "PDF export blees" still reproducible on 3.6.1.
Comment 19 Rainer Bielefeld Retired 2012-10-16 14:56:32 UTC
OOo 3.4.0 shows the same problem, so inherited from OOo. Still reproducible with 3.6.3.1” German UI/ German Locale [Build-ID: f8fce0b] on German WIN7 Home Premium (64bit) 

It seems as if the print process for each line tails as much underlined space (with underlining) as there is found between the words in the line (more or less). 

We already shifted it from 3.4 MAB to 3.5 MAB, I now nominated this one as possible HardHack on <http://wiki.documentfoundation.org/HardHacks#General>
Comment 20 Werner 2012-12-12 15:38:13 UTC
I tried to fix this in the patch https://gerrit.libreoffice.org/1300

There seems to be one additional whitespace (with variable width?) at the end of each line with soft line break. Underlining this whitespace leads to the problem described here. This is also visible for left- or right-aligned text, where one additional space at the end of line is underlined. For some reason this whitespace can be very big for block-aligned text...

Changed the functions which draw textlines to omit a possible trailing whitespace.
Comment 21 tommy27 2012-12-13 13:58:07 UTC
hopefully the oldest MAB is going to be fixed. i hope the patch review will be positive.
Comment 22 Caolán McNamara 2012-12-13 16:30:12 UTC
Catch with your approach though is that underlining e.g. something ending in two spaces like "  " gives just one space underlined, not both. fme's original comment in https://issues.apache.org/ooo/show_bug.cgi?id=68503 suggests that he thought that the extra space that are getting underlined are being placed there by the writer SwHolePortion layout class and that it might be possible to tweak that to not emit the spaces unless in some specific mode that requires it
Comment 23 Caolán McNamara 2012-12-13 16:39:57 UTC
lets try that approach
Comment 24 Not Assigned 2012-12-13 16:42:58 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d3a9e97164c0071d8b18f8dcf4197ec7c5c5c2f9

Resolves: fdo#32181 #i68503# don't emit pesky space unless in tagged pdf mode



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 25 Caolán McNamara 2012-12-13 16:44:49 UTC
That seems to work, patch proposed for cherry-picking to various 3-x series
Comment 26 Not Assigned 2012-12-14 08:26:22 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=944e304f0541030f9efdec3f5474a99a93f4c28f&g=libreoffice-4-0

Resolves: fdo#32181 #i68503# don't emit pesky space unless in tagged pdf mode


It will be available in LibreOffice 4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 27 Not Assigned 2012-12-14 08:32:57 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=df15a240c409ddfd71bb969f2427c7ad846321e6&g=libreoffice-3-6

Resolves: fdo#32181 #i68503# don't emit pesky space unless in tagged pdf mode


It will be available in LibreOffice 3.6.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 28 Not Assigned 2012-12-14 08:44:32 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fbb6995155ad98e339a33366db69be78df3f2ee8&g=libreoffice-3-5

Resolves: fdo#32181 #i68503# don't emit pesky space unless in tagged pdf mode


It will be available in LibreOffice 3.5.8.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 29 siriusb 2012-12-15 11:19:17 UTC
Checked v3.6.5 daily build and I also found the bug fixed. Thank you.
Comment 30 Buovjaga 2023-10-16 13:38:18 UTC
Notes for unit test writers:

Revert has to be done manually and it seems a bit complicated.

PDF exports can be checked with pdfium, see for example sw/qa/extras/globalfilter/globalfilter.cxx