Bug 82021 - OOXML Graphics components mangled on filter import of DOCX
Summary: OOXML Graphics components mangled on filter import of DOCX
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: high major
Assignee: Not Assigned
Whiteboard: BSA
Keywords: filter:docx
Depends on:
Blocks: DOCX
  Show dependency treegraph
Reported: 2014-08-01 20:11 UTC by Dave Nadler
Modified: 2019-11-04 03:29 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:

DOCX file to reproduce bug (17.97 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-08-01 20:11 UTC, Dave Nadler
picture of how it SHOULD look (71.82 KB, image/png)
2014-08-01 20:14 UTC, Dave Nadler
How looks in (150.23 KB, image/png)
2014-08-03 21:18 UTC, Firas Hanife
another example of distorted import (7.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-06-22 11:50 UTC, Winfried Donkers (retired)
Draw document used for attachment #116727 (11.87 KB, application/vnd.oasis.opendocument.graphics)
2015-06-22 11:51 UTC, Winfried Donkers (retired)
Image showing broken load in LibreOffice 5.1 (43.88 KB, image/png)
2017-01-11 16:30 UTC, Dave Nadler
LO61vsMSO16 (171.21 KB, image/png)
2018-08-02 08:07 UTC, Ahmad Harthi

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Nadler 2014-08-01 20:11:11 UTC
Created attachment 103830 [details]
DOCX file to reproduce bug

Open the document and look at the diagram.
The way it is SUPPOSED to look is in the attached PNG.
Position, orientation, highlights all mangled.
Operating System: All
Version: release
Comment 1 Dave Nadler 2014-08-01 20:14:59 UTC
Created attachment 103831 [details]
picture of how it SHOULD look
Comment 2 Dave Nadler 2014-08-01 20:21:05 UTC
PS: Document was edited and saved with Office 2007 version of Microsoft Word.
Comment 3 Algot Runeman 2014-08-02 23:20:17 UTC
Test System:
Kubuntu 14.04 (KDE 4.13.2)

Test file (apparently a single page) does not open properly into Writer. Only the document heading and the footer shows on page 1. Many of the graphic elements import to page 2 as a single selectable graphic anchored "as character" and are rotated to the right, extending beyond the visible page size. Others of the graphic elements appear on page 3 along with the notes, but don't seem to be selectable.

Thanks, Dave, for reporting this issue. I'm not certain that it is "highest" importance, but do believe LibreOffice should be able to import such a document.

Status set to NeedInfo.

Can you please describe how the graphics were organized in the original file?
Were the individual images anchored one by one, or "to page", "to paragraph", ...?

This sort of complex graphic might be better done using the Draw/Drawing component of LibreOffice, but I was unable to import the file from docx to that tool.
Comment 4 Dave Nadler 2014-08-03 19:05:04 UTC
Yikes! Your diagnostics cannot tell you how the items were saved?
Anyway, in Microsoft Word 2007 the graphics area is referred to
as a "drawing canvas"; all elements within (boxes/lines/callouts/etc)
are fixed distance from top left corner of drawing canvas.

Regarding priority, this means I will likely have to stop using
Libre Office, as I can't continue with equations munged by the
spreadsheet, presentations that don't work, and problems like
this one. I wish you folks all the best, but in my world I have
to be compatible with MS Office documents (some call it "The
Real World"). And I'll have to stop recommending Libre Office
to all our customers - they all have the same compatibility
requirement and its really expensive to waste time on this
when we need to be getting our work done.

Most times I have had a problem, I've spent an hour or two
trying to narrow it down and provide you good examples. But
the stuff doesn't get fixed and/or gets marked low priority,
so obviously I've been wasting my time.

Sorry, and good luck,
Best Regards, Dave
Comment 5 Firas Hanife 2014-08-03 21:18:45 UTC
Created attachment 103943 [details]
How looks in
Comment 6 Firas Hanife 2014-08-03 21:21:00 UTC
Confirming with on openSUSE. There is indeed an issue.

Changing Status to NEW.
Comment 7 Firas Hanife 2014-08-03 21:26:20 UTC
Tested also on and and it is loaded much worse, 3 pages rather than 1.

Thanks Dave for your feedback, it really helps a lot in fixing compatibility issues with Microsoft Office :)
Comment 8 Björn Michaelsen 2014-08-21 12:21:07 UTC Comment hidden (obsolete)
Comment 9 Winfried Donkers (retired) 2015-06-22 11:50:41 UTC
Created attachment 116727 [details]
another example of distorted import

Here's another example:
1. created a graphic scheme with Draw (see other attachment)
2. copy all and paste in new Writer document
3. save Writer Document as docx
4. close document an reopen
5. graphic scheme is painted wrongly

It seems that the coordinates for the rectangles and for the lines are calculated differently, causing a distorted combination.
Comment 10 Winfried Donkers (retired) 2015-06-22 11:51:47 UTC
Created attachment 116728 [details]
Draw document used for attachment #116727 [details]
Comment 11 Winfried Donkers (retired) 2015-06-22 11:53:27 UTC
Tested attachment#116727 [details] with LibreOffice version 4.3.7, 4.4.2, 4.4.3 and, all on Windows7.
Comment 12 V Stuart Foote 2015-12-01 15:15:54 UTC
@Mike, Armin

This looks to have a couple of nice test cases of SdrObject handling with the OOXML import filter. As an fyi... since you're on a roll with bug 95970 and that should have already gotten some of it.
Comment 13 Armin Le Grand 2015-12-02 10:02:18 UTC
All transformations to SdrObjects should be applyable, but may have problems due to old internal stuff. With aw080 and full support for transformations this will get better - already adapted stuff for this in aw080 - hope to get some time for this soon...
Comment 14 Robinson Tryon (qubit) 2015-12-09 18:47:50 UTC Comment hidden (obsolete)
Comment 15 QA Administrators 2017-01-03 19:41:51 UTC Comment hidden (obsolete)
Comment 16 Dave Nadler 2017-01-11 16:28:02 UTC
This is still broken in Libre Office 5.1
So our customers still cannot use LibreOffice...
I have attached a picture of what the failed load
looks like in LibreOffice 5.1
Comment 17 Dave Nadler 2017-01-11 16:30:12 UTC
Created attachment 130318 [details]
Image showing broken load in LibreOffice 5.1
Comment 18 Xisco Faulí 2017-11-07 23:53:32 UTC
attachment 116727 [details] is correctly displayed in

Build ID: 38a8157d9447134913d88c6c373d99a7aa472857
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

but the first document is still incorrect

[Improvement found by office-interoperability-tools]
Comment 19 Ahmad Harthi 2018-08-02 08:07:00 UTC
Created attachment 143921 [details]

Issue still exists, but there seems to be an improvement over previous versions.

Tested on:
Version: (x64)
Build ID: b3972dcf1284967612d5ee04fea9d15bcf0cc106
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: ar-SA (ar_SA); Calc: group threaded

A new screenshot has been attached, previous screenshots where marked obsolete.
Comment 20 Alex 2018-11-03 21:13:26 UTC
I've just reproduced in Version:
Build ID: 1:6.1.2-0ubuntu1
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); Calc: group threaded

Looks identical to Comment 19.
Comment 21 QA Administrators 2019-11-04 03:29:02 UTC
Dear Dave Nadler,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team