Bug 164019 - Data loss while importing an `ODT` file with ~Nested Footnotes~
Summary: Data loss while importing an `ODT` file with ~Nested Footnotes~
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-24 07:17 UTC by Jambunathan K
Modified: 2024-11-24 07:47 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
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 (479.31 KB, application/zip)
2024-11-24 07:17 UTC, Jambunathan K
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 (26.64 KB, application/vnd.oasis.opendocument.text)
2024-11-24 07:18 UTC, Jambunathan K
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 (223.29 KB, image/png)
2024-11-24 07:19 UTC, Jambunathan K
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) (22.59 KB, application/vnd.oasis.opendocument.text)
2024-11-24 07:20 UTC, Jambunathan K
Details
02-how-lo-25.2-2024-Nov-23 03:10-MY-EXPECTATION-nested-footnote-definition.odt-was-created.png: Additional remarks (215.41 KB, image/png)
2024-11-24 07:47 UTC, Jambunathan K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jambunathan K 2024-11-24 07:17:29 UTC
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>
Comment 1 Jambunathan K 2024-11-24 07:18:53 UTC
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
Comment 2 Jambunathan K 2024-11-24 07:19:40 UTC
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
Comment 3 Jambunathan K 2024-11-24 07:20:31 UTC
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)
Comment 4 Jambunathan K 2024-11-24 07:22:55 UTC
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.
Comment 5 Jambunathan K 2024-11-24 07:47:10 UTC
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