Bug 123355 - FILEOPEN DOCX BELOW/LEFT/RIGHT/ABOVE table formula is not working in LO
Summary: FILEOPEN DOCX BELOW/LEFT/RIGHT/ABOVE table formula is not working in LO
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4 all versions
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0
Keywords: filter:docx
: 122719 123391 123392 (view as bug list)
Depends on:
Blocks: DOCX-Fields Regressions-expression-is-faulty
  Show dependency treegraph
 
Reported: 2019-02-11 15:27 UTC by NISZ LibreOffice Team
Modified: 2021-09-04 16:45 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. (278.53 KB, image/png)
2019-02-11 15:28 UTC, NISZ LibreOffice Team
Details
Document with AVERAGE table formulas. (20.37 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-02-11 15:29 UTC, NISZ LibreOffice Team
Details
Document compared (80.00 KB, image/png)
2020-09-15 08:52 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-02-11 15:27:54 UTC
Description:
AVERAGE 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 AVERAGE() formula to some of the cells.
    4. Save and open it in LO.

Actual Results:
The cells which had and AVERAGE 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-11 15:28:37 UTC
Created attachment 149151 [details]
Screenshot of the original document side by side in Word and Writer.
Comment 2 NISZ LibreOffice Team 2019-02-11 15:29:01 UTC
Created attachment 149152 [details]
Document with AVERAGE table formulas.
Comment 3 Xisco Faulí 2019-02-12 00:01:21 UTC
The problem is it's using 

debug:29011:29011: AVERAGE(BELOW)
debug:29011:29011: AVERAGE(LEFT)
debug:29011:29011: AVERAGE(RIGHT)
debug:29011:29011: AVERAGE(ABOVE)


Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c568eb7d3bb4584867f0a1f0a7965f73097f009b

author	Jean-Sebastien Bevilacqua <realitix@gmail.com>	2017-02-16 09:54:33 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-03-30 17:39:00 (GMT)
commit c568eb7d3bb4584867f0a1f0a7965f73097f009b (patch)
tree ea7e6fb1e0d77369a90bc69dd8756f589bb352e4
parent 53c2507bf97867011fd2bfbbac6c86b7fc494338 (diff)
tdf#105975 Add Formula field parsing (docx) in SWriter
Introduction

Bisected with bibisect-linux-64-5.4
Comment 4 Xisco Faulí 2019-02-12 00:02:30 UTC
*** Bug 123356 has been marked as a duplicate of this bug. ***
Comment 5 Xisco Faulí 2019-02-12 10:11:07 UTC
*** Bug 123392 has been marked as a duplicate of this bug. ***
Comment 6 Xisco Faulí 2019-02-12 10:12:39 UTC
*** Bug 123391 has been marked as a duplicate of this bug. ***
Comment 7 Xisco Faulí 2019-02-12 10:27:30 UTC
*** Bug 123383 has been marked as a duplicate of this bug. ***
Comment 8 Xisco Faulí 2019-02-12 10:28:18 UTC
*** Bug 123382 has been marked as a duplicate of this bug. ***
Comment 9 Timur 2019-02-12 10:30:23 UTC
This one started as AVERAGE and we have a separate bug for SUM.
Comment 10 Xisco Faulí 2019-02-12 10:31:46 UTC
(In reply to Timur from comment #9)
> This one started as AVERAGE and we have a separate bug for SUM.

it doesn't matther, the problem is Below/above/left/right
Comment 11 Xisco Faulí 2019-02-12 10:34:12 UTC
*** Bug 122719 has been marked as a duplicate of this bug. ***
Comment 12 Xisco Faulí 2019-02-12 10:34:31 UTC
*** Bug 123392 has been marked as a duplicate of this bug. ***
Comment 13 Timur 2019-02-12 10:34:53 UTC
I'm not sure these are regressions. There was no update before.
Comment 14 Xisco Faulí 2019-02-12 10:39:44 UTC Comment hidden (obsolete)
Comment 15 Xisco Faulí 2019-02-12 11:14:20 UTC
(In reply to Xisco Faulí from comment #14)
> Yep, I'm thinking the same way now after investigating these issues a bit...
> I'll report the average problem in a follow-up issue

bug 123401
Comment 16 Xisco Faulí 2019-12-02 13:12:52 UTC
Changing priority to 'high' since the number of duplicates is higher than 5 or the number of people in CC higher than 20
Comment 17 Commit Notification 2020-09-10 12:43: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/436cf6d31deb7f9594a5da52ec7883d7e3d34344

tdf#123355 DOCX import: fix cell range ABOVE, BELOW,

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 18 Timur 2020-09-15 08:52:40 UTC
Created attachment 165511 [details]
Document compared

Thanks. Verified this one and checked and reopened some duplicates.
Comment 19 Timur 2020-09-15 09:01:35 UTC
This one was about Average but seems like some Sum was also resolved. 
attachment 149199 [details] from bug 123391 and attachment 149201 [details] from bug 123392 with SUM are OK.
But attachment 149184 [details] is not resolved, so I reopened. 
Also not resolved is Max, also reopened.
Comment 20 Xisco Faulí 2020-09-15 15:20:06 UTC
*** Bug 122648 has been marked as a duplicate of this bug. ***
Comment 21 Timur 2020-09-25 13:15:15 UTC
Only way to recognize great work of László is to mark this Major, which it was.
Comment 22 NISZ LibreOffice Team 2020-10-08 08:45:45 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

Thanks, Laci :)
Comment 23 László Németh 2020-10-15 07:47:09 UTC
(In reply to Timur from comment #21)

Thanks, Timur. I continued the import fix of Michael Warner with the export, these LEFT, BELOW etc., but we didn't notice, that these worked only for the first DOCX table. :) So many thanks to you, Xisco and others for your feedback, testing and verification!
Comment 24 Timur 2020-10-15 09:08:36 UTC
I updated https://wiki.documentfoundation.org/ReleaseNotes/7.1 with this.