Description: Hi, I wrote a book of about 300 pages containing several pictures and about 50 endnotes. I had saved it as .doc (word format) because I will need to convert it later to epub, mobi and pdf Format. Anyway, after opening it today I first thought all my endnotes were gone, but then I noticed that they are suddenly all over the place on different pages (However, not like foodnotes on the page the anker is placed). Trying to reformat them as Endnotes did not help, even deleting the first one with ctrl x and then inserting a new endnote die not help. However, now Writer crashed twice while opening the file and saving it. Steps to Reproduce: 1.insert endnote 2.right click in endnote and use foodnote/endnote to change 3.delete wrong endnote with ctrl x and insert again as endnote Actual Results: When I try to change endnotes or foodnotes using any of the thre steps they are placed on all kind of pages, like foodnotes, but not on the right page and not in order (at least the recreatesd endnote "1" is after endnote 32, then about 5 or 6 lines of Text, then endnote 33 -42document Expected Results: Have all endnotes on the last pages in right order Reproducible: Always User Profile Reset: No Additional Info: In Openoffice 4.1.3 I can open the saved document correctly.
An example file including steps to reproduce would be nice to have
(In reply to Telesto from comment #1) > An example file including steps to reproduce would be nice to have I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Created attachment 161061 [details] Example file
STR 1. Open the attached file 2. Save as DOC 3. File reload Endnote look like footnotes not in 4.3.7.2
Bisected to: tdf#124601 sw: add ContinuousEndnotes layout compat option Writer has two cases for laying out endnotes: either they are at the end of the section or are on a separate endnote page at the end of the document. Word always puts endnotes as continuous content at the end of the document, not on a separate page. Given that this continuous / separate page behavior difference seems to be not part of the ODF or OOXML file format and neither UI allows to configure this, the best way to resolve this looks like a new layout compat option. At a layout level, the "endnotes at the end of the section" code is close to what we need, we just need to make sure that: 1) Endnotes are never moved backwards, even if their reference moves back. 2) When appending an endnote, they should go to the footnote container on the last page, not close to their reference. With this, the page number in Word and Writer now match for the bugdoc. https://cgit.freedesktop.org/libreoffice/core/commit/?id=4814e8caa5f06c4fe438dfd7d7315e4a2410ea18 ~/win64-6.4 $ git bisect good f0d625e87e083783f9495e007ea69704ac5f3464 is the first bad commit commit f0d625e87e083783f9495e007ea69704ac5f3464 Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Mon Sep 30 13:51:06 2019 -0700 source 4814e8caa5f06c4fe438dfd7d7315e4a2410ea18 source 4814e8caa5f06c4fe438dfd7d7315e4a2410ea18 :040000 040000 5f81ebdc97dc109fef6a70cf719a9b5f46002047 b39bbf45e3d61deb81000b436cb120233c01030e M instdir
Adding cc to Miklos Vajna
This seems to be working as intended. Word only supports endnotes at the end of the document (continuously, not on a separate page), so we turn on that layout compat flag when opening DOC files. Once you save to a Word format and you reopen the document, Writer will do its best to layout the doc the same way as Word does. One thing we can do is to add UI for this flag, so if you open your DOC file and you don't like the Word layout, then disabling the ContinuousEndnotes mode is possible via tools -> options -> writer -> compatibility.
Created attachment 161582 [details] Proper example file
(In reply to Miklos Vajna from comment #7) > This seems to be working as intended. Word only supports endnotes at the end > of the document (continuously, not on a separate page), so we turn on that > layout compat flag when opening DOC files. Once you save to a Word format > and you reopen the document, Writer will do its best to layout the doc the > same way as Word does. > > One thing we can do is to add UI for this flag, so if you open your DOC file > and you don't like the Word layout, then disabling the ContinuousEndnotes > mode is possible via tools -> options -> writer -> compatibility. Lets add a proper example file.. demonstrating the issue 1. Open ODT 2. Export to DOC -> File & Reload (file opens wrongly in LibO, but fine fine in Word 2003)
I can now reproduce the problem with the above sample.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/35bb0594b2d977312ef06fc5262cc7592bc13d0f tdf#133145 sw ContinuousEndnotes: fix moving endnotes to a previous page It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/b67ee7ed04fb081c21205ada72c0843af92de28c tdf#133145 sw ContinuousEndnotes: fix moving endnotes to a previous page It will be available in 7.0.0.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/7caa0003b0dc71ed676cc8fa84585c49f8ac5031 tdf#133145 sw ContinuousEndnotes: fix moving endnotes to a previous page It will be available in 6.4.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.