Bug 107284 - RTL paragraphs spontaneously become LTR
Summary: RTL paragraphs spontaneously become LTR
Status: RESOLVED DUPLICATE of bug 103158
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL-CTL
  Show dependency treegraph
 
Reported: 2017-04-20 08:33 UTC by Nadav Har'El
Modified: 2017-04-23 01:43 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Tiny example document with an RTL paragraph and can be used to demonstrate the bug (7.93 KB, application/vnd.oasis.opendocument.text)
2017-04-22 14:41 UTC, Nadav Har'El
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nadav Har'El 2017-04-20 08:33:45 UTC
This is a recent regression - I've been using OpenOffice and LibreOffice for years and writing RTL documents a lot (in Hebrew) and haven't seen this bug until a few weeks ago.

What I'm seeing is that in a mostly RTL document, with most (if not all) of its paragraphs having right-to-left directionality, when I edit the document and pass over paragraphs, "suddenly" a certain existing paragraph changes direction and becomes LTR (and all the consequences this entails, like its last line being aligned to the wrong end, etc.). I can easily fix this by changing the paragraph's direction to RTL again - but later I will have the same problem on another paragraph, and it's very annoying.

I am not exactly sure how to trigger this bug, although it is very reproducable (I've seen in in multiple unrelated Hebrew documents I'm editing). I *think* it has to do with selecting text with the mouse, although just selecting text doesn't seem to consistently trigger this bug.
Comment 1 Nadav Har'El 2017-04-20 08:35:00 UTC
I forgot to mention, I'm using LibreOffice 5.2.6.2 (from Fedora 25's package), so when I said this is a "recent" regression I mean it happened around 5.2.6.2 - not recent in the sense of the current master version.
Comment 2 Nadav Har'El 2017-04-20 08:44:19 UTC
I an easy way to reproduce this bug 100% of the time:

1. open a new empty writer document
2. mark the current paragraph as RTL (Format->Paragraph, Alignment, Text direction->right to left).
3. Write something. Even just "hello" in English. You'll see it on the right side, as expected.
4. Use the "shift write-arrow" key several times to select the entire word "hello".
5. Now press the "control" key (as if preparing to control-C - but just press "control" and nothing else).
6. As soon as you pressed the "control" key (it even need to depress it, it happens as soon as you press) the directionality of the paragraph "flips" to LTR, and the word "hello" jumps to the left.
Comment 3 Xisco Faulí 2017-04-21 12:36:31 UTC Comment hidden (obsolete)
Comment 4 Nadav Har'El 2017-04-22 14:41:51 UTC
Created attachment 132752 [details]
Tiny example document with an RTL paragraph and can be used to demonstrate the bug
Comment 5 Nadav Har'El 2017-04-22 14:47:13 UTC
I just attached a document which can help you demonstrate the bug.
This document has one short paragraph, which is in English, but marked an "RTL" paragraph and accordingly is aligned to the right.

If you open this document, select the whole row by hitting Shift-LeftArrow multiple times, and then hit the "control" key, you'll see the paragraph suddenly jump to the left! With the "Format -> Paragraph" menu, you can see it mysteriously acquired the "left-to-right" text direction, which is what caused it to jump to the left. Of course, people don't expect that selecting text or hitting the "control" key changes a paragraph's direction....
Comment 6 Khaled Hosny (inactive) 2017-04-23 01:43:06 UTC
You get this issue by simply pressing ctrl+shift, which is the same as bug 103158.

*** This bug has been marked as a duplicate of bug 103158 ***