Bug 113776 - Hierarchical numerbing of objects (e.g. tables, figures) is not saved properly to DOC or DOCX format
Summary: Hierarchical numerbing of objects (e.g. tables, figures) is not saved properl...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc, filter:docx
Depends on:
Blocks: DOCX-Fields DOC-Fields
  Show dependency treegraph
 
Reported: 2017-11-12 00:46 UTC by Tamás Zolnai
Modified: 2023-03-15 21:10 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Zolnai 2017-11-12 00:46:21 UTC
Description:
Both in LibreOffice and MS Office there is an option to insert caption with hierarchical numbering. For example 1.2, 1.3, etc, where the first number is the chapter and second one is the object number. This kind of fields are not saved correctly to DOC / DOCX format. When you open the exported document in MSO, first it seems OK, but when yo update the fields the numbering becomes a one level numbering consisting of the object number only.

Steps to Reproduce:
1. Open attached test document
2. Save it to DOC or DOCX
3. Open the save file in MSO Word
4. Update fields (select the field and press F9)

Actual Results:  
After an update fields don't show chapter number anymore.

Expected Results:
Hierarchical numbering should be saved properly.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Comment 1 Tamás Zolnai 2017-11-12 00:47:52 UTC
This bug was splitted form bug 42346, which was about cross-references. Since cross-references are saved as bookmarks around the numbering field in the caption, these references also shows wrong data.
Comment 2 Tamás Zolnai 2017-11-12 00:48:46 UTC
See attachment 137569 [details] for an ODT test document having hierarchical numbering.
Comment 3 andis.lazdins 2017-11-12 06:37:48 UTC
I can confirm that references to chapter numbers disappears, both, from captions and cross-references on update. Ubuntu 16.04 64 bit. 
Field update can be done also by Ctrl+A with following F9. Might not work in Virtualbox.

It is interesting, if I add additional table and new Caption Table or add new caption to existing table, all captions and cross-references are updated and contains reference to chapter number, but this doesn't work for Figures.
Comment 4 V Stuart Foote 2017-11-13 14:56:38 UTC
confirmed with attachment 137569 [details] in Word 2016 on save from LO 6.0.0alpha1+, but at this build just the ww8 filter export to OOXML .docx is in place. The ww8 export to MS Binary was not yet in this build.

Opened in Word 2016 with the figures and captions objects the "numbering" dialog is not being picked up with the "Include chapter number" set. 

Also the object's "number" does not appear to be linked from to its chapter object's attributes.

=-ref-=
[1] http://cgit.freedesktop.org/libreoffice/core/commit/?id=98bc7215935f1eb2e0dc6f1db826d8e729430c13

[2] http://cgit.freedesktop.org/libreoffice/core/commit/?id=cbaa72d6e963847a4b98526430cd928bc7928fdd

=-testing-=
Windows 10 Home 64-bit en-US (ver 1709) with
Version: 6.0.0.0.alpha1+
Build ID: a5af0fd9f27af42cf2e8571f659cdad6e606215b
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-11-06_23:18:19
Locale: en-US (en_US); Calc: group
Comment 5 QA Administrators 2018-11-14 03:45:46 UTC Comment hidden (obsolete)
Comment 6 andis.lazdins 2018-11-14 06:09:16 UTC
I can confirm that this bug is still valid in 6.1.3.2 Ubuntu 18.04. However I don't know easy way to insert captions with Chapters in Word. Usually in documents, which I receive from others, this is implemented in different ugly ways, but far from simplicity of Libreoffice.
Comment 7 Lars Jødal 2018-11-14 08:05:51 UTC
It is also still present in LOdev 6.2.0.0.alpha1 on Win10.

Furthermore, the reference of form "Above/below" is shown as a reference error when saved as DOCX (but works when saved as DOC). I have tested this "Above/below" with DOCX in these versions:
LOdev 6.2.0.0.alpha1
LO 6.1.3.2 (current fresh version)
LO 6.0.7.3 (current still version)
LO 6.0.0.3 (first official version in the 6.x line)

All these version showed the same behaviour for DOCX: Hierachical numbering disappears, reference of type "Above/below" is shown as a reference error.

Given that 6.0 was the first version to handle figure references correct (except for the hierachical ones) in DOCX, the "Above/below" error seems to be an aspect missed when I and others evaluated the fix to bug 42346.

(If the "Above/below" problem better belongs to a separate bug report, please give notice, and I will create such a bug report.)
Comment 8 Lars Jødal 2018-11-14 08:51:54 UTC
In continuation of the previous comment: 

The problem with "above/below" references in DOCX seems to only apply to the case of hierachiacal numbering. Creating a new test document, using only plain numbering, I could not reproduce my finding.

(Accordingly, it seems to belong to this thread, not a separate bug report.)
Comment 9 QA Administrators 2019-11-15 03:34:53 UTC Comment hidden (obsolete)
Comment 10 Lars Jødal 2019-11-15 07:43:11 UTC
Reproducible with LO 6.3.3.2

Details:

Tested with attachment 137569 [details]

When saved as doc or docx, hierarchical number (1.1, 1.2, 2.1, 2.2) is opened as consecutive numbering (1, 2, 3, 4). In LO Writer, this is shown right away, in MS Word it appears right, but only until field update (e.g. after clicking "Print").

The "Above/below" reference gives an error as DOCX. Opening the DOC version in my local (Danish) MS Word gives the local language version of "below" ("nedenfor"), even though the language text is English.

Version: 6.3.3.2 (x64)
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU tråde: 4; Styresystem: Windows 10.0; Gengiver af brugergrænseflade: GL; VCL: win; 
Lokalisering: da-DK (da_DK); Sprog for brugergrænseflade: da-DK
Calc: CL
Comment 11 Justin L 2021-04-06 09:09:13 UTC
repro 7.2+ for both DOC and DOCX.
Comment 12 space 2023-03-14 13:33:54 UTC
Hi guy,
I used the latest released version of LO v7.5.1, this issue can be still reproduced for .doc and .docx. so how is the progress and what is the plan ?

Thanks
BR
Comment 13 Gabor Kelemen (allotropia) 2023-03-15 21:10:16 UTC
(In reply to space from comment #12)
> Hi guy,
> I used the latest released version of LO v7.5.1, this issue can be still
> reproduced for .doc and .docx. so how is the progress and what is the plan ?
> 
> Thanks
> BR

Hi

If this bug is important for you (or any organization you work for/with) to be fixed, please consider getting professional help from certified developers:

https://www.documentfoundation.org/certified-developers/