Bug 99135

Summary: Cropping has no effect on image contents
Product: LibreOffice Reporter: vsza+tdf
Component: WriterAssignee: Miklos Vajna <vmiklos>
Status: RESOLVED FIXED    
Severity: normal CC: h3734236
Priority: medium    
Version: 5.1.0.3 release   
Hardware: All   
OS: All   
Whiteboard: target:5.2.0 target:5.1.4
Crash report or crash signature: Regression By:
Attachments: OOXML document that produces the issue
Screenshot in LibreOffice 5.1.0.3 / Linux / x86_64
Screenshot in Microsoft Word 2013 / Windows 10 / x64

Description vsza+tdf 2016-04-07 08:20:39 UTC
Created attachment 124150 [details]
OOXML document that produces the issue

Images that are cropped in Microsoft Office appear in the correct size but without the contents cropped in LibreOffice, resulting in wrong aspect ratio and otherwise "hidden" parts being visible.

I attached a simple PoC, where the image is cropped to include only the black part (see screenshot from MSO 2013), and while the image has the same size in LO (see screenshot from LO 5.1.0.3), the yellow part is visible as well.
Comment 1 vsza+tdf 2016-04-07 08:21:08 UTC
Created attachment 124151 [details]
Screenshot in LibreOffice 5.1.0.3 / Linux / x86_64
Comment 2 vsza+tdf 2016-04-07 08:21:36 UTC
Created attachment 124152 [details]
Screenshot in Microsoft Word 2013 / Windows 10 / x64
Comment 3 Miklos Vajna 2016-04-08 18:52:45 UTC
Confirmed.
Comment 4 Commit Notification 2016-04-12 07:21:35 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#99135 VML import: handle image crop

It will be available in 5.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.
Comment 5 Miklos Vajna 2016-04-12 07:23:43 UTC
Will backport to libreoffice-5-1 and perhaps to libreoffice-5-0 later.
Comment 6 Commit Notification 2016-05-02 07:42:08 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d447579a6193d8bfe020e86c930a90a627969e1&h=libreoffice-5-1

tdf#99135 VML import: handle image crop

It will be available in 5.1.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.