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.
Created attachment 88077 [details] Differences side by side Differences between the original and the exported document side by side, opened with Writer and Word.
I've realized that the same happens with any kind of rotated shape. Modified bug description to reflect that.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The patches above fix the problem for docx files written by the DrawingML exporter (4.3).
Resetting 'assigned to' since I cannot work on this right now. Binary Word filter (.doc) still pending to fix.
** 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
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
** 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.1.6 or 5.2.3 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 helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20161108
Created attachment 128563 [details] Side-by-side differences (original odt vs. exported doc) Situation has improved, but the bug is still reproducible when saving to binary .doc format. The position is right but the shape size is wrong. Version: 5.1.6.2.0+ Build ID: 5.1.6.2-1.fc24 CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; Locale: en-US (en_US.UTF-8); Calc: group
Export docx seems to be fine. Opens correctly in Word Viewer and LibO Export doc is broken. In Word Viewer positioning and shape size are wrong. When (re-)opening the file with LibreOffice position, rotation and size is off. Tested with: Version: 5.4.0.0.alpha0+ Build ID: 33f5bc54aaa7fe7aa9335726e30f9c349155e04d CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-12-01_23:21:05 Locale: nl-NL (nl_NL); Calc: CL
Not found in: Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Created attachment 141897 [details] Sample ODT with rotated ellipses Here's another sample ODT with 5 ellipses having different rotations: 0, 60, 120, 210 and 315 degrees. When saved as DOC and reloaded, 3 of those appear changed. Observed using LO 6.1 alpha1 & 5.4.0.3 / Windows 7. In LO 5.3.0.3 and before, the ellipses look worse, almost like circles after reloading. The following commit improved the shape of ellipses: https://cgit.freedesktop.org/libreoffice/core/commit/?id=d72e0cadceb0b43928a9b4f18d75c9d5d30afdda author Szymon Kłos <szymon.klos@collabora.com> 2017-06-19 15:32:16 +0200 committer Andras Timar <andras.timar@collabora.com> 2017-06-28 22:38:49 +0200 Watermark: tdf#91687 correct size in the .doc
Created attachment 141898 [details] Side-by-side comparison (ellipses)
Hi all, I'm working on this issue.
See also merge request with fix: https://gerrit.libreoffice.org/#/c/53902/
I've got no feedback for merge request, so I'm not working on this issue anymore.
Created attachment 142720 [details] tdf91687.doc: ww8export2 unit test: Watermark rotated 45 degrees, but shouldn't be swapped
(In reply to Justin L from comment #28) > Watermark rotated 45 degrees, but shouldn't be swapped Of course, it is possible that perhaps the watermark SHOULD be swapped, but that someone has already "hacked" it to work properly. This was recently worked on by Szymon Klos with "tdf#114308 Export Watermark size as is" in commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=09da6dfcfb732dd621670f2b919eb5b5bf09b7ec Now, I didn't see any evidence of "hacking" yet, but I'm also not seeing any evidence that some maDrawObjs should be treated differently than others...
Victor Mireyev committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c14911a80e3b6e66439b1d569e7cd558c6010864 tdf#70838 ww8export: rotate shape vertically = swap width/height It will be available in 6.2.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.
Victor Mireyev committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=544fe73806c04762b95d0ff5bbe86aa40b873282&h=libreoffice-6-1 tdf#70838 ww8export: rotate shape vertically = swap width/height It will be available in 6.1.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.
There were a lot of pieces to this bug, but I think the final piece has been solved. Verification should confirm that it also looks good in Word 2010+.
Not fully solved for .doc export. USING WORD 2013 the positioning of all rotated objects is wrong. The positioning looks OK in LO, but not in MSO. Comment 23's test document is the best example because all four of the rotated objects are mispositioned, not just the ones rotated vertically. And another import problem for .doc *in LO* is that the test document from comment 0 is not rotated at all (but it IS rotated properly when viewed in MSO, so the export code is working for rotation). A few spot checks suggest that has always been true (back to LO 3.5 anyway), so no regression.
Seems like the import part is already wrong, opened bug 118375 on that, and setting that as a dependency for this bug report.
(In reply to Commit Notification from comment #30) > tdf#70838 ww8export: rotate shape vertically = swap width/height This caused a regression, so it was followed up with a qualifier commit: tdf#118421 ww8export: rotate vertically: not Lines or groups Lines and Groups often are exceptions. Normally, the import code swaps vertical rotations also. In the case of lines (from the tests that I observed) lines don't have a rotation value at that point during import, so no correction is made. Grouping always messes things up. https://cgit.freedesktop.org/libreoffice/core/commit/?id=1cedd88d40a26a55ce433f8b742215aea83a5382
proposed patch for correct position on import and export is in https://gerrit.libreoffice.org/#/c/70152/
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/421e6fc3cd2e6fe37afbef341e2d0ad7b8edde37%5E%21 tdf#118375, tdf#70838 correct position of rotated shape in doc It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Verified FIXED in Version: 6.3.0.0.alpha0+ (x64) Build ID: 421e6fc3cd2e6fe37afbef341e2d0ad7b8edde37 The original test case is now correctly exporting. You can verify that works by opening in Word. However, Writer still cannot read image rotation values from .doc. Created Bug 124615 for that import issue.
The export to .DOC of Image inserted to Frame of comment 0 are no longer changing size when opened in Word 2016. But opening the exported .DOC back to LibreOffice loses the rotation, and the image fills the frame that holds the rotated image. OP then changed scope of BZ to include rotated Draw shape objects. Unlike images the Draw shapes are now correctly sized and positioned round trip to Writer, and in Word 2016 Setting this resolved fixed. Remaining issue of OP for image rotation is open as bug 116371. The rotated image is being saved correctly to .DOC and .DOCX, and opens rotated and sized correctly in Word 2016. The .DOCX opens correctly in current master. And, just the .DOC version is not opening correctly in current master.
Original file verified in Version: 6.3.0.0.alpha0+ Build ID: 040a54d89e8ca33171e86647ced8dc58efd85fbe CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded