Bug 127873 - Wrong spacing with comma in formulae
Summary: Wrong spacing with comma in formulae
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.3.3 target:6.2.8
Keywords: bibisected, bisected, regression
: 126809 (view as bug list)
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2019-09-30 07:41 UTC by Dorange-Pattoret Didier
Modified: 2023-12-26 09:29 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Image with wrong spaces (149.51 KB, image/png)
2019-09-30 07:42 UTC, Dorange-Pattoret Didier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dorange-Pattoret Didier 2019-09-30 07:41:05 UTC
Description:
By default, Format -> Spacing -> Spacing is on 10%
Since LO 6.2.0 I get a space before comma (not with dot).
I get the problem with 6.2.0, 6.2.4 and 6.3.2 (Linux) and 6.3.2 (Windows).
It dos not appear with LO 6.1.2
It's a regression

To reproduce :
1. Write 1,23 
2. Select
3. Insert -> Object -> Formula


Steps to Reproduce:
To reproduce :
1. Write 1,23 
2. Select
3. Insert -> Object -> Formula

Actual Results:
Explained 

Expected Results:
Explained


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Dorange-Pattoret Didier 2019-09-30 07:42:43 UTC
Created attachment 154644 [details]
Image with wrong spaces
Comment 2 Durgapriyanka 2019-09-30 16:11:41 UTC
Thank you for reporting the bug. I can reproduce the bug in 
Version: 6.3.0.0.alpha0+
Build ID: b6b28931435e44aca92b8c0e1659f701e3ed1a87
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-01-30_06:57:04
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

but, not in
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 Pierre C 2019-10-01 06:50:20 UTC
I confirm the problem but I don't think it's a spacing problem

If you type 1 over 2,23 with LO 6.1 ou OpenOffice, the result is correct (1/2,23)

But with current LO versions, you have 1/2 , 23

all formulas with this kind of number will appear slightly different now

Adding regression keyword
Comment 4 raal 2019-10-01 15:31:00 UTC
This seems to have begun at the below commit.
Adding Cc: to Eike Rathke ; Could you possibly take a look at this one?
Thanks
 9ab19b74662842c303ef72c33f6045cb701ae299 is the first bad commit
commit 9ab19b74662842c303ef72c33f6045cb701ae299
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Sat Dec 1 03:52:19 2018 +0100

    source 9336286a7ea5385541344f444e6f8702c85bdacb
    
author	Eike Rathke <erack@redhat.com>	2018-11-30 14:20:49 +0100
committer	Eike Rathke <erack@redhat.com>	2018-11-30 22:15:22 +0100
commit 9336286a7ea5385541344f444e6f8702c85bdacb (patch)
tree ed4d9276ca37b497e02fabd9fbd0b9d2f139f1d2
parent 4632afbd9ecdf85f3980b41fa9d58b6099aa2d81 (diff)
[API CHANGE] Resolves: tdf#42518 new KParseTokens::GROUP_SEPARATOR_IN_NUMBER
Comment 5 Eike Rathke 2019-10-01 22:39:00 UTC
Use group brackets: 1 over {2,23}

Seems Math unintentionally used a side effect that a ',' comma (in en-US locale) is a group separator that could be used between digits and ignored/skipped anywhere within (before a decimal separator), similar to '.' dot decimal separator which can appear only once though of course. In this case (fr-FR locale) the comma is meant as a decimal separator but that only worked by chance. Math does not switch / adapt to locales (which would be utterly confusing and could lead to different formulas for the same text in different locales).
Comment 6 Eike Rathke 2019-10-01 22:59:25 UTC
As for the "1,23" only case: the ',' comma is just a character as any other non-digit character. Only the '.' dot is treated as decimal separator.
Comment 7 Eike Rathke 2019-10-02 10:30:05 UTC
As conceivably many documents unwittingly may have used the ',' comma group separator as a decimal separator in such locales (though it never was) I'll reintroduce parsing it away in the number parser so digit groups using it will result in one entity again.
Comment 8 Commit Notification 2019-10-02 15:21:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2caa9d7ddcff3f6e380c306b737e9b5e9cdaf4c2

Resolves: tdf#127873 accept ',' comma group separator in number entities again

It will be available in 6.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 Eike Rathke 2019-10-02 15:24:17 UTC
Pending review
https://gerrit.libreoffice.org/80044 for 6-3
https://gerrit.libreoffice.org/80045 for 6-2
https://gerrit.libreoffice.org/80046 for 6-2-8
Comment 10 Xisco Faulí 2019-10-03 08:53:41 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: c9336bfb6bbf6d73d3f23c124262ade30133448d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Eike, thanks for fixing this issue!
Comment 11 Commit Notification 2019-10-03 08:55:29 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

Resolves: tdf#127873 accept ',' comma group separator in number entities again

It will be available in 6.3.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 12 Commit Notification 2019-10-03 09:03:04 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/commit/2b2d95de7d753b2f673d6fed1e5dc47fc36c8a3b

Resolves: tdf#127873 accept ',' comma group separator in number entities again

It will be available in 6.2.9.

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 13 Mike Kaganski 2019-10-05 05:21:54 UTC
*** Bug 126809 has been marked as a duplicate of this bug. ***
Comment 14 Commit Notification 2019-10-08 09:42:16 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2-8":

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

Resolves: tdf#127873 accept ',' comma group separator in number entities again

It will be available in 6.2.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 15 Dorange-Pattoret Didier 2019-10-11 06:39:10 UTC
Thank you and congratulatations.
I tried and it works fine again.

Version: 6.4.0.0.alpha0+
Build ID: 9377ff20724b156c32728d347cdf843fe23dcd81
Threads CPU : 4; OS : Linux 5.0; UI Render : par défaut; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-10-10_02:50:05
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 16 Kribly Krably 2023-09-21 17:56:29 UTC
The bug is reproduced again in version 7.6.1.2
Comment 17 Eike Rathke 2023-09-25 17:15:06 UTC
Unassigning myself from this, someone else can investigate.
Comment 18 Kribly Krably 2023-09-27 18:00:30 UTC
The bug affects LibreOffice versions 7.6.2, 7.6.1, 7.6.0, 7.5.7, 7.5.6 and 7.5.5. Version 7.5.4 is not affected.
Comment 19 Mike Kaganski 2023-12-26 09:29:09 UTC
The re-appeared problem is now tracked in bug 158867. Bisection and further discussion should move there.

Closing again.