Bug 66058

Summary: FILEOPEN: .docx elbow connector routing in diagrams import bug
Product: LibreOffice Reporter: Luke <lukebenes>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: barta, grzegorz.araminowicz, timar74, xiscofauli
Priority: medium Keywords: filter:docx
Version: 4.1.0.4 release   
Hardware: x86 (IA32)   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=65765
https://bugs.freedesktop.org/show_bug.cgi?id=83306
https://bugs.documentfoundation.org/show_bug.cgi?id=112861
Whiteboard: interoperability
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104442    
Attachments: .docx Autoshape Import Error
.doc Autoshape Import Correctly
another .docx example of Import Error with connectors
Word/Writer comparison of attachment 81230
Only the Elbow from attachment 81230
elbow example with endpoints on different x location
Libreoffice 6.0

Description Luke 2013-06-22 21:30:31 UTC
Created attachment 81230 [details]
.docx Autoshape Import Error

This bug was found in a LO 4.1 running in windows7. It appears that
LibreOffice messes up the text positions and locations of the boxes importing MS Office Open XML .docx files with autoshapes. I have attached an example.

Steps to reproduce the bug:
1. Open attached AutoShapedrawing.docx document in Writer
2. Open attached AutoShapedrawing.docx document in Word2007/2010/365
3. Compare the documents.
Comment 1 Luke 2013-06-22 21:34:44 UTC
Created attachment 81231 [details]
.doc Autoshape Import Correctly

The .doc version of this file is imported correctly.
Comment 2 Luke 2013-06-22 21:38:43 UTC
Created attachment 81232 [details]
another .docx example of Import Error with connectors

The text is not displayed when imported here.
Comment 3 retired 2013-06-24 09:56:36 UTC
Tested this. Can confirm the doc file open correctly, docx is mangled and displayed wrong.

Also tried re-saving the doc to docx and then opening that new docx file. But the results are the same: displayed incorrectly.

Thus setting to NEW.
Comment 4 surbhi.tongia 2013-12-12 07:12:55 UTC
The .docx version of this file is imported incorrectly in writer.
After performing roundtrip then noticed that content inside the boxes is not displaying.
On Build:libo-master~2013-12-11_02.11.28_LibreOfficeDev_4.3.0.0.alpha0_Win_x86.
Comment 5 Luke 2014-02-16 06:50:02 UTC
Created attachment 94144 [details]
Word/Writer comparison of attachment 81230 [details]

Writer can now open files with basic autoshapes. The simple example, attachment 81232 [details] is now working correctly in LO 4.2+. Nice work developers!

Autoshapes with nested elbows are still not rendering properly. I hope some could please look into this.
Comment 6 Luke 2014-02-16 07:24:08 UTC
Created attachment 94149 [details]
Only the Elbow from attachment 81230 [details]

The elbow is rendered as a straight line instead the 3 sides.
Comment 7 Luke 2014-02-16 07:38:43 UTC
Created attachment 94150 [details]
elbow example with endpoints on different x location

It appears that when importing, LO, ignores the midpoint location of the elbow and creates a new one line following the shortest path.
Comment 8 Luke 2015-06-14 16:24:50 UTC
Adding Andras whose been improving the DrawingML code
Comment 9 Robinson Tryon (qubit) 2015-12-13 12:18:25 UTC Comment hidden (obsolete)
Comment 10 Xisco Faulí 2017-10-03 14:08:52 UTC
Created attachment 136733 [details]
Libreoffice 6.0

It looks better in

Version: 6.0.0.0.alpha0+
Build ID: 34e8fd7e99489e9f50a512b07c6f3923b358b4d3
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 11 Xisco Faulí 2017-10-03 15:23:47 UTC
Actually, attachment 94150 [details] looks correct in 

Version: 6.0.0.0.alpha0+
Build ID: 34e8fd7e99489e9f50a512b07c6f3923b358b4d3
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

I think we can close this as RESOLVED WORKSFORME

[Improvement found by office-interoperability-tools]
Comment 12 Xisco Faulí 2017-10-03 15:47:01 UTC
Created bug 112861 for the remaining issue!!
Comment 13 Xisco Faulí 2017-10-06 21:59:16 UTC
midpoint location issue fixed by 485945bb6327aa2b6ace2b0c4e98ad159067f944
Comment 14 Luke 2017-10-07 02:47:19 UTC
This bug was fixed by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c8e3fea4996436d1fd608cf5ef0fdc18f5a8fd7f

GSoC: import VML shape adjustments

Thanks Grzegorz!