Bug 82176

Summary: CJK: Cursor position, line selection and non-printing characters do not take account of hanging punctuation
Product: LibreOffice Reporter: Matthew Francis <fdbugs>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: h3734236, philipz85, pswo10680
Priority: medium    
Version: Inherited From OOo   
Hardware: Other   
OS: All   
Whiteboard: target:5.1.0 target:5.0.3
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 83066    
Attachments: Screenshot for (2)
Screenshot for (3)
Test Japanese file with hanging punctuation

Description Matthew Francis 2014-08-05 06:07:07 UTC
Observed on OSX 10.9.4 / LO 4.3.0.4

"Hanging punctuation" is used in CJK languages to ensure that, for instance, a full stop is not shifted by itself onto a following line, but instead extends into the page margin

However, while the visual display of text is correct (with the exception of bug 58604), the current implementation in LO has the following usability issues:

1. When moving the cursor position using the keyboard, the visible cursor does not move when advancing over hanging punctuation. It is therefore impossible to visibly determine whether the cursor is before or after the hanging punctuation

2. Similarly, when expanding a text selection using the keyboard (Shift-Right), the visible selection does not change when advancing over hanging punctuation. (When a whole paragraph is selected, the margin of the selection is correctly shifted right to cover hanging punctuation within the paragraph. However, for text selected within a paragraph, this does not occur)

3. When "View -> Nonprinting Characters" is selected, a paragraph mark is overlaid on hanging punctuation at the end of a paragraph
Comment 1 Matthew Francis 2014-08-05 06:11:20 UTC
Created attachment 104050 [details]
Screenshot for (2)

This shows the selection failing to cover hanging punctuation (the "。"). Note that all the text within this sample paragraph is selected, but not the whole paragraph itself
Comment 2 Matthew Francis 2014-08-05 06:14:09 UTC
Created attachment 104051 [details]
Screenshot for (3)

This shows non-printing characters and hanging punctuation overlaid on one another

Note the "ΒΆ" and "。" jumbled together at the end of the second line
Comment 3 Matthew Francis 2014-08-05 06:20:08 UTC
Created attachment 104053 [details]
Test Japanese file with hanging punctuation

Not sure how reproducible the font layout will be across platforms. If necessary, add/remove characters and/or adjust the font size until the "。" hangs in the margin
Comment 4 Yousuf Philips (jay) (retired) 2014-09-06 12:19:30 UTC
Confirmed in 4.3.2 and master on Linux.

Version: 4.4.0.0.alpha0+
Build ID: 8e4defe4b59a72fbe82f94b26e233ba36640c739
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2014-09-02_01:46:56
Comment 5 Commit Notification 2015-08-15 23:08:01 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

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

Fix tdf#82176 CJK: Cursor position, line selection and non-printing

It will be available in 5.1.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 6 Commit Notification 2015-10-01 09:26:37 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b63dcee30b7b7138f135fffd5abb6d9fa16d4f28&h=libreoffice-5-0

Fix tdf#82176 CJK: Cursor position, line selection and non-printing

It will be available in 5.0.3.

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.