Bug 106163 - Create Table toolbar tool creates wrong number of columns in rtl environment [rtl, gtk3, regression]
Summary: Create Table toolbar tool creates wrong number of columns in rtl environment ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.0.0 target:5.4.2 target:5.3.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Toolbars RTL-UI
  Show dependency treegraph
 
Reported: 2017-02-23 16:23 UTC by Yotam Benshalom
Modified: 2024-08-03 07:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
an MKV screencast showing the problem (314.93 KB, application/x-matroska)
2017-09-11 16:49 UTC, Yotam Benshalom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yotam Benshalom 2017-02-23 16:23:21 UTC
Create table toolbar tool creates wrong number of columns in rtl environment. More specifically, the number of columns created is the difference between the requested number of columns and 11.

Example:
In rtl environment with gtk3, press the Create Table tool on the toolbar and drag the mouse to create a table with 3 columns. You will get a table with 3 columns instead.

This is a regression of the 5.3 series. It exists in 5.3.1.1 (1:5.3.1~rc1-0ubuntu1~zesty0).
Comment 1 Julien Nabet 2017-02-23 18:18:03 UTC
On pc Debian x86-64 with master sources updated yesterday + gtk3, I don't reproduce this.

I created a brand new doc + enabled CTL then I typed Ctrl-Shift-D to switch in RTL mode.

Do you reproduce this with a brand new file?
Did you try to rename your LO directory profile (see https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux)?
Comment 2 Yotam Benshalom 2017-02-23 20:02:11 UTC
Sorry, I was unclear. This is not related to the directionality of text input, but rather to the directionality of your desktop environment. In order to set Gnome3 to right-to-left, use gnome-control-center->languages and put an rtl language, such as Hebrew, on the top of the list, then restart gnome. You know that you made it when your menus are in Hebrew, and are aligned to the top right instead of the top left.
Comment 3 QA Administrators 2017-08-30 19:27:09 UTC Comment hidden (obsolete)
Comment 4 Julien Nabet 2017-08-30 19:41:53 UTC
Version must correspond to the earliest one when the bug has been encountered.

For the rest, you didn't respond to my previous comment:
"
Do you reproduce this with a brand new file?
Did you try to rename your LO directory profile (see https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux)?
"
Comment 5 Yotam Benshalom 2017-08-30 19:45:57 UTC
This happens with a brand new file after renaming the /home/<user>/.config/libreoffice/4 folder.
Comment 6 Yotam Benshalom 2017-08-30 19:56:40 UTC
Now I see I have a misspelling in my example. Here is the correct example:

In rtl environment with gtk3, press the Create Table tool on the toolbar and drag the mouse to create a table with 3 columns. You will get a table with 8 columns instead.
Comment 7 Xisco Faulí 2017-09-08 17:43:34 UTC
(In reply to Yotam Benshalom from comment #6)
> Now I see I have a misspelling in my example. Here is the correct example:
> 
> In rtl environment with gtk3, press the Create Table tool on the toolbar and
> drag the mouse to create a table with 3 columns. You will get a table with 8
> columns instead.

I can't reproduce it in

Version: 6.0.0.0.alpha0+
Build ID: 383aab7ed63bf30931c1cf89138707d2228b5dce
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 8 Yotam Benshalom 2017-09-08 17:58:39 UTC
Xisco, I see your locale is Catalan. Have you set the locale (i.e. the interface language (menus and so on) to Hebrew? This is what triggers the regression.
Comment 9 Yousuf Philips (jay) (retired) 2017-09-11 14:50:15 UTC
Yotam: would suggest you submit a screencast of the problem so that it is easier for us to see the issue. There are various free screencast software available for use, including Camstudio (Windows), Jing (Mac), Simple Screen Recorder (Linux) or screencast-o-matic.com (Web).
Comment 10 Yotam Benshalom 2017-09-11 16:49:15 UTC
Created attachment 136177 [details]
an MKV screencast showing the problem

I attach an MKV file demonstrating the problem.
Comment 11 Julien Nabet 2017-09-11 20:07:11 UTC
Lior: would it be possible you give a try to this bugtracker?
Indeed, I'm afraid not being able to put back initial language of Gnome once it'll be changed with Hebrew (or any rtl language).
Comment 12 Lior Kaplan 2017-09-11 20:19:34 UTC
Confirmed with LibO 5.4.0.

Version: 5.4.0.3
Build ID: 1:5.4.0-1
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group

Notice the bug happens with RTL interface. It's enough to enable such interface with:

$ export SAL_RTL_ENABLED=1
$ libreoffice --writer

No need to change the locale into "weird" languages (:
Comment 13 Julien Nabet 2017-09-11 20:31:46 UTC
Thank you Lior, I could reproduce the bug on pc Debian x86-64 with master sources updated today.
Comment 14 Julien Nabet 2017-09-11 20:42:18 UTC
Caolán: thought you might be interested in this one since it's indeed gtk3 only.
I don't reproduce this with kde4, gen and even gtk.
Comment 15 Xisco Faulí 2017-09-11 20:48:40 UTC
Regression introduced by:

author	Caolán McNamara <caolanm@redhat.com>	2016-07-07 09:39:00 (GMT)
committer	Caolán McNamara <caolanm@redhat.com>	2016-07-07 15:57:01 (GMT)
commit 6b9f42ea1dc0926bc445982ad57bf93561f1bd03 (patch)
tree 1ba078e3eeacabd4f0560b4ca48b10701b149898
parent fb045517532aababc06fb4b1112def53b03d9144 (diff)
Resolves: rhbz#1351224 wayland grab related crashes
only one popup active at a time. Try and find the right path through the
uncanny valley which allows popups to appear, to get all mouse input that
happens to them, forward keyboard input to their parents, dismiss when the
mouse is clicked outside them and not crash if another popup wants to appear
to replace it

Bisected with bibisect-linux-64-5.3

Adding Cc: to Caolán McNamara
Comment 16 Caolán McNamara 2017-09-12 09:37:53 UTC
seems to draw and have a tooltip with the correct values before inserting the wrong values
Comment 17 Commit Notification 2017-09-12 11:14:41 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=65b756f6058697ccb787506c3cc32e1e818bcc37

Resolves: tdf#106163 safe fix for wrong final row/col selection in rtl

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2017-09-12 11:17:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b1fbcb0e0e1f29814c646dbe283fa0eabed099a

Resolves: tdf#106163 MouseMove/MouseLeave from crossing not mirrored in rtl

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Caolán McNamara 2017-09-12 11:17:47 UTC
backports for 5-4 and 5-3 in gerrit
Comment 20 Julien Nabet 2017-09-12 17:31:31 UTC
On pc Debian x86-64, with master sources updated yesterday but with the main change of the patch https://cgit.freedesktop.org/libreoffice/core/commit/?id=7b1fbcb0e0e1f29814c646dbe283fa0eabed099a, I don't reproduce the pb on gtk3.

Thank you Caolán!
Comment 21 Commit Notification 2017-09-13 14:12:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3181238d88c01245d9fd1aba5cca388174113c83&h=libreoffice-5-4

Resolves: tdf#106163 safe fix for wrong final row/col selection in rtl

It will be available in 5.4.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2017-09-13 14:13:10 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a3ea07e14bab234ee04c441e0dca7a9d12dc7a9b&h=libreoffice-5-3

Resolves: tdf#106163 safe fix for wrong final row/col selection in rtl

It will be available in 5.3.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2017-10-19 19:31:02 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2c41e9924120ec2e399de9b4d8248f25712ae400

tdf#106163 tdf#112830 Mirror mouse enter/leave for gtk2

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.