Bug 84637 - Cross-references saved incorrectly in docx
Summary: Cross-references saved incorrectly in docx
Status: RESOLVED DUPLICATE of bug 42346
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: Other Linux (All)
: high normal
Assignee: Not Assigned
Depends on:
Reported: 2014-10-03 15:32 UTC by Jean-Sébastien Gosselin
Modified: 2014-11-06 15:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

.odt example (17.79 KB, application/vnd.oasis.opendocument.text)
2014-10-03 15:32 UTC, Jean-Sébastien Gosselin
.docx example (4.95 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-10-03 15:33 UTC, Jean-Sébastien Gosselin
Original Libroffice file showing working cross reference (76.22 KB, application/vnd.oasis.opendocument.text)
2014-11-06 12:19 UTC, deligeo
Docx file save with LO from Original file. Showing misbehaving cross reference (52.85 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-11-06 12:20 UTC, deligeo
Same file, re-worked in MSO2013 with working cross reference, for diff detection (62.10 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-11-06 12:21 UTC, deligeo

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Sébastien Gosselin 2014-10-03 15:32:56 UTC
Created attachment 107272 [details]
.odt example


Cross-reference to Number range variables (Figures, Table, Illustration, etc.) are not saved correctly in docx format.


(1) First, create a number range variable:

Insert > Cross-reference... > Variables > Number range > Illustration > Insert

(2) Second, create a cross-reference to this variable:

Insert > Cross-reference... > Cross-references > Illustration > Numbering > Insert

(3) Save as docx.


The cross-reference is not converted correctly to text format in the .docx document. It doesn't show the content of the field, but the type of the variable instead. For the example given above, it would not show "1", but "Illustration" instead. This problem is not present when saving in .doc format.
Comment 1 Jean-Sébastien Gosselin 2014-10-03 15:33:28 UTC
Created attachment 107273 [details]
.docx example
Comment 2 Jean-Sébastien Gosselin 2014-11-04 18:45:53 UTC
Bug is still reproducible in Version:
Comment 3 deligeo 2014-11-06 12:19:18 UTC
Created attachment 109029 [details]
Original Libroffice file showing working cross reference
Comment 4 deligeo 2014-11-06 12:20:19 UTC
Created attachment 109030 [details]
Docx file save with LO from Original file. Showing misbehaving cross reference
Comment 5 deligeo 2014-11-06 12:21:14 UTC
Created attachment 109031 [details]
Same file, re-worked in MSO2013 with working cross reference, for diff detection
Comment 6 deligeo 2014-11-06 12:23:37 UTC
Confirm this bug on LO

Attached 3 files to show behavior and difference in word/document.xml between the DOCX save from LO and a working equivalent from MSO2013.

This bug is a show stopper for me and anyone exchanging documents with MSO users
Comment 7 V Stuart Foote 2014-11-06 15:24:27 UTC
Some QA housekeeping

Nothing new in this issue. Resolving as duplicate of bug 42346 which is already on the MAB list.

*** This bug has been marked as a duplicate of bug 42346 ***
Comment 8 Jean-Sébastien Gosselin 2014-11-06 15:46:19 UTC
Just adding some specifications regarding the duplicate of this bug report with bug 42346. I think the behaviour described in the description of bug 42346 is not, strictly speaking, the same as the one I have reported.

I was not, in this bug report, reporting about the fact that the cross-references are converted to text upon saving to .doc or .docx format. I can quite live with that at the moment.

I am reporting that, for the .docx format only, the cross-references are not converted to text correctly.

This behaviour is not present when converting to .doc format, in contrast to what is said in the description of bug 42346.

I am very glad however if both behaviour comes from the same source, and that it will be resolve soon. Just wanted to be sure everything was clear with my description and there was no misunderstanding. This bug will become very problematic for me in a near future.

Best regards