Bug 136132 - FILEOPEN / FILESAVE DOCX Fields with table formula get extra spaces
Summary: FILEOPEN / FILESAVE DOCX Fields with table formula get extra spaces
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:7.1.0
Keywords: implementationError
Depends on:
Blocks: DOCX-Fields
  Show dependency treegraph
 
Reported: 2020-08-26 06:14 UTC by NISZ LibreOffice Team
Modified: 2020-09-08 10:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
attachment #149188 after saving once in Writer (12.16 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-08-26 06:14 UTC, NISZ LibreOffice Team
Details
attachment #149188 after saving twice in Writer (12.19 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-08-26 06:14 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (40.67 KB, image/png)
2020-08-26 06:14 UTC, NISZ LibreOffice Team
Details
Screenshot of the once exported document side by side in Word and Writer (50.60 KB, image/png)
2020-08-26 06:15 UTC, NISZ LibreOffice Team
Details
Screenshot of the twice exported document side by side in Word and Writer (53.23 KB, image/png)
2020-08-26 06:15 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 2020-08-26 06:14:13 UTC
Created attachment 164691 [details]
attachment #149188 [details] after saving once in Writer

Opening files with table formula fields is better supported since commit 68e74bdf63e992666016c790e8e4cfd5b28d6abe
However opening files such as attachment #149188 [details] or attachment #149150 [details] I can see an extra space at the beginning of the formula so it looks like ‘= NOT’ instead of ‘=NOT’. 
When the example file is saved one more space is added, so Word reports it as ‘=  NOT’.
Reopening the saved file in Writer adds another space so that we have three, saving again adds one more, so Word reports four after two saves in Writer.

Steps to reproduce:
    1. Open attachment #149188 [details] in Writer
    2. Save as DOCX, reopen in Word and Writer

Actual results:
Extra spaces appear in the formula field.

Expected results:
No extra spaces.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x86)
Build ID: 4f0617275f2c9669901a4b06d2133533ceb437a0
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-08-26 06:14:28 UTC
Created attachment 164692 [details]
attachment #149188 [details] after saving twice in Writer
Comment 2 NISZ LibreOffice Team 2020-08-26 06:14:41 UTC
Created attachment 164693 [details]
Screenshot of the original document side by side in Word and Writer
Comment 3 NISZ LibreOffice Team 2020-08-26 06:15:02 UTC
Created attachment 164694 [details]
Screenshot of the once exported document side by side in Word and Writer
Comment 4 NISZ LibreOffice Team 2020-08-26 06:15:14 UTC
Created attachment 164695 [details]
Screenshot of the twice exported document side by side in Word and Writer
Comment 5 Commit Notification 2020-08-27 12:38:58 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/632b6ce6f9f829b35957279f030f9aba8dca8e9f

tdf#136132 DOCX export: fix space in table formula

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 NISZ LibreOffice Team 2020-09-08 10:51:22 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