Bug 95970 - IMPORT DOCX: wrong image rotation and flip
Summary: IMPORT DOCX: wrong image rotation and flip
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: interoperability target:5.1.0
Keywords: filter:docx
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2015-11-21 15:06 UTC by Mike Kaganski
Modified: 2016-11-28 20:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX with an image rotated by 13° and flipped horizontally (124.31 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-11-21 15:06 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2015-11-21 15:06:24 UTC
Created attachment 120702 [details]
DOCX with an image rotated by 13° and flipped horizontally

In the attachment, the image is rotated by ~13° and flipped (it has OOXML tag a:xfrm with attributes rot="776457" and flipH="1").

The lion should look left and slightly upwards. On import, it's upside down and looks left. It has rotation 167.06°, and if set to 13°, it turns right.

Tested with: Version: 5.0.3.2 (x64)
Build ID: e5f16313668ac592c1bfb310f4390624e3dbfb75
Locale: ru-RU (ru_RU)

under Win10x64
Comment 1 V Stuart Foote 2015-11-21 16:05:52 UTC
Confirmed on 5.0.3.2 Windows and on a current master.  

Also, an export from MS Word 2007 to ODF completely loses the image flip and rotation.

Interoperability issue all around, but our OOXML ww8 filter needs the attention.
Comment 2 V Stuart Foote 2015-11-21 16:09:46 UTC
Forgot to include that a MS Word 2007 export to MS Word 97-2003 binary format .DOC is also mishandled in LO 5.0.3.2 and current master.
Comment 3 Mike Kaganski 2015-11-22 06:02:52 UTC
Let's focus on DOCX issue.
DOC is another, because for DOCX the rotation/flip is already imported (though incorrectly), while for DOC, it is not.

We need to file a separate bug report for DOC.
Comment 4 Mike Kaganski 2015-11-22 13:28:40 UTC
A patch is submitted to gerrit:
https://gerrit.libreoffice.org/20109
Comment 5 V Stuart Foote 2015-11-22 13:53:19 UTC
(In reply to Mike Kaganski from comment #3)
> Let's focus on DOCX issue.
> DOC is another, because for DOCX the rotation/flip is already imported
> (though incorrectly), while for DOC, it is not.
> 
> We need to file a separate bug report for DOC.

Done, see bug 95986
Comment 6 Commit Notification 2015-11-24 13:48:39 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#95970: Don't loose mirroring in SdrTextObj::TRSetBaseGeometry

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 7 Robinson Tryon (qubit) 2015-12-17 04:38:21 UTC Comment hidden (obsolete)