Bug 162421 - RTL sequence breaks after linkified word
Summary: RTL sequence breaks after linkified word
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 153668 (view as bug list)
Depends on:
Blocks: Hyperlink RTL
  Show dependency treegraph
 
Reported: 2024-08-10 11:57 UTC by Eyal Rozenberg
Modified: 2024-08-19 10:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Presentation for quickly reproducing the bug (22.58 KB, application/vnd.oasis.opendocument.presentation)
2024-08-10 12:18 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2024-08-10 11:57:44 UTC
Reproduction instructions:

1. Create new drawing object (e.g. textbox)
2. Ensure the paragraph dir for the drawing object text is RTL
3. Enter an RTL-language word, e.g "אנציקלופדיה"
4. Select some characters from the beginning of the word, e.g. "אנציק"
5. Linkify the selection, (e.g. Ctrl+K and "http://www.libreoffice.org/" as the link URL)
6. Switch the paragraph direction to LTR.

Expected results:
The word אנציקלופדיה is shown, with the linkified part shaded

Actual results:
What's shown is first, "אנציק" (i.e. at the left, the beginning, of the paragraph), then right aawy "לופדיה" , or "לופדיהאנציק" overall, with the "אנציק " shaded.

This may have to do with bug 154103.
Comment 1 Eyal Rozenberg 2024-08-10 12:10:54 UTC
Seen with:

Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 01e6e4303e5a9966f102e0357fe0354a2f74a1c4
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US


Jonathan, could this and other aspects of dodgy URL behavior w.r.t. RTL be related to the "BiDi portions" logic you have been looking into in Writer?
Comment 2 Eyal Rozenberg 2024-08-10 12:18:03 UTC
Created attachment 195794 [details]
Presentation for quickly reproducing the bug

With this presentation:

1. Select the two textboxes with אנציקלופדיה
2. On the menus, navigate to Format > Paragraph... > Alignment
3. Switch "Text Direction" from RTL to LTR

... and you should see the bug manifest.
Comment 3 Jonathan Clark 2024-08-15 15:26:06 UTC
Confirming. Can reproduce in the following versions:

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: d6e8b0f3fc6e8af2b00cf4969fd0d2fa45b9a62e
CPU threads: 32; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2ca75d4133e2388b67d09a9d88969cd20dc68f26
CPU threads: 32; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

(In reply to Eyal Rozenberg from comment #1)
> Jonathan, could this and other aspects of dodgy URL behavior w.r.t. RTL be
> related to the "BiDi portions" logic you have been looking into in Writer?

Unfortunately, those changes are specific to Writer. Impress uses a separate implementation (Edit Engine).
Comment 4 Eyal Rozenberg 2024-08-16 19:43:21 UTC
This also happens:

1. For regular cells in Calc, which are set to LTR direction, and when you linkify part of the cell.
2. In Textboxes in Writer.

So it's not just an Impress thing.
Comment 5 Eyal Rozenberg 2024-08-19 10:50:47 UTC
*** Bug 153668 has been marked as a duplicate of this bug. ***