Bug Hunting Session
Bug 55427 - FILESAVE: Footnotes do not remain at end of document in .doc and .docx formats
Summary: FILESAVE: Footnotes do not remain at end of document in .doc and .docx formats
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.0.0
Keywords:
: 94788 (view as bug list)
Depends on:
Blocks: Footnote-Endnote
  Show dependency treegraph
 
Reported: 2012-09-28 15:31 UTC by sdc.blanco
Modified: 2017-08-18 09:41 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file to illustrate problem (12.62 KB, application/vnd.oasis.opendocument.text)
2012-09-28 15:31 UTC, sdc.blanco
Details
convertFN2EN.odt: mixture of endnotes and chapter-end footnotes (10.17 KB, application/vnd.oasis.opendocument.text)
2017-06-10 10:54 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2012-09-28 15:31:08 UTC
Created attachment 67830 [details]
Sample file to illustrate problem

1. Make a text file with a few pages of text and some footnotes.

2. Use Tools / Footnotes/Endnotes  and select Position / End of document
(the footnotes will appear now at the end of the document)

3.  Save in .doc format.

4.  When you re-open the file, the footnotes will have returned to the bottom of the page.

5. This also happens in a .odt file is saved as .doc.  (I have attached a sample .odt file so that you can see what happens if saved as .doc)
Comment 1 sdc.blanco 2012-10-02 12:22:33 UTC
The same problem also appears if saved as a .docx file.  

And both problems also appear in the 3.6.1.2 release.
Comment 2 bfoman (inactive) 2013-03-22 11:40:23 UTC
(In reply to comment #0)
> 4.  When you re-open the file, the footnotes will have returned to the
> bottom of the page.

Confirmed with:
LO 4.0.1.2
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

After reopening saved file:
doc - footnotes at the bottom of each page, end of document setting is ignored
docx - footnotes partly (text is missing - just numbers) at the bottom of each page, end of document setting is ignored
Comment 3 QA Administrators 2015-02-19 15:38:00 UTC Comment hidden (obsolete)
Comment 4 sdc.blanco 2015-02-25 15:23:20 UTC
The problems remain, without changes, in LibreOffice 4.4.1.2  (with Microsoft Windows 7, 64bit). 

I can also elaborate the description of the "problem behaviour".

The Tools / Footnotes/Endnotes   and select Position / End of document  works as expected when the document is open.

The problem arises whenever the document is saved (regardless of the format that was used when the document was opened.).  When the file is saved in either .doc or .docx format (both the OpenOffice XML Text and the Microsoft Word 20xx XML options), then the footnotes will return to "End of Page" instead of "End of Document"  (This happens also if the file is opened with Microsoft Word).

If the file is saved in .odt format, then it behaves as expected (i.e., the footnotes remain at the end of the document)
Comment 5 Buovjaga 2015-10-09 14:18:25 UTC
*** Bug 94788 has been marked as a duplicate of this bug. ***
Comment 6 Timur 2017-06-06 16:16:06 UTC
Before confirming this a bug, one should've checked whether this is supported in OOXML and MSO. 
MSO has "Bottom of page" and "Below text" footnote options and it doesn't have "End of document" for footnote at all.  
So to me this looks like NotOurBug.
Comment 7 Xisco Faulí 2017-06-10 10:45:10 UTC
Patch submitted to gerrit: https://gerrit.libreoffice.org/#/c/38634/
Comment 8 Justin L 2017-06-10 10:54:04 UTC
Created attachment 133941 [details]
convertFN2EN.odt: mixture of endnotes and chapter-end footnotes

(In reply to Timur from comment #6)
> MSO has "Bottom of page" and "Below text" footnote options and it doesn't
> have "End of document" for footnote at all.  
A good note to have. Since doc(x) can't directly support chapter-end footnotes, loosely converting them into endnotes seems to be the closest in compatibility, and should address the concerns of this bug report.

proposed fix at gerrit.libreoffice.org/38634
Comment 9 Commit Notification 2017-08-17 12:13:48 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=be6534dc47568dbf57057dec73ef260b63e198c0

tdf#55427 ww8export: treat document-end-footnotes as endnotes

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Justin L 2017-08-17 15:22:42 UTC
MSWord has two choices for footnotes - at page-end or page-bottom. LO has two very different choices for footnotes - at document-end or page-bottom.

Since document-end footnotes are essentially indistinguishable from endnotes, the patch in comment 9 converts those footnotes into endnotes during DOC/DOCX/RTF export.

Some compromises had to be made. The main compromise is that the anchor numbering for endnotes defaults to i,ii,iii while footnotes are 1,2,3. The conversion obviously will switch to endnote style. This is user adjustable of course (Tools - Footnotes and Endnotes) which will be retained on following file-saves.  So this compromise can be easily managed by the user.

Also the (footnote) paragraph style is also retained, but future endnotes will use a potentially different endnote paragraph style. By default they are identical, so most people will never even notice. Again, the user can switch paragraph styles later if necessary.
Comment 11 Timur 2017-08-18 09:41:26 UTC
Tested and I set to verified. 

This looks like a new funct. to me so I think this is for https://wiki.documentfoundation.org/ReleaseNotes/6.0 and not for backport.

Sth. like: 
New interoprability feature for "End of document" footnotes in ODT which are now converted into endnotes during DOC/DOCX/RTF export. tdf#55427 (Justin Luth)