Saving doc/docx document with formula in table removes this formula

Bug #1879479 reported by Norbert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Fix Released
Medium
libreoffice (Ubuntu)
New
Undecided
Unassigned

Bug Description

Description:
Formula handling inside tables is broken in Microsoft Office DOC or DOCX file formats.

Steps to Reproduce:
1. Open LibreOffice Writer
2. Insert table of any size - for example 4x4
3. Enter some numbers in the table cells
4. Go to the last (right bottom) cell, hit "=", enter "=sum(<A1:D3>)"
5. Save the document as Microsoft Office DOC or DOCX and close document
6. Open just saved DOC/DOCX document and change some numbers in table (try pressing F9 for sure)

Actual Results:
* the formula in the table is not saved, the user is unable to calculate with it after saving file as DOC / DOCX

Expected Results:
* the formula in the table is saved, the user is able to calculate with it after saving file as DOC / DOCX

Notes: the same happens if original document is DOC / DOCX. Saving table with formula removes the formula on next open. Test ODT document is in attachment.

The almost latest LO 6.4.3.2 as in Ubuntu 20.04 LTS is also affected by this bug:

Version: 6.4.3.2
Build ID: 1:6.4.3-0ubuntu0.20.04.1
CPU threads: 1; OS: Linux 5.4; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: libreoffice-writer 1:6.4.3-0ubuntu0.20.04.1
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: MATE
Date: Tue May 19 13:37:57 2020
InstallationDate: Installed on 2020-04-23 (25 days ago)
InstallationMedia: Ubuntu-MATE 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: libreoffice
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Norbert (nrbrtx) wrote :

Description:
Formula handling inside tables is broken in Microsoft Office DOC or DOCX file formats.

Steps to Reproduce:
Steps to reproduce:
1. Open LibreOffice Writer
2. Insert table of any size - for example 4x4
3. Enter some numbers in the table cells
4. Go to the last (right bottom) cell, hit "=", enter "=sum(<A1:D3>)"
5. Save the document as Microsoft Office DOC or DOCX and close document
6. Open just saved DOC/DOCX document and change some numbers in table (try pressing F9 for sure)

Actual Results:
Actual results:
* the formula in the table is not saved, the user is unable to calculate with it after saving file as DOC / DOCX

Expected Results:
Expected results:
* the formula in the table is saved, the user is able to calculate with it after saving file as DOC / DOCX

Reproducible: Always

User Profile Reset: No

Additional Info:
Notes: the same happens if original document is DOC / DOCX. Saving table with formula removes the formula on next open. Test ODT document is in attachment.

The almost latest LO 6.4.3.2 as in Ubuntu 20.04 LTS is also affected by this bug:

Version: 6.4.3.2
Build ID: 1:6.4.3-0ubuntu0.20.04.1
CPU threads: 1; OS: Linux 5.4; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

Revision history for this message
In , Norbert (nrbrtx) wrote :

Created attachment 160997
Simple table with formula to be saved as DOC/DOCX to demonstrate formula lose

Revision history for this message
Norbert (nrbrtx) wrote :
Revision history for this message
In , Mikekaganski (mikekaganski) wrote :

Created attachment 160999
A DOCX with a formula in table

The document is created in Word 2016. The table has SUM(ABOVE) formula in the bottommost (A3) cell.

So the issue is interoperability with Word formats, which are also able to have simple formulas. Both reading is imperfect, and writing.

This is by no means HIGHEST/CRITICAL, of course.

Revision history for this message
In , Norbert (nrbrtx) wrote :

This is critical because of data loss.

Revision history for this message
In , Mikekaganski (mikekaganski) wrote :

(In reply to Norbert X from comment #3)
> This is critical because of data loss.

No bug related to external file types is critical. Please don't start edit wars.

Revision history for this message
In , Norbert (nrbrtx) wrote :

Ok, no problem.
Just edited a bunch of documents, opened them and lost formulas in them.

Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in df-libreoffice:
status: Confirmed → In Progress
Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#133163 DOCX: export formula cells

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.

Changed in df-libreoffice:
status: In Progress → Fix Released
Revision history for this message
In , László Németh (nemeth-libreoffice) wrote :

Problem was fixed only for DOCX, because allowing field export in obsolete DOC format resulted broken formula in Word, likely missing DOC part of the previous fix for Bug 118682. Please, file a new bug for DOC (first, import) support, if needed.

Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

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/e5480bff53f3bd32fc922544f7d1c15854218ffc

tdf#133163 DOCX: export formula cells

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.

Revision history for this message
In , Libreoffice-1 (libreoffice-1) wrote :

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

Changed in libreoffice (Ubuntu):
status: New → Fix Released
status: Fix Released → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.