Bug 92527 - docx export: File with shape can not be opened in word 2010 (diamond shape)
Summary: docx export: File with shape can not be opened in word 2010 (diamond shape)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.0.0.2 rc
Hardware: Other All
: high major
Assignee: Andras Timar
URL:
Whiteboard: target:5.1.0 target:5.0.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-07-03 15:21 UTC by ralf.krapf
Modified: 2016-10-25 19:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (190.28 KB, image/png)
2015-07-03 15:21 UTC, ralf.krapf
Details
Original odt file (9.32 KB, application/vnd.oasis.opendocument.text)
2015-07-03 15:21 UTC, ralf.krapf
Details
Exported docx file with LO5002 (5.52 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-07-03 15:22 UTC, ralf.krapf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ralf.krapf 2015-07-03 15:21:00 UTC
The export of attached file goes wrong:
The File can not be opened in Winword 2010. 
Winword says:

Wrong Parameter
Position: Component: /word/document.xml, row: 2, column: 0


Cheers
Comment 1 ralf.krapf 2015-07-03 15:21:37 UTC
Created attachment 117030 [details]
Screenshot
Comment 2 ralf.krapf 2015-07-03 15:21:54 UTC
Created attachment 117031 [details]
Original odt file
Comment 3 ralf.krapf 2015-07-03 15:22:13 UTC
Created attachment 117032 [details]
Exported docx file with LO5002
Comment 4 raal 2015-07-03 15:56:51 UTC
I can not reproduce with Version: 5.1.0.0.alpha1+
Build ID: 7790b6a4544cf2d5ba0bcdfae31346cf2f9a0041
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-06-26_23:51:00

and Verze: 5.0.0.2 (x64)
ID sestavení: a26d58f11b99b6aeddf7f7884effea188cc6e512

word2010.

When I open your file in Word, I get error, but not with file created from scratch.
Comment 5 ralf.krapf 2015-07-04 11:01:00 UTC
It appears to depend on the kind of shape. Have you tried it with the standard shape "diamond" as i did?
Comment 6 raal 2015-07-05 05:05:57 UTC
I can reproduce with diamond shape in Version: 5.1.0.0.alpha1+
Build ID: 3c45bfb0cabf206f6217f1de9eb5cfa12b78e46f
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-07-04_01:25:39
and word 2010

regression, LO 4.4.2 works.
Comment 7 raal 2015-10-12 11:03:42 UTC
This seems to have begun at the below commit.
Adding Cc: to andras.timar@collabora.com ; Could you possibly take a look at this
one? Thanks

bibisect-win32-5.1:
b5982fb73c06fa7b67428b6df798686060c3e54a is the first bad commit
commit b5982fb73c06fa7b67428b6df798686060c3e54a
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sat Jul 11 05:06:43 2015 -0700

    source sha:481c185e327cb83ffcb29657d5a354eae2c4a5f3

    source sha:481c185e327cb83ffcb29657d5a354eae2c4a5f3

:040000 040000 c304b853c5de025f8db17531cd837436ff134865 f956ad849eb27a65d04dba464889cb23e2213ae7 M      instdir

author	Andras Timar <andras.timar@collabora.com>	2015-05-26 17:35:08 (GMT)
committer	Andras Timar <andras.timar@collabora.com>	2015-05-27 07:19:04 (GMT)
commit	481c185e327cb83ffcb29657d5a354eae2c4a5f3 (patch)
tdf#90338 tdf#84254 DrawingML export fix
Comment 8 Andras Timar 2015-10-26 10:30:47 UTC
b5982fb73c06fa7b67428b6df798686060c3e54a is a red herring. The problem is elsewhere. Try to create a diamond shape in LibreOffice 4.4. Save it as ODT, open it in LibreOffice 5.0 and save it as DOCX. You'll see that export works, Word can open the file, and the diamond is there.

I've seen this problem before, see https://bugs.documentfoundation.org/show_bug.cgi?id=92000#c5

I'd like to ask the QA team to bisect this issue properly. The problem is that the newly created rectangle/diamond shapes do not have Segments in their Path property. This is a bug.

How to test:
Install XrayTool 6.0 and enable it. Write a small macro:

Sub Main
GlobalScope.BasicLibraries.LoadLibrary("XrayTool")
xray ThisComponent.DrawPage(0).CustomShapeGeometry
End Sub

Open a new Writer document and draw
Comment 9 Andras Timar 2015-10-26 10:33:54 UTC
... sent too early, sorry.

Open a new Writer document and draw a diamond. Run the macro. In Xray window, double click on Path, then double click on Value. 

In good case you will see "Segments" in Path. In bad case you will not see "Segments" in Path.
Comment 10 raal 2015-10-26 12:16:11 UTC
bibisectRequest -  see comment 8
Comment 11 Andras Timar 2015-10-26 12:29:52 UTC
Hmm, I found that "Segments" is there always, if you save the document as ODT and reload. I wonder, if it is a bug. If not, we need to handle this special case in DrawingML exporter. I.e. 1st coordinate is MoveTo, the others are LineTo.
Comment 12 Commit Notification 2015-11-19 22:46:13 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=11b7a2c89b8e155bf1da79107878f066847b46eb

tdf#92527 construct default Segments sequence, when there is none

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 13 Commit Notification 2015-11-21 08:02:55 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

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

tdf#92527 unit test

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 14 Commit Notification 2015-11-23 11:34:52 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

tdf#92527 construct default Segments sequence, when there is none

It will be available in 5.0.4.

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 15 Robinson Tryon (qubit) 2015-12-17 09:17:41 UTC Comment hidden (obsolete)