Bug 31357 - docx import/export: image missing and strange shape
Summary: docx import/export: image missing and strange shape
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.3.0 RC1
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: filter:docx
Depends on:
Reported: 2010-11-03 08:07 UTC by Stefano Fraccaro
Modified: 2015-12-15 11:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:

file saved in Lib0 (79.80 KB, image/jpeg)
2010-11-03 08:07 UTC, Stefano Fraccaro
file opened in word 2000 (79.82 KB, image/jpeg)
2010-11-03 08:08 UTC, Stefano Fraccaro
original word 2000 docx file and final (bad) LibreOffice docx file (669.61 KB, application/x-zip-compressed)
2010-12-09 04:56 UTC, Stefano Fraccaro
File odt as requested by Cedric (odt is OK, docx is wrong) (526.18 KB, application/vnd.oasis.opendocument.text)
2011-02-15 05:12 UTC, Stefano Fraccaro
Bug 31357 - screenshot from Word 2010 (22.73 KB, image/jpeg)
2013-07-24 11:29 UTC, bfoman (inactive)

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Fraccaro 2010-11-03 08:07:35 UTC
Created attachment 40012 [details]
file saved in Lib0

Steps to reproduce:

1. In Word 2000 create a document with 1 line of text and 1 little bmp (or other format) image.
2. save the document as name.docx
3. open the document in Lib0 beta2 (image is missing).
4. add from Lib0 beta2 the same image and save (overwriting the file, see _lib0.jpg)
5. open the file in Word2000 and... you find the text, the first image
(missing in Lib0 beta2) and... a shape??? (see _word2k.jpg )

When you save a docx file with an image from Word, this image is missing in Lib0 beta2. This missing element seems to be replaced by a shape when you resave from Lib0.

Windows XP SP3, LibreOffice beta2, Microsoft Word 2000 SP3
Comment 1 Stefano Fraccaro 2010-11-03 08:08:15 UTC
Created attachment 40013 [details]
file opened in word 2000
Comment 2 Stefano Fraccaro 2010-11-03 08:09:28 UTC
maybe similar to bug #31036
Comment 3 John McAtee 2010-11-03 18:07:20 UTC
The problem is with the way the .docx chart is created.  It is linked to an external data source.  I do not know how Libreoffice handles external links to data but I have no doubt that it is different than MS Office 2007.  When the .docx document is opened, the LibreOffice program can't deal with the external link.

If you notice the .doc version has the chart as a graphic not an interactive chart.  That is why LibreOffice can show the chart.

Even MS Office 2003 can not handle the 2007 external link.  That is why it gets converted from an interact chart to a graphic when it is saved as a .doc.
Comment 4 Stefano Fraccaro 2010-11-04 03:00:12 UTC
I have the problem with local bmp images created with Paint or Gimp... external sources are (maybe) other issues when handling docx files
Comment 5 Stefano Fraccaro 2010-11-04 03:38:29 UTC
Another steps to reproduce:
* in Word 2000 create a document with only one image and save it as .docx
* if you open this .docx file in Lib0 the page is apparently blank

There is only the placeholder of the image if you click on the upper left corner but there is no content (image) inside
Comment 6 Katarina Behrens 2010-12-09 04:25:24 UTC
Reassigning this to Cedric, please pass to Noel or Lubos as you see fit
Comment 7 Stefano Fraccaro 2010-12-09 04:56:19 UTC
Created attachment 40951 [details]
original word 2000 docx file and final (bad) LibreOffice docx file

* opened Word 2000, added 1 local image and saved the file as "word2k.docx"
* opened "word2k.docx" with LibreOffice 3.3 rc1
* added some blank lines (pressed Enter more times)
* added another 1 local image (preserved the first images)
* File -> Save As... -> "Word2k_2images.docx"

Word2k_2images.docx now is wrong both in Word 2000 and LibreOffice 3.3 rc1.
For docx files, see testcase1.zip attachment
Comment 8 Cédric Bosdonnat 2011-02-15 04:58:46 UTC
Could you provide an odt file showing the problem when doing the save as?
Comment 9 Stefano Fraccaro 2011-02-15 05:12:17 UTC
Created attachment 43372 [details]
File odt as requested by Cedric (odt is OK, docx is wrong)
Comment 10 Roman Eisele 2012-05-03 04:35:39 UTC
This is a Writer bug, therefore modified 'Component'.
Comment 11 bfoman (inactive) 2013-07-24 11:29:25 UTC
Created attachment 82929 [details]
Bug 31357 - screenshot from Word 2010

Confirmed with:
Build ID: 2013-06-24 own debug build 
Windows 7 Professional SP1 64 bit

word2k_2images.odt file opened in LibreOffice, then saved as doc and docx:
- doc - 2 pictures
- docx - 1 picture only at the top (cup) and two layered autoshape objects as on attached screenshot
All checked in Word 2010.
Comment 12 Alexandr 2014-08-10 14:20:27 UTC
I try to reproduce the bug with LibreOffice on Debian.
I do not reproduce fileopen issue with worrd2k.docx from attachment 40951 [details] - the picture is visible.
I reproduce filesave bug with word2k_2images.odt. If I save it as docx, and reopen it in LibreOffice, both pictures are visible, but if I open it in MS Word 2007, one image is behind another.
Comment 13 QA Administrators 2014-10-23 17:31:59 UTC
Please read this message in its entirety before responding.

Your bug was confirmed at least 1 year ago and has not had any activity on it for over a year. Your bug is still set to NEW which means that it is open and confirmed. It would be nice to have the bug confirmed on a newer version than the version reported in the original report to know that the bug is still present -- sometimes a bug is inadvertently fixed over time and just never closed.

If you have time please do the following:
1) Test to see if the bug is still present on a currently supported version of LibreOffice (preferably 4.2 or newer).
2) If it is present please leave a comment telling us what version of LibreOffice and your operating system.
3) If it is NOT present please set the bug to RESOLVED-WORKSFORME and leave a short comment telling us your version and Operating System

Please DO NOT
1) Update the version field
2) Reply via email (please reply directly on the bug tracker)
3) Set the bug to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 14 tommy27 2015-08-25 14:08:44 UTC
retested under Win8.1 x64 using LibO and attachment 43372 [details]

the bug seems fixed now. there's no image loss in the .DOCX export.
I can instead reproduce the bug with LibO


feel free to revert if you think I'm wrong.
Comment 15 Alexandr 2015-09-19 10:46:09 UTC
I still can reproduce the issue described in comment 12. I reported it as bug 94353.
Comment 16 Robinson Tryon (qubit) 2015-12-15 11:51:42 UTC
Migrating Whiteboard tags to Keywords: (filter:docx)