Bug 154623 - Numeric keypad decimal separator is inconsistently used when in formula bar vs cell (GTK3)
Summary: Numeric keypad decimal separator is inconsistently used when in formula bar v...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha1+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.6.0 target:7.5.3.2 target:7....
Keywords: bibisected, bisected, regression
: 159407 (view as bug list)
Depends on:
Blocks: GTK3 Calc-Formula-Bar Decimal-Separator-Key Regressions-weld-InputBar
  Show dependency treegraph
 
Reported: 2023-04-05 14:51 UTC by jollytall
Modified: 2024-03-23 21:33 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jollytall 2023-04-05 14:51:38 UTC
I am using a Hungarian keyboard under Linux with English settings.
If in a simple text editor (GEdit) I use it, it produces a comma (","), as that is the normal Hungarian decimal separator. For spreadsheets, it should be a dot (".").
If in Tools/Options/Language Settings/Languages the "Decimal separator key: Same as locale setting (.)" is unchecked then using the decimal separator from the numeric keypad, a comma is entered and 12,34 becomes a text field. This is OK, as my input is really a comma.
If I check this option, then the operation becomes inconsistent.
When start a new cell (enter into an empty cell), something like 12.34 then the decimal separator is a dot, as that is the same as locale setting. Also I can enter a formula into an empty cell, like +12.34+56.78 and it is still correct.
However, if I try to Edit the above cell to make it +12.34+45.67+89.12 then the newly entered number is already has a comma in it, and the cell turns into a text cell, with a content '12.34+45.67+89,12 (starting with an apostrophe!).
I find it a bug, as it means that the cell entering is inconsistently handles the numerical keypad decimal separator.

Btw. I have just upgraded from 6.1.5.2 (Debian 10 standard repository latest version), and in that one this error did not exist.
Comment 1 Stéphane Guillou (stragu) 2023-04-19 21:14:46 UTC
I can reproduce with:

Version: 7.5.3.1 (X86_64) / LibreOffice Community
Build ID: d29ee673721b12c92b3de9b9663473211414f0db
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 61b41646c5a93ca24f2c9f143cdb0da2c9258989
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

I use a German keyboard (with a comma on the numpad), en-US interface and en-AU locale in LO, and the option "same as locale setting" is checked so "." should be used as the decimal separator.

I see the issue happen when using the formula bar / input line is used.

- Typing with the numeric pad into the formula bar uses the comma (wrong)
- Typing with the numeric pad directly into the cell uses the dot (correct)

Only affects gtk3. Not on kf5 or gen.

Regression bibisected with linux-64-7.1 to first bad commit dc9b09a432399053d2e161059784484250f71620 which points to core commit:

commit e087e25f05e689091cbf1c4f91b6e93878ac17ec
author	Caolán McNamara <caolanm@redhat.com>	Mon Oct 05 14:19:05 2020 +0100
committer	Caolán McNamara <caolanm@redhat.com>	Fri Oct 16 12:54:14 2020 +0200
weld InputBar
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104037

Caolán, can you please have a look?
Comment 2 Caolán McNamara 2023-04-20 08:46:40 UTC
aha, there are *two* gtk keycodes used for that key, GDK_KEY_KP_Decimal and GDK_KEY_KP_Separator that are equivalent to the vcl KEY_DECIMAL
Comment 3 Commit Notification 2023-04-20 10:04:14 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#154623 KEY_DECIMAL == GDK_KEY_KP_Decimal or GDK_KEY_KP_Separator

It will be available in 7.6.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 4 Commit Notification 2023-04-20 10:05:17 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/50253a2cb2e1b604f0d5bfb5be1d6f91eaa0bc8b

Resolves: tdf#154623 KEY_DECIMAL == GDK_KEY_KP_Decimal or GDK_KEY_KP_Separator

It will be available in 7.5.4.

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 5 Commit Notification 2023-04-20 10:29:22 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5-3":

https://git.libreoffice.org/core/commit/47f442ee5c0252a4dffd464b28c5948448cd901a

Resolves: tdf#154623 KEY_DECIMAL == GDK_KEY_KP_Decimal or GDK_KEY_KP_Separator

It will be available in 7.5.3.

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 6 Commit Notification 2023-04-20 11:24:36 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/3cf2229102abe46daaf474a875bf24d60f64b12f

Resolves: tdf#154623 KEY_DECIMAL == GDK_KEY_KP_Decimal or GDK_KEY_KP_Separator

It will be available in 7.4.8.

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 7 Commit Notification 2023-04-24 15:35:16 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4-7":

https://git.libreoffice.org/core/commit/8484b7a1a5ad33da84ba536ce4ca0bbe1e7f2e75

Resolves: tdf#154623 KEY_DECIMAL == GDK_KEY_KP_Decimal or GDK_KEY_KP_Separator

It will be available in 7.4.7.

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 Sébastien P. 2023-06-06 19:05:50 UTC
Hi,

Still the same issue on 7.5.3.2.

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Gentoo official package
Calc: threaded
Comment 9 Sébastien P. 2023-06-06 19:09:23 UTC
FYI: not sure what was the latest working version. I noticed it from 7.4.6.2 or 7.4.4.2 (I do not use all versions)
Comment 10 Stéphane Guillou (stragu) 2023-06-07 09:04:31 UTC
I can verify Caolán's fix in:

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Sébastien, please see comment 1, it is a GTK3-specific issue that didn't affect KF5. Let's keep this report focused on that. You might be encountering bug 143540 instead.

Thank you!
Comment 11 Sébastien P. 2023-06-08 19:38:12 UTC
Sorry Stéphane.
Comment 12 Stéphane Guillou (stragu) 2024-01-30 04:37:08 UTC
*** Bug 159407 has been marked as a duplicate of this bug. ***