Bug 149297 - EDITING: Text selection in vertical text positioned incorrectly
Summary: EDITING: Text selection in vertical text positioned incorrectly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.7.2 release
Hardware: All macOS (All)
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:7.6.0 target:7.5.5
Keywords:
: 101679 (view as bug list)
Depends on:
Blocks: CJK Vertical-Text
  Show dependency treegraph
 
Reported: 2022-05-25 21:54 UTC by Herouth Maoz
Modified: 2023-07-31 18:49 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Herouth Maoz 2022-05-25 21:54:29 UTC
When attempting to select CJK in a page with vertical layout, the edges of selection are positioned incorrectly. If the text is copied to clipboard, the copied text is off by a character.

The same text behaves normally if laid horizontally.

Version: 7.2.7.2 / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
Locale: en-US (en_IL.UTF-8); UI: en-US
Calc: threaded

To reproduce:

1. Copy some CJK text. For example,

しかし、通常、上位力士とは当たらない平幕の下位力士が、終盤まで優勝争いに絡んできた場合には横綱・大関との取組を組み、本来組まれるはずの横綱対大関・大関同士・大関対関脇などの対戦を消滅させることがある。

(Arbitrary text from JA Wikipedia)

2. Create a new Writer document and paste the text without formatting

3. Go to Format->Page Style, and choose Text direction: Right-to-left (vertical)

4. Try to select some text, positioning the cursor right on the edge of a character.

Result: The selection starts slightly lower.
Expected result: The entire character should be selected

5. Copy the selected text, and paste it in some text box or another document.

Result: The selection does not include the character before which the cursor was placed.
Expected result: The selection should include the nearest below the cursor at the time of selection.
Comment 1 Dieter 2022-06-09 05:28:10 UTC
I can't confirm it with

Version: 7.3.4.1 (x64) / LibreOffice Community
Build ID: 13668373362b52f6e3ebcaaecb031bd59a3ac66b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Could you please retest with actual version of LO 7.3?
=> NEEDINFO
Comment 2 Herouth Maoz 2022-06-10 13:31:47 UTC
I downloaded the following version, and the problem persists.

Version: 7.3.4.2 / LibreOffice Community
Build ID: 728fec16bd5f605073805c3c9e7c4212a0120dc5
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
Locale: en-IL (en_IL.UTF-8); UI: en-US
Calc: threaded

It may be Mac-specific.
Comment 3 Herouth Maoz 2022-10-02 09:22:07 UTC
The problem persists in LibreOffice 7.4.1.2.
Comment 4 BogdanB 2023-05-28 18:35:10 UTC
Herouth, you can NOT confirm your own bug. Please let the bug in Unconfirmed status, until someone else can reproduce the same bug.
Comment 5 Eyal Rozenberg 2023-05-28 18:42:34 UTC
Looks like this should block CJK, not RTL-CTL... right?
Comment 6 BogdanB 2023-05-28 18:51:57 UTC
Yes, thanks. I saw also RTL in the description, but you have right.
Comment 7 ⁨خالد حسني⁩ 2023-05-29 06:48:52 UTC
I think that the selection is correct, the glyphs, however, are rendered lower than they should so there is a mismatch between the text shown and the selection.

Can anyone reproduce on Linux or Windows or is it a macOS-only issue?
Comment 8 ⁨خالد حسني⁩ 2023-05-29 07:05:50 UTC
No shift on Linux, so probably a macOS only issue.
Comment 9 ⁨خالد حسني⁩ 2023-05-29 09:47:42 UTC
*** Bug 101679 has been marked as a duplicate of this bug. ***
Comment 10 Commit Notification 2023-05-29 14:13:29 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

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

tdf#149297: Fix Y position of vertical glyphs on macOS

It will be available in 7.6.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 11 Commit Notification 2023-05-31 06:57:27 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#149297: Fix Y position of vertical glyphs on macOS

It will be available in 7.5.5.

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.