Bug 119493 - FILESAVE DOCX: Writer User Fields converted into plain text instead of Set variables
Summary: FILESAVE DOCX: Writer User Fields converted into plain text instead of Set va...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
: 141471 (view as bug list)
Depends on:
Blocks: DOCX-Limitations DOCX-Fields
  Show dependency treegraph
 
Reported: 2018-08-25 14:20 UTC by Oliver Brinzing
Modified: 2022-04-01 05:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
writer_test_userfield (10.29 KB, application/vnd.oasis.opendocument.text)
2018-08-25 14:20 UTC, Oliver Brinzing
Details
writer_test_userfield.docx (4.44 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-08-25 14:20 UTC, Oliver Brinzing
Details
writer_test_userfield_converted.docx (9.60 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-08-25 14:21 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2018-08-25 14:20:11 UTC
Created attachment 144429 [details]
writer_test_userfield

steps to reproduce:
- create a new writer document
- insert a User Field (Ctrl+F2 -> Variables/User Field) 
  Name:  X_TEST 
  Value: Hello World!
  Format: Text

- save as *.odt
- save as *.docx
- User Field "X_TEST" with content "Hello World!" is
  exported as: "User Field X_TEST = Hello World!"
  -> read-/editing in word is difficult.

- save as *.doc results in text: "Hello World!"
  -> at least read-/editing in Word is possible

AFAIK User Fields are not supported in Word:
2.1.96 Part 1 Section 7.4.9, text:user-field-get
https://msdn.microsoft.com/en-us/library/jj670930(v=office.12).aspx

possible solution:
"OpenXML/ODF Translator Command Line Tools" from 
http://odf-converter.sourceforge.net/download.html 
converts UserFields into Set Variables.

attached a sample *.odt/*.docx and converted *.docx file
Comment 1 Oliver Brinzing 2018-08-25 14:20:54 UTC
Created attachment 144430 [details]
writer_test_userfield.docx
Comment 2 Oliver Brinzing 2018-08-25 14:21:17 UTC
Created attachment 144431 [details]
writer_test_userfield_converted.docx
Comment 3 Buovjaga 2018-09-20 09:33:14 UTC
Ok, I guess this can be seen as an enhancement of sorts.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 05db125c57ea3c8f04a304561209c32cc5c45a67
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on September 17th 2018
Comment 4 Xisco Faulí 2021-05-10 16:25:49 UTC
*** Bug 141471 has been marked as a duplicate of this bug. ***
Comment 5 Justin L 2022-04-01 05:59:50 UTC
This was fixed in LO 7.0 by Author: Miklos Vajna on Thu Jan 30 10:21:08 2020
with commit 676862bb8aa043f116615e5d0dac59254eaa8138
    DOCX export: implement support for user fields
    
    Updating the field doesn't work yet, that'll need additional markup in
    settings.xml.