Created attachment 197756 [details] lo-25.2-2024-Nov-23 03:10-data-loss-with-nested-footnote-definition.zip: Contains all artefacts--ODT file, screenshots etc--detailing this bug __________________________________________________ DATA LOSS WHILE IMPORTING AN `ODT` FILE WITH `NESTED FOOTNOTES' Jambunathan K __________________________________________________ Table of Contents _________________ 1. Bug Description .. 1. What ODF spec says about 'Nested Footnotes' 2. About Attachments 3. Bread Crumb for the bug reporter 1 Bug Description ================= When an `ODT' file with `Nested Footnote Definition' is imported in to LO 25.2 (dtd. 2024-Nov-23 03:10) it results in Data Loss. There are two issues: - The user has to be INFORMED that the LO encountered `Nested Footnotes' during import and it HAS MOST DEFINITELY _ignored_ some `Footnote Definitions'. IOW, LO has to ALERT the user about what it did to the user behind his back. - Instead of going with 'Data Loss'-on-Import, LO can rewrite the input XML to an agreeable equivalent. See attachment for what I mean here. This bug is a follow up to ['Bug 163974 - (May be ODF-spec related) Nested Footnotes: LO reports `Read Error` but `ODFValidator` is quite happy'] and filed against a daily build of LO 25.2 dtd. 2024-Nov-23 03:10 downloaded from <https://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@tb99-TDF/current/> kjambunathan@debian-ng:~$ uname -a Linux debian-ng 6.11.5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.11.5-1 (2024-10-27) x86_64 GNU/Linux kjambunathan@debian-ng:~$ dpkg -l | grep writer | grep libreofficedev ii libreofficedev25.2-writer 25.2.0.0.alpha1-1 amd64 Writer brand module for LibreOfficeDev 25.2.0.0.alpha1 Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 869fff459cbee6a2edadd5c24f2b65c199712de6 CPU threads: 4; OS: Linux 6.11; UI render: default; VCL: gtk3 Locale: en-IN (en_IN); UI: en-US Calc: threaded ['Bug 163974 - (May be ODF-spec related) Nested Footnotes: LO reports `Read Error` but `ODFValidator` is quite happy'] <https://bugs.documentfoundation.org/show_bug.cgi?id=163974> 1.1 What ODF spec says about 'Nested Footnotes' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <https://docs.oasis-open.org/office/OpenDocument/v1.4/OpenDocument-v1.4-part3-schema.html#element-text_note-body> > Note: The schema allows for the inclusion of <text:note> > elements as a descendant of a child of the > <text:note-body> element. While this may be reasonable > for note types, it is not reasonable for footnotes and > endnotes. Conforming consumers need not support notes > inside notes. 2 About Attachments =================== lo-25.2-2024-Nov-23 03:10-DATA-LOSS-nested-footnote-definition.odt This file contains `Nested Foonote Definition' 01-lo-25.2-2024-Nov-23 03:10-DATA-LOSS-nested-footnote-definition.odt.png How the above `ODT' file is rendered. Note the data loss. lo-25.2-2024-Nov-23 03:10-MY-EXPECTATION-nested-footnote-definition.odt When `lo-25.2-2024-Nov-23 03:10-DATA-LOSS-nested-footnote-definition.odt' is imported in to LO, I expect the resulting file to look like this. 02-how-lo-25.2-2024-Nov-23 03:10-MY-EXPECTATION-nested-footnote-definition.odt-was-created.png Additional notes on how the previous `ODT' file is created. 3 Bread Crumb for the bug reporter ================================== <https://github.com/kjambunathan/org-mode-ox-odt/issues/281>
Created attachment 197757 [details] lo-25.2-2024-Nov-23 03:10-DATA-LOSS-nested-footnote-definition.odt: Importing this file in to LO results in Data Loss
Created attachment 197758 [details] 01-lo-25.2-2024-Nov-23 03:10-DATA-LOSS-nested-footnote-definition.odt.png: Data Loss wrt Nest Footnote Definition in action
Created attachment 197759 [details] lo-25.2-2024-Nov-23 03:10-MY-EXPECTATION-nested-footnote-definition.odt: LO should try hard and import the ODT file like this one (may be)
If you download the zip file named 'lo-25.2-2024-Nov-23 03:10-data-loss-with-nested-footnote-definition.zip', it contains all that you need to make sense of this bug. I have attached the ODT files and PNG files for convenience only and they are for getting a bird's eye view of bug within the browser.
Created attachment 197760 [details] 02-how-lo-25.2-2024-Nov-23 03:10-MY-EXPECTATION-nested-footnote-definition.odt-was-created.png: Additional remarks