Bug Hunting Session
Bug 58604 - Line breaks don't stick to hanging punctuation
Summary: Line breaks don't stick to hanging punctuation
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.4.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.5.0
Keywords:
: 62545 (view as bug list)
Depends on:
Blocks: CJK
  Show dependency treegraph
 
Reported: 2012-12-21 07:33 UTC by y3kcjd5
Modified: 2017-06-15 17:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Demo document. Notes and screenshot included. (120.11 KB, application/vnd.oasis.opendocument.text)
2012-12-21 07:33 UTC, y3kcjd5
Details
Screenshot LibreOffice 3.6.4.3 under Ubuntu 12.10 (163.88 KB, image/png)
2012-12-21 10:12 UTC, Jorendc
Details
Screenshot LibreOffice Version 4.1.0.0.alpha0+ under Ubuntu 12.10 (164.21 KB, image/png)
2012-12-21 10:13 UTC, Jorendc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description y3kcjd5 2012-12-21 07:33:52 UTC
Created attachment 71902 [details]
Demo document. Notes and screenshot included.

I've found that line breaks aren't treated as nicely as regular paragraph breaks when it comes to hanging punctuation.
I don't remember if it was an Asian text only option, but when hanging punctuation is on, if punctuation is the last character in a line it'll be squeezed in on that line, even if there normally wouldn't be enough space.
Further, if hanging punctuation is then followed by a paragraph break, that paragraph break will also hang on to the end of the line.
If, however, instead of a paragraph break a line break (far more common) follows the hanging punctuation, the line break gets pushed to the next line, resulting in an empty line following the hanging punctuation. This problem has been around for a while (at least since 3.6). Win7x64Ult.
Comment 1 Jorendc 2012-12-21 10:11:42 UTC
Only the 'non-printable character' for 'new line'/'enter' is behind the margins of the document.

It seems like I can't reproduce the 'point' falling of the document. I'll upload 2 screenshots. One of LibreOffice 3.6.4.3 (Dutch) and LibreOffice 4.1.0.0.alpha0+ (Build ID: b1a4afa3b45d7b256eaf5aa88497b092f0139c8) (No helppack installed). No regression (document in both version are identical).
Comment 2 Jorendc 2012-12-21 10:12:34 UTC
Created attachment 71915 [details]
Screenshot LibreOffice 3.6.4.3 under Ubuntu 12.10
Comment 3 Jorendc 2012-12-21 10:13:07 UTC
Created attachment 71916 [details]
Screenshot LibreOffice Version 4.1.0.0.alpha0+ under Ubuntu 12.10
Comment 4 Jorendc 2012-12-21 10:38:41 UTC
I can reproduce

How to reproduce:
*Open demo document
*Show non-printable characters
*Select the first Japanese sentence (without the 'point')
*Font size -> 38

Current behavior: that 'point', that you didn't resize, is falling the 'document' (behind right boundary). The paragraph break is behind that point, also falling of the document (not that big problem, but important later in this 'how to reproduce)
Expected behavior: point don't fall of document, so the point is still at the second line.

*Put your cursor at the beginning of the following (Japanese) sentence
*Hit backspace (= delete paragraph character)
*Shift+enter

Current behavior: the paragraph character isn't replaced by a 'hard enter'(shift+enter) character. The hard enter create a gap between first and second sentence. This is a more appropriate behavior, because we're working NORMALLY on the second line. The point is still falling of document.

Expected behavior: the 'hard enter' just replace the 'paragraph character' (='enter'). Same behavior as a paragraph character.

NB: if you delete the paragraph character, and then hit 'enter' again, the paragraph character is also at the first line (=same as before we delete it).

Ubuntu 12.10
LibreOffice 3.6.4.3 (Build-id: 360m1(Build:3)); Dutch UI;
Comment 5 y3kcjd5 2012-12-21 10:50:02 UTC
Fr those unfamiliar with Japanese print: In Asian languages it is common to allow punctuation to hang off the end of a line beyond the normal text borders. In LibreOffice this is enabled by an option called 'Allow hanging punctuation' under the Asian Typography tab of the paragraph formatting dialog. This is normal behavior. The bug in this report is that line breaks do not hang off of (stay on the same line as) hanging punctuation like paragraph breaks do.
Comment 6 Jorendc 2012-12-21 10:58:23 UTC
(In reply to comment #4)
> I can reproduce
> 
> How to reproduce:
> *Open demo document
> *Show non-printable characters
> *Select the first Japanese sentence (without the 'point')
> *Font size -> 38
> 
Ok, I didn't know that. Not that familiar with Japanase :).
> Current behavior: that 'point', that you didn't resize, is falling of the
> 'document' (behind right boundary). The paragraph break is behind that
> point, also falling of the document (not that big problem, but important
> later in this 'how to reproduce)
NOT A BUG:
> Expected behavior: point don't fall of document, so the point is still at
> the second line.

A BUG:
> *Put your cursor at the beginning of the following (Japanese) sentence
> *Hit backspace (= delete paragraph character)
> *Shift+enter
> 
> Current behavior: the paragraph character isn't replaced by a 'hard
> enter'(shift+enter) character. The hard enter create a gap between first and
> second sentence. This is a more appropriate behavior, because we're working
> NORMALLY on the second line. The point is still falling of document.
> 
> Expected behavior: the 'hard enter' just replace the 'paragraph character'
> (='enter'). Same behavior as a paragraph character.
> 
> NB: if you delete the paragraph character, and then hit 'enter' again, the
> paragraph character is also at the first line (=same as before we delete it).
> 
> Ubuntu 12.10
> LibreOffice 3.6.4.3 (Build-id: 360m1(Build:3)); Dutch UI;
Comment 7 flamingdescent 2013-06-21 01:12:23 UTC
*** Bug 62545 has been marked as a duplicate of this bug. ***
Comment 8 QA Administrators 2015-09-04 02:48:23 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2016-09-20 10:29:31 UTC Comment hidden (obsolete)
Comment 10 y3kcjd5 2017-04-15 15:40:31 UTC
Still broken as of 5.1; the test document (first attachment) still behaves as described within. If this were fixed, the second set of text should look (almost) exactly like the first.
Comment 11 Commit Notification 2017-06-05 15:26:30 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

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

tdf#58604 keep line break follows hanging punctuation.

It will be available in 5.5.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 12 y3kcjd5 2017-06-14 13:49:35 UTC
Nope, no apparent change in behavior. The line break is still getting pushed to the next line.
Comment 13 y3kcjd5 2017-06-14 14:16:03 UTC
Oop I was using the wrong version; it looks fixed as of the latest dailies (libo-master64~2017-06-14_00.16.05_LibreOfficeDev_6.0.0.0.alpha0_Win_x64)
Comment 14 Timur 2017-06-15 17:53:44 UTC
This is your bug. If you say it's fixed, just mark as such. I did it now.