Bug 146154 - Wrong amount of selected text is highlighted in mixed LTR/RTL text
Summary: Wrong amount of selected text is highlighted in mixed LTR/RTL text
Status: RESOLVED DUPLICATE of bug 144890
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.4.1 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL-CTL
  Show dependency treegraph
 
Reported: 2021-12-09 21:42 UTC by William Friedman
Modified: 2022-02-18 15:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example of the problem (814.71 KB, video/mp4)
2021-12-10 03:34 UTC, William Friedman
Details
The test document used in the video. (9.00 KB, application/vnd.oasis.opendocument.text)
2021-12-26 17:48 UTC, William Friedman
Details
Comparison of the behavior in LO 7.1.5 and 7.2.4 (3.07 MB, video/mp4)
2021-12-31 20:42 UTC, William Friedman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Friedman 2021-12-09 21:42:21 UTC
Description:
When selecting text that is the opposite direction of the paragraph (RTL text in a LTR paragraph and LTR text in an RTL paragraph), the amount of highlighted text does not correspond to the amount of selected text.

Steps to Reproduce:
1. Set text direction to LTR.
2. Write some LTR text.
3. Write some RTL text (Hebrew, Arabic, etc.).
4. Write some more LTR text.
5. Select the LTR text; see that the text selected is properly highlighted.
6. Select the RTL text; see that the wrong amount is highlighted.

Actual Results:
Shows a larger amount of highlighted text than selected text.

Expected Results:
Highlighted only the selected text.


Reproducible: Always


User Profile Reset: No



Additional Info:
This is a new bug; the older version I was using (7.1) didn't have this problem.
Comment 1 William Friedman 2021-12-10 03:34:51 UTC
Created attachment 176838 [details]
Example of the problem
Comment 2 William Friedman 2021-12-10 03:42:54 UTC
My apologies for forgetting to paste the version information:

Version: 7.2.4.1 (x64) / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Again, this bug did not exist in any previous version of LO that I've used (and I've been using it for 10+ years at this point).
Comment 3 Dieter 2021-12-25 13:07:46 UTC
William, thank you for reporting the bug. Please attach the sample document from the video, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it)
Comment 4 William Friedman 2021-12-26 17:48:12 UTC
Created attachment 177146 [details]
The test document used in the video.
Comment 5 William Friedman 2021-12-26 17:50:54 UTC
The test document has been uploaded. I think this bug may also be related to (or identical with) https://bugs.documentfoundation.org/show_bug.cgi?id=144890.

But if so, it wasn't noted there that this is bug was introduced at some point in the 7.2 version, because in the 7.1 version it worked fine.
Comment 6 Dieter 2021-12-31 08:21:18 UTC
I confirm the behaviour, but I don't think it's a bug. For me selection follows some clear rules (They become mor visible, if you use arrows for text selecting:

After the last character of LTR-text (space) the first character of RTL-text is selected (מ), then all other characters are selected from right to left. Comma is first character of left to right text.

So basic rule is: direction of selection follows direction of text. This sounds logic to me. If it doesn't appear in previous versions I would consider behaviour in previous versions as bug and actual behaviour as improvement.

So for me NOTABUG. but feel free to change it back to UNCONFIRMED with a short resoning, if you disagree.
Comment 7 William Friedman 2021-12-31 20:40:30 UTC
I think there has been a misunderstanding about the bug here. The issue is not the directionality of selecting mixed LTR/RTL text. That continues to work fine. Rather than reiterating the problem, however, it seems that this bug is indeed identical with https://bugs.documentfoundation.org/show_bug.cgi?id=144890 and is laid out very clearly in h.rosemarin's comment there: https://bugs.documentfoundation.org/show_bug.cgi?id=144890#c6

I will attach a video comparing the behavior in LO 7.1.5 and LO 7.2.4.1 to show the problem.
Comment 8 William Friedman 2021-12-31 20:42:05 UTC
Created attachment 177224 [details]
Comparison of the behavior in LO 7.1.5 and 7.2.4

This video demonstrates, side-by-side, the behavior of the exact same selections on the provided test document in LO 7.1.5 (where it works correct) and LO 7.2.4.1, where it does not.
Comment 9 Dieter 2022-01-02 12:05:14 UTC
(In reply to William Friedman from comment #7)
> Rather than reiterating the problem, however, it seems that this
> bug is indeed identical with
> https://bugs.documentfoundation.org/show_bug.cgi?id=144890 and is laid out
> very clearly in h.rosemarin's comment there:
> https://bugs.documentfoundation.org/show_bug.cgi?id=144890#c6

=> RESOLVED DUPLICATE

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