Bug 107253 - Import from docx with variable in ASK field produces invalid ODF on resave
Summary: Import from docx with variable in ASK field produces invalid ODF on resave
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx, filter:odt
Depends on:
Blocks: ODF-export-invalid
  Show dependency treegraph
 
Reported: 2017-04-18 23:15 UTC by Regina Henschel
Modified: 2023-12-12 08:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example with ASK and REF field to be converted (12.93 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-04-18 23:15 UTC, Regina Henschel
Details
resaved by LO54 (13.13 KB, application/vnd.oasis.opendocument.text)
2017-04-19 10:59 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-04-18 23:15:41 UTC
Created attachment 132672 [details]
example with ASK and REF field to be converted

The attached document has a variable myVar, which was set by an ASK field and has a REF field to show its value. (Besides that it has some info text to remind me how to use fields in Word.)

Open the attached document.
Without any changes save it in odt-format.

The odt-Format has invalid parts:
The ASK field was translated to a <text:bookmark> element and a <text:variable-input> element. The <text:variable-input> element was written with attributes text:name, text:description, text:display, text:formula, office:value-type, and office:string-value.
But the attributes text:formula and office:string-value are not allowed for a <text:variable-input> element.

To get the same behavior as in Word neither office:string-value nor text:formula is needed, but the content of the <text:variable-input> element is the value of the variable. The ASK field does not show its content in Word. To get this behavior, the attribute text:display="none" can be used.
Comment 1 Xisco Faulí 2017-04-19 10:22:50 UTC
Hi Regina,
Could you please attach the invalid odf document ?
Comment 2 Regina Henschel 2017-04-19 10:59:06 UTC
Created attachment 132683 [details]
resaved by LO54
Comment 3 Buovjaga 2017-04-27 17:18:42 UTC
Reproduced (checked the content.xml in my saved odt)

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: f69424ff90f83136027df3063d4c8ddafdf79faa
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on April 25th 2016
Comment 4 QA Administrators 2018-05-29 02:37:15 UTC Comment hidden (obsolete)
Comment 5 Regina Henschel 2018-11-06 13:28:11 UTC
The document saved in Lo 6.2 is still invalid, checked with https://odfvalidator.org/

used Version is Version: 6.2.0.0.alpha1+ (x64)
Build ID: f825e6d4082c0d0beb1c95b881f6a2ee9bfc9161
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-05_00:20:26
Locale: de-DE (en_US); Calc: CL
Comment 6 QA Administrators 2019-11-07 03:35:10 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2019-11-07 11:25:23 UTC
THe error still exists in Version: 6.4.0.0.alpha1+ (x64)
Build ID: 7c6226bee72805db7f0e567ca9f06c786a7d0da2
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded

The error is both in "ODF 1.2" and "ODF 1.2 extended"
Comment 8 Regina Henschel 2020-09-12 21:57:54 UTC
Still invalid file in Version: 7.1.0.0.alpha0+ (x64)
Build ID: 1e0cfd5662d95cea84e80e4fe10d52c3b1101ae6
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 9 Regina Henschel 2021-12-11 14:26:13 UTC
LO still writes the invalid attribute "text:formula".
Tested in Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4ac9032163cf55c160145373e7c41741c9c339ca
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 10 QA Administrators 2023-12-12 03:13:47 UTC Comment hidden (obsolete)
Comment 11 Regina Henschel 2023-12-12 08:09:12 UTC
The saved file is still invalid in Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 43967453e15e1d054972a7586cfef8f8e0866270
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded