Bug 106974 - FILESAVE: DOCX: highly cropped images lose most of the crop on round-trip.
Summary: FILESAVE: DOCX: highly cropped images lose most of the crop on round-trip.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:5.4.0 target:5.3.3
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks:
 
Reported: 2017-04-05 12:45 UTC by Xisco Faulí
Modified: 2017-05-18 16:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
document (1.23 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-04-05 12:45 UTC, Xisco Faulí
Details
comparison MSO 2010 and LibreOffice 5.4 (167.52 KB, image/png)
2017-04-05 12:48 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2017-04-05 12:45:58 UTC
Created attachment 132354 [details]
document

Steps to reproduce:
1. Open attached document
2. Save it as DOCX
3. Open the new document

Observed behaviour: all images are shrunk after roundtrip

Reproduced in

Version: 5.4.0.0.alpha0+
Build ID: 6152bf9ee9b2e348dee854921a5a5db1cfc72995
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 1 Xisco Faulí 2017-04-05 12:48:07 UTC
Created attachment 132355 [details]
comparison MSO 2010 and LibreOffice 5.4
Comment 2 Xisco Faulí 2017-04-05 12:50:46 UTC
Regression introduced by:

author	Justin Luth <justin_luth@sil.org>	2016-11-04 18:32:38 (GMT)
committer	Justin Luth <justin_luth@sil.org>	2016-11-07 04:09:41 (GMT)
commit 8eff1decd91cbfb10094c25d4cf1d2b434a4da72 (patch)
tree bcc51a30d8eaa4acbaff628dabff996c2273779f
parent bc6017d66fcf37db1f632a3ce667f4c3bf9d1d02 (diff)
tdf#41542 MSWordExport: accommodate image's borderless padding
Honor the padding value even if the border is not visible.
Previously the padding information was just thrown out, and
the image scaled to fill the entire image size.

The unit test for tdf#77454 needed to be tweaked because surprisingly
it has border padding of 1 - which this patch turns into a negative crop.

bisected with bibisect-linux-64-5.3

Adding Cc: to Justin Luth
Comment 3 Justin L 2017-04-06 10:20:13 UTC
Not really causing images to shrink, but losing large cropping values - showing more of the picture than was intended.  Just a stupid mistake in choosing the wrong variable size.

https://gerrit.libreoffice.org/36200 tdf#106974 docx export: Crop is "long", not sal_Int16
Comment 4 Commit Notification 2017-04-06 19:05:04 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106974 docx export: Crop is "long", not sal_Int16

It will be available in 5.4.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 Commit Notification 2017-04-07 04:37:28 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

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

tdf#106974 docx export: Crop is "long", not sal_Int16

It will be available in 5.3.3.

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.