Bug 98923 - LO Writer incorrectly reformats field codes from Word docx documents
Summary: LO Writer incorrectly reformats field codes from Word docx documents
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
: 142759 (view as bug list)
Depends on:
Blocks: DOCX-Fields
  Show dependency treegraph
 
Reported: 2016-03-27 17:23 UTC by brian.bj.parker99
Modified: 2025-03-19 12:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
docx file showing bug in field processing in Writer (292.11 KB, application/zip)
2016-03-27 17:23 UTC, brian.bj.parker99
Details

Note You need to log in before you can comment on or make changes to this bug.
Description brian.bj.parker99 2016-03-27 17:23:24 UTC
Created attachment 123890 [details]
docx file showing bug in field processing in Writer

When LO Writer loads Word docx files, the field codes are subtly reformated by removing spaces, which causes major problems with, for example, collaborators using Endnote bibliographic software as Endnote will no longer recognise the reformatted field codes, effectively destroying all citations in the document.

The attached example docx file “Test_bad_endnote_field_orig.docx” was created Word document with and inserted citation field using Endnote software.  
The attached screen shot “Screenshot_word_orig” shows this document in Word with the “show field code” option on.

The attached docx file “Test_bad_endnote_field_saved_from_lo.docx” was created by loading Test_bad_endnote_field_orig.docx in LO and saving it as a docx file.
The attached screen shot “Screenshot_word_after_saving_from_lo” shows this docx file loaded in Word with the “show field code” option on.

You can see how LO incorrectly removes the single space around the field code “ADDIN EN.CITE”.

Although apparently a minor bug it is of major impact as it prevents round trip editing of Word documents with collaborators who use Endnote software to manage references.

(A related bug is that the menu option View | Field Names in LO has no effect which makes it harder to identify this bug in LO as the files otherwise look identical if field codes are not displayed).

LibreOffice Version: 5.1.1.3  on OSX.
Comment 1 Phil Krylov 2019-04-02 22:53:30 UTC
Reproducible in:

Version: 6.3.0.0.alpha0+
Build ID: 0bc06d22a8bfb41e11a6abc17f6a0d449246d8a3
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; VCL: osx; 
Locale: en-US (en_RU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 2 Simon Dedman 2020-11-03 23:42:56 UTC
+1 for this. Using reference manager Qiqqa:

Format of working clusters in MS Word:

{MERGEFIELD .wWw..wWw.QIQQA_CLUSTER.oOo.229efe89bdfc4d268b135eda87f0534a.oOo.spencer1990operationally.oOo.INTRANET_0E4255D5-3AFB-4522-BDD4-74E0E5C23A73.xXx.SEPARATE_AUTHOR_DATE.xXx..oOo. * MERGEFORMAT}

Format of broken clusters after opening in LO, doing nothing, then saving:

{MERGEFIELD .wWw..wWw.QIQQA_CLUSTER.oOo.e92e4dcec05348dfb93ca7a116ca35b7.oOo.block2005electronic.oOo.INTRANET_0E4255D5-3AFB-4522-BDD4-74E0E5C23A73.xXx.SEPARATE_AUTHOR_DATE.xXx.TRUE.oOo.}

Difference: working clusters have " * MERGEFORMAT" after the terminal "oOo." and before the curly bracket.
This renders all citations broken in Qiqqa.
Comment 3 Justin L 2022-04-01 05:43:35 UTC
This could arguably be considered a bug in the endnote software. I guess one would need to find the documentation on the specification to see whether the space is required or is just pretty-printing.
Comment 4 QA Administrators 2024-04-01 03:12:10 UTC Comment hidden (obsolete)
Comment 5 Timur 2025-03-19 11:30:12 UTC
Still in 25.8+, field is not properly recognized, so no right-click options.
Comment 6 Timur 2025-03-19 12:08:28 UTC
*** Bug 142759 has been marked as a duplicate of this bug. ***