Bug 70838 - FILESAVE: doc, docx: wrong size and position exporting rotated shapes
Summary: FILESAVE: doc, docx: wrong size and position exporting rotated shapes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: target:4.2.0 target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-24 11:46 UTC by Jacobo Aragunde Pérez
Modified: 2015-10-30 08:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test case (29.19 KB, application/vnd.oasis.opendocument.text)
2013-10-24 11:46 UTC, Jacobo Aragunde Pérez
Details
Differences side by side (365.06 KB, image/png)
2013-10-24 11:47 UTC, Jacobo Aragunde Pérez
Details
Test case with shapes (8.19 KB, application/vnd.oasis.opendocument.text)
2013-10-25 07:11 UTC, Jacobo Aragunde Pérez
Details
Graphic description of ImplEESdrWriter::ImplFlipBoundingBox (348.49 KB, image/png)
2013-10-25 12:03 UTC, Jacobo Aragunde Pérez
Details
Side by side comparison (test case with shapes) (107.25 KB, image/png)
2014-02-28 13:30 UTC, Jacobo Aragunde Pérez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacobo Aragunde Pérez 2013-10-24 11:46:20 UTC
Created attachment 88076 [details]
Test case

When there's a picture in a document as an embedded Draw object which is rotated in an angle different from 90, 180 or 270 degrees, saving that document as a .doc changes the position and the size of the picture.

Steps:

1. New Draw document.
2. Insert->Picture->from file.
3. Right click on picture->position and size->rotation->set 45 degrees.
4. Copy the rotated picture.
5. New Writer document.
6. Paste rotated picture.
7. Save as .doc.
8. Open the .doc with Word.

Alternatively you can open the attached test case and save as a .doc.
Comment 1 Jacobo Aragunde Pérez 2013-10-24 11:47:59 UTC
Created attachment 88077 [details]
Differences side by side

Differences between the original and the exported document side by side, opened with Writer and Word.
Comment 2 Jacobo Aragunde Pérez 2013-10-24 14:38:50 UTC
I've realized that the same happens with any kind of rotated shape. Modified bug description to reflect that.
Comment 3 Jacobo Aragunde Pérez 2013-10-25 07:11:43 UTC
Created attachment 88102 [details]
Test case with shapes

New test case using only shapes. To reproduce the bug:

1. Open this file.
2. Save as .doc or .docx
3. Open with Word or reload the file to "enjoy" the results.
Comment 4 Jacobo Aragunde Pérez 2013-10-25 12:03:57 UTC
Created attachment 88107 [details]
Graphic description of ImplEESdrWriter::ImplFlipBoundingBox

This picture has helped me to understand how ImplEESdrWriter::ImplFlipBoundingBox works, so I'm attaching it here in the hope it can be useful in the future.
Comment 5 Thomas van der Meulen 2013-10-25 13:07:36 UTC
Thank you for your bug report, I can reproduce this bug running 
Version: 4.1.3.2
Build ID: 70feb7d99726f064edab4605a8ab840c50ec57a
OS: Mac osx 10.9.
Comment 6 Commit Notification 2013-11-14 11:37:13 UTC
Jacobo Aragunde Perez committed a patch related to this issue.
It has been pushed to "master":

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

fdo#70838: Fix size issue when exporting shapes to docx.



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 7 Commit Notification 2013-11-14 11:37:37 UTC
Jacobo Aragunde Perez committed a patch related to this issue.
It has been pushed to "master":

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

fdo#70838: Fix position issue when exporting shapes to docx.



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 8 Commit Notification 2013-11-14 11:38:00 UTC
Jacobo Aragunde Perez committed a patch related to this issue.
It has been pushed to "master":

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

fdo#70838: Add unit test for docx export



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 Jacobo Aragunde Pérez 2013-11-21 17:51:02 UTC
Fixed for .docx, still happens to .doc when opened with Word 2010.

Can it be a problem with how recent Office releases manage .doc files? It's strange that this bug has been unnoticed for so long.
Comment 10 Jacobo Aragunde Pérez 2014-02-28 13:28:54 UTC
Above patches fixed the issue for VML export code, but now we are using DrawingML  to export shapes and the problem has re-appeared in .docx export.
Comment 11 Jacobo Aragunde Pérez 2014-02-28 13:30:45 UTC
Created attachment 94884 [details]
Side by side comparison (test case with shapes)

Side by side comparison for the attached test case with shapes. It was fixed in 4.2 but it reappears in 4.3 (master) as we have replaced the VML export code with DrawingML.
Comment 12 Commit Notification 2014-03-05 10:07:16 UTC
Jacobo Aragunde Perez committed a patch related to this issue.
It has been pushed to "master":

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

fdo#70838: fix size error in rotated shapes in DrawingML



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 2014-03-22 22:59:05 UTC
Jacobo Aragunde Perez committed a patch related to this issue.
It has been pushed to "master":

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

fdo#70838: apply rotation transformations to DML anchor position



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 2014-04-15 09:37:12 UTC
Jacobo Aragunde Perez committed a patch related to this issue.
It has been pushed to "master":

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

fdo#70838: fix rotation transformation in DML exporter



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 Jacobo Aragunde Pérez 2014-04-15 10:38:30 UTC
The patches above fix the problem for docx files written by the DrawingML exporter (4.3).
Comment 16 Jacobo Aragunde Pérez 2014-10-03 08:21:21 UTC
Resetting 'assigned to' since I cannot work on this right now. Binary Word filter (.doc) still pending to fix.
Comment 17 QA Administrators 2015-10-14 19:57:29 UTC
** Please read this message in its entirety before responding **

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 on a currently supported version of LibreOffice (5.0.1 or preferably 5.0.2.2 or later)
   https://www.libreoffice.org/download/

   If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
 
 If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

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)

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: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-10-14
Comment 18 Jacobo Aragunde Pérez 2015-10-30 08:59:45 UTC
Still reproducible when saving to .doc binary format. Use attachment 88102 [details] as test case for simplicity.

Version: 5.1.0.0.alpha1+
Build ID: 086aec27ddfd72dc21fffb0466cb5c815e2b4169