Bug 148799 - FILEOPEN DOCX Table formula with comma number delimiter does not update
Summary: FILEOPEN DOCX Table formula with comma number delimiter does not update
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0 target:7.4.4
Keywords:
Depends on:
Blocks: Regressions-expression-is-faulty
  Show dependency treegraph
 
Reported: 2022-04-26 10:47 UTC by Gabor Kelemen (allotropia)
Modified: 2022-11-28 09:40 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
attachment #163977 after updating the fields (108.13 KB, image/png)
2022-04-26 10:47 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-04-26 10:47:35 UTC
Created attachment 179785 [details]
attachment #163977 [details] after updating the fields

This is a continuation of bug 136106

When the example file attachment #163977 [details] is opened in Writer the table formula results appear correctly since they are cached values imported correctly.
But when you move the cursor into the table or press F9, they turn into ** Expression is faulty ** error.

1. Open attachment #163977 [details] from bug #123389
2. Move the cursor into the table or press F9

The cells with formulas ROUND(2,345;1) and A1*10,1 in the Actual Result column become the ** Expression is faulty ** error.

Manually changing the formulas in the formula editor (Right click - Edit Field) and changing the 2,345 value to 2.345 makes the formulas update correctly.


Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 67d8c245daf7c6ee33e908255f2bbd0ea8d08206
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: de-DE (hu_HU); UI: de-DE
Calc: threaded Jumbo
Comment 1 Xisco Faulí 2022-04-26 11:32:25 UTC
Reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: f1dc51468137971295393ab438b57fe5f77c1420
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 2 Xisco Faulí 2022-04-26 11:33:54 UTC
Indeed, https://git.libreoffice.org/core/+/1abf4e6d07ca0ac31bc54f812df84efc82d2af1b%5E%21 just fixed the cache part. Nice catch
Comment 3 Commit Notification 2022-11-09 15:36:08 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/94bf4908a6661101c270ef647e33dde09f16ac08

tdf#148799 DOCX import: fix invalid formulas with comma

It will be available in 7.5.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 László Németh 2022-11-09 15:39:13 UTC
tdf#148799 DOCX import: fix invalid formulas with comma

Writer formulas must contain decimal points instead of commas,
otherwise automatic update of the formulas, e.g. moving text
cursor in the table, results ** Expression is faulty ** instead
of the recalculated value. The only way to get standard
Writer formulas is to replace the commas with points in numbers
in writerfilter.

Note: only formula cells support comma localization,
but not formula fields yet, so the recalculated values show
decimal point instead of decimal comma.

Follow-up to commit 1abf4e6d07ca0ac31bc54f812df84efc82d2af1b
"DOCX import: don't throw away cached value of SwHiddenTextField ...",
see also tdf#136106.
Comment 5 Commit Notification 2022-11-09 19:02:04 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#148799 DOCX import: fix invalid formulas with comma

It will be available in 7.4.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 6 NISZ LibreOffice Team 2022-11-28 09:40:13 UTC
Verified in:
Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5b18eebc2c95321ce7e6edf10f4df81557382a48
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL threaded