Bug 153255 - footnotes swapped when editing a MS Word document
Summary: footnotes swapped when editing a MS Word document
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.7.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.4.7 target:7.5....
Keywords: bibisected, bisected, filter:docx, regression
: 153462 (view as bug list)
Depends on:
Blocks: DOCX-Footnote-Endnote
  Show dependency treegraph
 
Reported: 2023-01-27 22:47 UTC by Joao Carvalho
Modified: 2023-04-01 09:26 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
This is the MS Word file from which footnotes load incorrectly in LO Writer. (850.45 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-01-27 22:49 UTC, Joao Carvalho
Details
Illustrative screen capture. (383.55 KB, image/png)
2023-01-27 22:50 UTC, Joao Carvalho
Details
Still No-separating-line and No-superscript in footnote numbering.png (538.61 KB, image/png)
2023-03-31 12:20 UTC, Piotr Osada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joao Carvalho 2023-01-27 22:47:59 UTC
Description:
When I opened a MS Word document on LO Writer, all footnotes were swapped. For example: footnote 11 was placed where footnote 7 was supposed to be, and footnote 7 was placed where footnote 2 was supposed to be. The document is attached and I provide an illustrative screen capture.

Steps to Reproduce:
1. Open attached documento on MS Word.
2. Open the same documento on LO Writer.
3. Compare the text on all footnotes.

Actual Results:
The text on all footnotes are swapped. The text from footnote 1 appears on footnote 10; text from 2 appears on 11; text from 3 appears on 12; text from 4 appears on 8; text from 5 appears on 4; text from 6 appears on 1; text from 7 appears on 2; text from 8 appears on 5; text from 9 appears on 3; text from 10 appears on 6; text from 11 appears on 7; text from 12 appears on 9.

Expected Results:
The footnotes on LO Writer should match those on MS Word.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.4.3.2
Build ID: 40(Build:2)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: pt-BR (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Joao Carvalho 2023-01-27 22:49:58 UTC
Created attachment 184968 [details]
This is the MS Word file from which footnotes load incorrectly in LO Writer.
Comment 2 Joao Carvalho 2023-01-27 22:50:28 UTC
Created attachment 184969 [details]
Illustrative screen capture.
Comment 3 m_a_riosv 2023-01-27 23:11:36 UTC
Reproducible
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7c3ea0abeff6e0cb9e2893cec8ed63025a274117
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Comment 4 Stéphane Guillou (stragu) 2023-01-27 23:34:43 UTC
I can also reproduce in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 69c6f7bccec838b7288a25a29a83b7f782ba7586
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and

Version: 7.2.7.2 / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

And checked original order with:

Microsoft® Word for Microsoft 365 MSO (Version 2212 Build 16.0.15928.20196) 64-bit 

Not in:

Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

László, given your work on bug 152203, do you mind having a look? Thank you!
Comment 5 raal 2023-01-28 00:20:35 UTC
bisected to https://git.libreoffice.org/core/+/9b39ce0e66acfe812e1d50e530dc2ccdef3e1357
tdf#76260 DOCX import: fix slow footnote import
Comment 6 Telesto 2023-02-10 19:29:11 UTC
*** Bug 153462 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2023-03-21 15:57:58 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ed0372bac123b402fe3cd694a455e8328117752d

tdf#153255 DOCX import: fix footnote order

It will be available in 7.6.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.
Comment 8 László Németh 2023-03-21 16:02:29 UTC
Commit description:

tdf#153255 DOCX import: fix footnote order

Simple unit test for tdf#152203 allowed to create
bad ordering algorithm by accident without noticing
the problem, which caused problem for most of the DOCX
files, where serialization in footnotes.xml doesn't follow
the order of the footnotes.

Regression from commit 9b39ce0e66acfe812e1d50e530dc2ccdef3e1357
"tdf#76260 DOCX import: fix slow footnote import".

Follow-up to commit 09ae3c01940bbc25ffde51963683b04e3cb4bb6a
"tdf#152203 DOCX import: fix mixed footnotes/endnotes".
Comment 9 Commit Notification 2023-03-22 09:26:37 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/12c776fd07933a306467f0b412cbf5eedc06a6d3

tdf#153255 DOCX import: fix footnote order

It will be available in 7.4.7.

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.
Comment 10 Commit Notification 2023-03-22 14:25:25 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/76ab4aad33f6a019b5bc28af17917dd58e7cf9f7

tdf#153255 DOCX import: fix footnote order

It will be available in 7.5.3.

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.
Comment 11 Stéphane Guillou (stragu) 2023-03-23 15:58:34 UTC
Thanks László, verified as fixed in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0d18262789fbe95eafe32bd775a9827ed99685ef
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 12 Commit Notification 2023-03-24 10:19:53 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-5-2":

https://git.libreoffice.org/core/commit/0a74936870937b64ef841d5ae78ac3bea876f16d

tdf#153255 DOCX import: fix footnote order

It will be available in 7.5.2.

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.
Comment 13 Piotr Osada 2023-03-31 12:20:46 UTC
Created attachment 186359 [details]
Still No-separating-line and No-superscript in footnote numbering.png

I confirm that the Footnote Mixing is now fixed in 7.5.2.2.

But there are still differences between Microsoft Office:
- numbering in the footnotes area are in normal size instead of being as superscripts,
- there lacks of separating line between the document main area and footnote area.
Comment 14 Piotr Osada 2023-03-31 12:27:29 UTC
(In reply to Piotr Osada from comment #13)

Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: pl-PL (pl_PL); UI: en-GB
Calc: threaded
Comment 15 Stéphane Guillou (stragu) 2023-03-31 13:20:20 UTC
(In reply to Piotr Osada from comment #13)
> Created attachment 186359 [details]
> Still No-separating-line and No-superscript in footnote numbering.png
> 
> I confirm that the Footnote Mixing is now fixed in 7.5.2.2.
> 
> But there are still differences between Microsoft Office:
> - numbering in the footnotes area are in normal size instead of being as
> superscripts,
> - there lacks of separating line between the document main area and footnote
> area.

Thank you for following up, Piotr. Please file a new bug for each of these issues if it isn't already reported. See here some existing DOCX footnote/endnote reports: https://bugs.documentfoundation.org/showdependencytree.cgi?id=109195&hide_resolved=1