Bug 115557 - FILEOPEN DOCX Charts in footnotes multiply with every open and save
Summary: FILEOPEN DOCX Charts in footnotes multiply with every open and save
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Footnote-Endnote
  Show dependency treegraph
 
Reported: 2018-02-08 17:35 UTC by Gabor Kelemen (allotropia)
Modified: 2019-05-27 14:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from LO, with 1 chart in a footnote and 5 other footnotes (16.48 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-02-08 17:35 UTC, Gabor Kelemen (allotropia)
Details
The example file saved by LO, with one chart in each footnote (22.65 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-02-08 17:51 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the two documents in LO (231.45 KB, image/png)
2018-02-08 17:52 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the two documents in Word 2013 (103.23 KB, image/png)
2018-02-08 17:56 UTC, Gabor Kelemen (allotropia)
Details
Example odt file from 5.3 (14.06 KB, application/vnd.oasis.opendocument.text)
2018-02-12 07:59 UTC, Gabor Kelemen (allotropia)
Details
Same file opened and saved in 6.0 (14.17 KB, application/vnd.oasis.opendocument.text)
2018-02-12 08:01 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-02-08 17:35:40 UTC
Created attachment 139703 [details]
Example file from LO, with 1 chart in a footnote and 5 other footnotes

Charts in footnotes multiply every time a DOCX file is opened or the document is saved as DOCX. 
If a document has 1 chart in a footnote and multiple footnotes, the same chart will be copied to every footnote in the document. When the document is saved as DOCX and reopened, the charts will be multiplied by the number of the footnotes. 
So, for example, if a document has 1 chart in a footnote, and 6 footnotes, the document will have the same chart in all 6 footnotes. When the document is saved and reopened, every footnote will have 6 charts and the document will have 36 charts in total. 
Saving and reloading the file again will cause 216 charts total.

Steps to reproduce:
1. Create a new document in LibreOffice Writer.
2. Write a short text with multiple footnotes.
3. Insert a chart in one of the footnotes.
4. Save the document as DOCX.
5. Reload the file in LibreOffice, and save it again with a different filename as DOCX.

Actual results:
The number of charts is multiplied by the number of footnotes with every save and reload.

Expected results:
Charts shouldn't multiply.
Comment 1 Gabor Kelemen (allotropia) 2018-02-08 17:51:49 UTC
Created attachment 139704 [details]
The example file saved by LO, with one chart in each footnote
Comment 2 Gabor Kelemen (allotropia) 2018-02-08 17:52:43 UTC
Created attachment 139705 [details]
Screenshot of the two documents in LO
Comment 3 Gabor Kelemen (allotropia) 2018-02-08 17:56:31 UTC
Created attachment 139706 [details]
Screenshot of the two documents in Word 2013
Comment 4 Aron Budea 2018-02-10 18:46:03 UTC
I created my own sample in LO, but can't reproduce it with that (I can with your samples). Could you also attach a sample ODT that can be used for repro/testing when saved as DOCX?
Comment 5 Gabor Kelemen (allotropia) 2018-02-12 07:59:04 UTC
Created attachment 139817 [details]
Example odt file from 5.3
Comment 6 Gabor Kelemen (allotropia) 2018-02-12 08:01:17 UTC
Created attachment 139818 [details]
Same file opened and saved in 6.0

Unfortunately we were unable to create this in 6.0 as it froze. But opening and saving the file made with 5.3 works.
Repeatedly exporting this to docx causes the charts to multiply.
Comment 7 Aron Budea 2018-02-14 02:20:06 UTC
Repro with LO 6.0.1.1 & 5.1.0.3 / Windows 7.
Comment 8 Commit Notification 2019-05-27 14:25:07 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/8325764fb67ca192687e1fe1eba329deebe6aa07%5E%21

tdf#115557 DOCX import: don't multiply charts in footnotes

It will be available in 6.3.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.