Bug 123384 - FILEOPEN DOCX MOD table formula is not working in LO
Summary: FILEOPEN DOCX MOD table formula is not working in LO
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4 all versions
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:26.2.0 target:25.8.0.0.beta2 t...
Keywords:
: 166787 (view as bug list)
Depends on:
Blocks: DOCX-Fields Writer-Tables-Formulas Regressions-expression-is-faulty
  Show dependency treegraph
 
Reported: 2019-02-12 07:48 UTC by NISZ LibreOffice Team
Modified: 2025-06-27 11:07 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the original document side by side in Word and Writer. (282.25 KB, image/png)
2019-02-12 07:49 UTC, NISZ LibreOffice Team
Details
Document with MOD table formulas. (20.27 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-02-12 07:49 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-02-12 07:48:45 UTC
Description:
MOD table formula has Expression is faulty when opened in LO.

Steps to Reproduce:
    1. Create a new docx in Word.
    2. Insert a Table.
    3. Insert MOD() formula to some of the cells.
    4. Save and open it in LO.

Actual Results:
The cells which had and MOD formula now have ** Expression is faulty ** instead of what was in them in Word.

Expected Results:
All the cells should have the same data in them.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details: Version: 6.3.0.0.alpha0+
Build ID: 17dd2662ccfa9d04efbea74e5d7548db5b2126d4
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded
Comment 1 NISZ LibreOffice Team 2019-02-12 07:49:11 UTC
Created attachment 149185 [details]
Screenshot of the original document side by side in Word and Writer.
Comment 2 NISZ LibreOffice Team 2019-02-12 07:49:30 UTC
Created attachment 149186 [details]
Document with MOD table formulas.
Comment 3 Xisco Faulí 2019-02-12 10:26:37 UTC
Formulas:

debug:7354:7354: =MOD(18;4)
debug:7354:7354: =MOD(B1;A1)
Comment 4 Michael Warner 2020-07-10 12:36:26 UTC
Writer doesn't currently support MOD. See calc.cxx:97.
Comment 5 Xisco Faulí 2020-12-07 17:47:18 UTC
Still reproducible in

Version: 7.2.0.0.alpha0+
Build ID: 84af20ef3ea72190784e9e7be820684c2558ba8c
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 QA Administrators 2022-12-08 03:25:38 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2024-12-08 03:13:17 UTC Comment hidden (obsolete)
Comment 8 Mikko Vedru 2025-05-29 21:16:18 UTC
Still reproducible in:
Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Ubuntu package version: 4:25.2.3-0ubuntu0.22.04.1~lo1
Calc: threaded
Comment 9 fpy 2025-06-03 18:45:50 UTC
*** Bug 166787 has been marked as a duplicate of this bug. ***
Comment 10 Regina Henschel 2025-06-03 20:26:07 UTC
The ODF TC has briefly discussed whether OpenFormula can be used, see
https://issues.oasis-open.org/browse/OFFICE-4135
Comment 11 Xisco Faulí 2025-06-10 10:33:16 UTC
My take on it: https://gerrit.libreoffice.org/c/core/+/186325
Comment 12 Commit Notification 2025-06-10 13:09:05 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/389325166a3357d7a4e557dc4c223fe0bb7aeadd

tdf#123384: Add support for MOD formula

It will be available in 26.2.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 13 fpy 2025-06-10 13:19:35 UTC
source/text/swriter/02/14020000.xhp would be welcome.
Comment 14 Commit Notification 2025-06-10 15:01:21 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

tdf#123384: Add support for MOD formula

It will be available in 25.8.0.0.beta2.

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 Commit Notification 2025-06-12 18:45:16 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/c8e6db62fb887e420f55a5d0c0d85b98d320682c

tdf#123384, tdf#166948 Writer MOD function Help
Comment 16 fpy 2025-06-13 00:24:49 UTC
(In reply to Xisco Faulí from comment #11)
> My take on it: https://gerrit.libreoffice.org/c/core/+/186325


why isn't it an "easyHack" ?
Comment 17 Xisco Faulí 2025-06-13 06:57:38 UTC
(In reply to fpy from comment #16)
> (In reply to Xisco Faulí from comment #11)
> > My take on it: https://gerrit.libreoffice.org/c/core/+/186325
> 
> 
> why isn't it an "easyHack" ?

what do you mean ?
Comment 18 fpy 2025-06-13 07:21:30 UTC
(In reply to Xisco Faulí from comment #17)

https://wiki.documentfoundation.org/Development/EasyHacks
Comment 19 Xisco Faulí 2025-06-13 08:27:58 UTC
yep, I know what an easyHack is, but I don't understand your question after the issue got fixed...
Comment 20 fpy 2025-06-13 10:32:28 UTC
(In reply to Xisco Faulí from comment #19)
> after the issue got fixed...

was marked (and unmarked) before : https://bugs.documentfoundation.org/show_activity.cgi?id=123384
Comment 21 Xisco Faulí 2025-06-13 12:10:37 UTC
(In reply to fpy from comment #20)
> (In reply to Xisco Faulí from comment #19)
> > after the issue got fixed...
> 
> was marked (and unmarked) before :
> https://bugs.documentfoundation.org/show_activity.cgi?id=123384

oh, I see... I removed it because the code pointer was missing. In order for an issue to be an easyhack, a code pointer is needed, otherwise it's not a real easyhack
Comment 22 fpy 2025-06-13 13:42:35 UTC
(In reply to Xisco Faulí from comment #21)

ok, so for later reference, added related bug tdf#123381 which is exactly the same pattern.
Comment 23 Commit Notification 2025-06-27 11:07:02 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

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

tdf#123384: Add support for MOD formula

It will be available in 25.2.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.