[Libreoffice-bugs] [Bug 139835] New: FILESAVE: Cross-reference to footnote number disappears upon reopening when saving to DOCX

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Jan 22 13:00:10 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=139835

            Bug ID: 139835
           Summary: FILESAVE: Cross-reference to footnote number
                    disappears upon reopening when saving to DOCX
           Product: LibreOffice
           Version: 7.0.4.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: bastien.dumont at posteo.net

Created attachment 169090
  --> https://bugs.documentfoundation.org/attachment.cgi?id=169090&action=edit
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"/>
      <w:bookmarkEnd w:id="1"/>
      <w:r>
        <w:rPr>
          <w:rStyle w:val="Ancredenotedebasdepage"/>
        </w:rPr>
        <w:footnoteReference w:id="2"/>
      </w:r>

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"/>
      <w:r>
        <w:rPr>
          <w:rStyle w:val="Ancredenotedebasdepage"/>
        </w:rPr>
        <w:footnoteReference w:id="2"/>
      </w:r>
      <w:bookmarkEnd w:id="1"/>

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210122/7a65273b/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list