Created attachment 139700 [details]
The example file saved by LO
Shapes in footnotes cause corrupted files when the document is saved as DOCX.
Insert a shape in a footnote, save the file as DOCX and try to reopen the file.
We get the following error message:
File format error found at SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word/document.xml', Line 2, Column 2231(row,col).
Steps to reproduce:
1. Create a new document in LibreOffice Writer.
2. Create a short text document with multiple footnotes.
3. Insert a shape in one of the footnotes.
4. Save the document as DOCX.
5. Try to reload the file.
The file opens, but the user gets an error message in LO.
In Word 2013, we get an error message saying "There must be exactly one root element in documents".
A shape in a footnote shouldn't result a corrupted DOCX file.
Note: Word 2013 does not allow inserting shapes in a footnote - the button is greyed out.
Created attachment 139701 [details]
The error message when the file is opened by LO
Created attachment 139702 [details]
The error message when the file is opened by Word 2013
Confirmed with LO 220.127.116.11 / Windows 7.
Also reproduced in
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)
@Mike, I thought you might be interested in this...
*** This bug has been marked as a duplicate of bug 99227 ***
(In reply to László Németh from comment #5)
Hmm... making a bug filed in 2018, confirmed with 6.0 in comment 3, a duplicate for a bug fixed in 2016 for 5.4?
Given that docProps/app.xml of attachment 139700 [details] tells that generating application was LibreOffice 18.104.22.168 for Windows_x86, this can't be a dupe of tdf#99227. But the attachment itself is useless; and steps aren't specific enough, so I couldn't repro. A normal ODT is needed, which would produce invalid DOCX on export.
Created attachment 151724 [details]
test document for bibisecting
(In reply to Mike Kaganski from comment #7)
> Given that docProps/app.xml of attachment 139700 [details] tells that
> generating application was LibreOffice 22.214.171.124 for Windows_x86, this can't
> be a dupe of tdf#99227. But the attachment itself is useless; and steps
> aren't specific enough, so I couldn't repro. A normal ODT is needed, which
> would produce invalid DOCX on export.
Thanks, Mike, I detected the fix in the recent master, and it seemed, this was your fix, but it seems, it's not. Likely we will make a bibisect to fix the bug number in the duplicate field.
Putting it back to NEW since the document has been provided...
I am sorry, but could we *please* wait for OP comment here, if the document provided by other people indeed shows that specific problem or not?
(In reply to Mike Kaganski from comment #11)
> I am sorry, but could we *please* wait for OP comment here, if the document
> provided by other people indeed shows that specific problem or not?
in this particular case, Gabor and László are part of the same team, I assume the document provided is fine
(In reply to Xisco Faulí from comment #12)
Coffee! /me needs some coffee! Sorry for being that much blind!
I made a few quick tests and the last version I was able to reproduce the bug with was 6.0.7. Later versions I tested (126.96.36.199, 6.1.4, 6.2.3 and the latest master) exported the footnote with a shape perfectly fine. We bibisected the issue, and according to our results the bug was solved by this commit:
So, according to the bibisect results, this bug is a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=107969
*** This bug has been marked as a duplicate of bug 107969 ***