Download it now!
Bug 118682 - FILESAVE DOCX formula field exported as plain text, losing the formula
Summary: FILESAVE DOCX formula field exported as plain text, losing the formula
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.beta2+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.2
Keywords: filter:docx
Depends on: 133647
Blocks: DOCX-Tables Number-Format
  Show dependency treegraph
 
Reported: 2018-07-11 00:23 UTC by Aron Budea
Modified: 2020-09-08 10:48 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOCX (16.10 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-07-11 00:23 UTC, Aron Budea
Details
Test document for DOCX export (2.22 KB, application/vnd.oasis.opendocument.text-flat-xml)
2020-08-12 07:42 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-07-11 00:23:01 UTC
Created attachment 143438 [details]
Sample DOCX

Open the attached DOCX with a single table having a few cell values set, and a calculated cell. This works in a limited way in Word, see [1].

Word doesn't have number formats in tables, however has no problem interpreting numbers as such.
=> Writer imports them as text.

Word has a limited way of handling formula, they're special fields.
=> Writer shows a sort-of-field with 0 in it, but it doesn't behave like a regular field, and can't be updated.

Not sure how to best handle these in Writer, it'd be great to import numbers as such, and possibly convert formula to and from Writer formula (with limitations).

[1] https://support.office.com/en-us/article/use-a-formula-in-a-word-or-outlook-table-cbd0596e-ea8a-485e-a35d-b2cb2c4f3e27
Comment 1 Buovjaga 2018-07-17 14:35:00 UTC
Confirmed.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 860a9daf2b45942a4b10ff22d36aa3fe29be19f4
CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on July 14th 2018
Comment 2 QA Administrators 2019-07-18 02:49:45 UTC Comment hidden (obsolete)
Comment 3 Laurent BP 2019-08-16 16:48:44 UTC
Confirmed with Version: 6.3.0.4
Build ID: 057fc023c990d676a43019934386b85b21a9ee99
Threads CPU : 8; OS : Linux 4.15; UI Render : par défaut; VCL: gtk3; 
Locale : en-US (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded

There are two problems:
1. Numbers are not automatically recognized (need to modify each number)
2. Formula has not a correct syntax. It should be:
<A1>*<B1>
instead of
A1*B1
Comment 4 László Németh 2020-08-11 17:53:17 UTC
Changed to FILESAVE, because Bug 133647 was a duplicate of this, already with a proposed fix.
Comment 5 Commit Notification 2020-08-12 07:41:19 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#118682 DOCX: export formula fields

It will be available in 7.1.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 6 László Németh 2020-08-12 07:42:22 UTC
Created attachment 164183 [details]
Test document for DOCX export
Comment 7 Commit Notification 2020-09-02 10:18:32 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/55f3e080909a874c6e977d0d95458f36bbd38037

tdf#118682 DOCX: export formula fields

It will be available in 7.0.2.

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 NISZ LibreOffice Team 2020-09-08 10:48:04 UTC
Verified in:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: a3b4831208da615789bd1e2d5660dd130807f504
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded