Bug 158867 - Formulas with comma-separated decimals are rendered incorrectly
Summary: Formulas with comma-separated decimals are rendered incorrectly
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:25.8.0 target:25.2.1 target:24...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2023-12-26 09:16 UTC by Kribly Krably
Modified: 2025-03-23 19:01 UTC (History)
3 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 Kribly Krably 2023-12-26 09:16:21 UTC
Description:
Description:
The first problem is that fractions with comma-separated decimals not surrounded by {} are broken.

The second problem is that extra space added between integer part of decimal and comma.

Steps to Reproduce:
1. Open LibreOffice Math
2. Type "1,3 over 2 = 0,65" (without quotation marks)
3. See the preview window

Actual Results:
The formula rendered like 
   ,3 
1 ----=0 ,65
   2 

Expected Results:
The formula rendered like 
1,3
---=0,65
 2


Reproducible: Always


User Profile Reset: No

Additional Info:
Formulas created in previous versions of the LO will be broken when editing in new versions.
Comment 1 Mike Kaganski 2023-12-26 10:24:37 UTC
Repro using Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 24; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (en_US); UI: ru-RU
Calc: CL threaded

Was OK in Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: c21113d003cd3efa8c53188764377a8272d9d6de
CPU threads: 24; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (en_US); UI: ru-RU
Calc: threaded
Comment 2 Buovjaga 2023-12-26 10:50:22 UTC
Bibisected with linux-64-7.5 to 1bd9a51b826015746069fcc0d02a30a2ddc7e7f5
tdf#125154 i18npool,sw: fix group separators in numbers in formulas
Comment 3 Commit Notification 2025-01-30 15:32:59 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#158867 offapi,i18npool,starmath: fix "," in Math again

It will be available in 25.8.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 Michael Stahl (allotropia) 2025-01-30 15:38:47 UTC
is this really a bug?

in English locales, "." is the decimal separator, and "1.3 over 2 = 0,65" looks as expected; unclear what "1,3" should be

in German locales, "," is the decimal separator, and ... oh this works the same as English in Math, that's clearly wrong then

so apparently Math uses en-US number parsing so that it's consistent if files are opened in a different locale, that makes sense...

ah this is essentially the same as bug 127873 

fixed on master
Comment 5 Commit Notification 2025-01-30 19:31:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/055b637ed9bdd02cd857664813a66afde51dfd0a

tdf#158867 offapi,i18npool,starmath: fix "," in Math again

It will be available in 25.2.1.

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 Kribly Krably 2025-02-03 05:10:44 UTC
Tested in 

Version: 25.2.1.0.0+ (X86_64) / LibreOffice Community
Build ID: aca6f30c6769ad5573724ffa3a42a595cb20b7fb
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (ru_KZ); UI: ru-RU
Calc: CL threaded

Works as expected. Thank you so much, Michael Stahl!
Comment 7 Commit Notification 2025-02-04 15:44:41 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/0644deaa8a441e2ad9c41ad4b4a528b1579e9cd9

tdf#158867 offapi,i18npool,starmath: fix "," in Math again

It will be available in 24.8.6.

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 2025-02-04 20:02:35 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8fa6af450bf148f0033331e5b46154abd5ab72e5

tdf#127873, tdf#158867: starmath_export: Add unittest

It will be available in 25.8.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 2025-02-11 15:14:54 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-8-5":

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

tdf#158867 offapi,i18npool,starmath: fix "," in Math again

It will be available in 24.8.5.

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.