Bug 131725 - RTL paragraphs aligned-left in cross-reference dialog
Summary: RTL paragraphs aligned-left in cross-reference dialog
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0
Keywords:
: 131726 (view as bug list)
Depends on:
Blocks: RTL-UI Cross-reference-dialog
  Show dependency treegraph
 
Reported: 2020-03-30 22:30 UTC by Eyal Rozenberg
Modified: 2024-08-03 08:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The cross-ref dialog with RTL content (151.25 KB, image/png)
2020-03-30 22:30 UTC, Eyal Rozenberg
Details
ODT document for reproducing the bug (9.48 KB, application/vnd.oasis.opendocument.text)
2020-05-16 07:28 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2020-03-30 22:30:49 UTC
Created attachment 159174 [details]
The cross-ref dialog with RTL content

When you insert a cross-reference, a dialog comes up for selecting what you'll be referring to. I won't comment on the dialog's design in general, only about the list of items of the chosen category (headings, numbered paragraphs etc). This list is presented in plain text - which is ok, but it's directed LTR and aligned left-to-right. It is kept on a single line.

What this means is, that instead of seeing the _beginning_ of the paragraph, or line, or heading, you see its _end_. To see the beginning you need to scroll to the right - but it's a different amount of scrolling for each item, because they're not all aligned at the beginning. That also means you don't see the number except on shorter paragraphs, and for the current item, which also appears at the bottom and is thankfully right-aligned if its in an RTL language.

An example of this in the cross-reference selection dialog is attached.

This is actually a really old issue, probably from before v5, and I'm pretty sure I saw it on Windows too. Right now I'm seeing it with v6.4.0.3 release on Devuan GNU/Linux.
Comment 1 Dieter 2020-03-31 06:20:52 UTC
*** Bug 131726 has been marked as a duplicate of this bug. ***
Comment 2 Dieter 2020-05-15 12:20:03 UTC
Eyal, perhaps you can add a documetn with RTL content. This would make it easier for me to verify the bug. Thanks.
Comment 3 Eyal Rozenberg 2020-05-16 07:28:50 UTC
Created attachment 160887 [details]
ODT document for reproducing the bug

As requested - here's a document with a long numbered paragraph. To reproduce the issue, try inserting a cross-reference to a numbered paragraph and have a look at the selection dialog. Only the end of the text of the first numbered paragraph will be visible.
Comment 4 Dieter 2020-05-16 08:59:22 UTC
I confirm it with

Version: 7.0.0.0.alpha1+ (x64)
Build ID: 99c337d1d3831ce9d2c7dc1cbff713f4ac49d6ac
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; 
Locale: en-GB (de_DE); UI: en-GB
Calc: CL
Comment 5 Regina Henschel 2022-05-03 20:47:14 UTC
The same is true for headings.
Comment 6 Eyal Rozenberg 2022-05-03 21:46:29 UTC
(In reply to Regina Henschel from comment #5)
> The same is true for headings.

Yes, everything is always aligned-left in the selection list. 

Go Caolán! :-)
Comment 7 Commit Notification 2022-05-04 07:58:08 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#131725 if SvTreeListBox RTL set, set scrollbars to match

It will be available in 7.4.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 8 Commit Notification 2022-05-04 09:57:46 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#131725 match the basegfx translation to the mirror logic

It will be available in 7.4.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 9 Commit Notification 2022-05-04 09:57:55 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/66a71a288bea335cd5737710ee2f7e36ebd934a4

tdf#131725 use first page directionality for x-reference dialog TreeView

It will be available in 7.4.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 10 Caolán McNamara 2022-05-04 10:11:45 UTC
well, we can give this a try and see how it works out
Comment 11 Dieter 2022-05-16 14:26:46 UTC
VERIFIED with

Version: 7.4.0.0.alpha1 (x64) / LibreOffice Community
Build ID: b871abad383583f02eb49c7e49aeae01f6941072
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

Caolán, thanks for fixing it!