Bug 86374 - FILEOPEN: OOXML import in Writer very bad on attached DOCX: graphics and drawing in Word table distorted
Summary: FILEOPEN: OOXML import in Writer very bad on attached DOCX: graphics and draw...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.1.0 target:5.0.1 target:4.4.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2014-11-17 08:09 UTC by Gerry
Modified: 2017-06-02 06:53 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Original MS Word 2010 document with test graphics.docx (29.29 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-11-17 08:09 UTC, Gerry
Details
This is how the original file looks in MS Word 2010.pdf (21.50 KB, application/pdf)
2014-11-17 08:10 UTC, Gerry
Details
This is how the file looks after importing it to Writer.pdf (33.65 KB, application/pdf)
2014-11-17 08:11 UTC, Gerry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerry 2014-11-17 08:09:49 UTC
Created attachment 109588 [details]
Original MS Word 2010 document with test graphics.docx

Importing attached .docx leads to distorted and unusable result in LibreOffice Writer.

The original document contains a table with two columns and two rows. Each of the two cells in the second column contain a graphic and related drawings (see attached PDF how it looks in MS Word 2010). After import in Writer, the original structure is broken and everything is overlapping. See attached PDF how it looks in LibreOffice 4.4.nightly (same in 4.3.x).
Comment 1 Gerry 2014-11-17 08:10:35 UTC
Created attachment 109589 [details]
This is how the original file looks in MS Word 2010.pdf
Comment 2 Gerry 2014-11-17 08:11:13 UTC
Created attachment 109590 [details]
This is how the file looks after importing it to Writer.pdf
Comment 3 Jacques Guilleron 2014-11-18 15:28:52 UTC
Hi Gerry,

I get a good result if I select the table, right click and in contextual menu select Row, Optimal Height. Can you try it?
I used LO 4.4.0.0.alpha1+
Build ID: a8c24b25fd9fb21097a08a22797bf61b59099ea1
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-21_06:33:33
& Windows 7 Home Premium
Regards,

Jacques
Comment 4 Gerry 2014-11-19 11:15:17 UTC
@Jacques: Thanks, I tried it and it fixes the lost formatting on import. Unfortunately not the red lines that I drew into the diagrams.

Hence, I assume that the import from .docx fails to:
* import the row height settings from .docx
* put drawings at the right place in the document
Comment 5 Jacques Guilleron 2014-11-19 13:49:45 UTC
Quite clear, Gerrry,

I verified that red lines position and orientation can be kept if you group them before import. This can be useful before the fix.
I set Status to NEW.

Have a nice day,

Jacques
Comment 6 Matthew Francis 2015-04-11 10:28:09 UTC
The rendering of this looked right until the below commit.
Adding Cc: to vmiklos@collabora.co.uk; Could you possibly take a look at this one? Thanks

commit 0208ead70a9412ccd554fcef3e9308f8ca17037b
Author: Miklos Vajna <vmiklos@suse.cz>
Date:   Fri Feb 22 17:08:39 2013 +0100

    DOCX import: improve btLr table cell support
    
    The problem was that in case the contents didn't fit into a single line,
    multiple lines were created, which is not what btLr wants. Set the size
    type to fixed in this case.
    
    Change-Id: Ibab1313f95dc16dd0366d21a00109a6f38fa3526
Comment 7 Miklos Vajna 2015-07-16 14:21:51 UTC
I'll take care of this.
Comment 8 Commit Notification 2015-07-22 07:26:23 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=233a634a112e6dae07dca5fb1296764cb0001503

tdf#86374 DOCX import: fix btLr text table direction without <w:cantSplit/>

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2015-07-26 19:17:17 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2bb00eb772c419ac2144b8cb55bfee765a82252d&h=libreoffice-5-0

tdf#86374 DOCX import: fix btLr text table direction without <w:cantSplit/>

It will be available in 5.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2015-08-17 12:32:28 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=41086e24ecf5a43646aae0c5d5a66b3e3f483195&h=libreoffice-4-4

tdf#86374 DOCX import: fix btLr text table direction without <w:cantSplit/>

It will be available in 4.4.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Robinson Tryon (qubit) 2015-12-17 08:39:25 UTC Comment hidden (obsolete)
Comment 12 vihsa 2017-06-02 06:53:33 UTC
verified
Version: 5.5.0.0.alpha0+
Build ID: 066665644b398a882e6cded98af5bb060af41d76
TinderBox: Android-ARM@24-Bytemark-Hosting, Branch: Master, Time: 2017-06-01 00:30:43