Created attachment 169090 [details]
Unmodified file created by LibreOffice
This bug is also present in 6.4.7.
Steps to reproduce:
1. Create a new file with a footnote.
2. Add a cross-reference to the footnote: first its page number, then the footnote's number.
3. Save to DOCX.
4. Close and reopen.
Result: The reference to the footnote's number disappeared.
I investigated a little the DOCX archive. Here is the culprit in word/document.xml:
<w:bookmarkStart w:id="0" w:name="_RefF0"/>
<w:bookmarkStart w:id="1" w:name="_RefF0"/>
There is no <w:bookmarkEnd w:id="0"/> in any file in the archive and both bookmarks have the same name. I suppose that we should have something like this instead:
<w:bookmarkStart w:id="1" w:name="fnRef"/>
where the bookmark elements with w:id="0" would be placed in word/footnotes.xml (at least it is what I observed in a document produced by Word 2010).
Additionally, the footnote reference is called by:
<w:instrText> REF _RefF0 \h </w:instrText>
We should have (provided that we changed the w:name attribute):
<w:instrText> NOTEREF fnRef \h </w:instrText>
These are only hints, and I may be mistaken at some points. I produced a modified version of the file with the fixes mentioned above. When I open it in Word 2010, it complains that it is corrupt, but if I force opening, it basically works. References are here and can be updated correctly if I modify the file.
Created attachment 169091 [details]
File including the manual fixes described in the bug report
Bastien, thank your for reporting the bug. Please add the original odt-file before saving to as docx-file. Thank you.
Created attachment 169524 [details]
Same file as ODT
(In reply to Dieter from comment #2)
> Bastien, thank your for reporting the bug. Please add the original odt-file
> before saving to as docx-file. Thank you.
> => NEEDNFO
Hi, here it is. More precisely, I wrote a new identical file that I saved in odt before exporting it to docx (with the same results). Thank you for investigating it!
I confirm it with
Version: 220.127.116.11.alpha0+ (x64) / LibreOffice Community
Build ID: 396c2ad2daad6fe6a11703d0ae1593929834afe2
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Steps to reproduce
1. Open attachment 169524 [details]
2. Save as docx
3. Close and reopen
Cross reference to footnote disappears.
Version: 18.104.22.168.alpha0+ (x64) / LibreOffice Community
Build ID: 7ac19fbce8a35f559eebb879cd0f232bfc95e703
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US