Bug 104995 - Cropping flipped images occurs at the wrong side
Summary: Cropping flipped images occurs at the wrong side
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Bayram Çiçek
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: Image-Crop
  Show dependency treegraph
 
Reported: 2016-12-30 04:42 UTC by Paul McAuley
Modified: 2021-09-11 13:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen recording of this flip/crop bug (1.19 MB, video/mp4)
2016-12-30 18:26 UTC, Paul McAuley
Details
Example file (148.25 KB, application/3dr)
2016-12-30 19:20 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul McAuley 2016-12-30 04:42:50 UTC
Description:
If you flip an image and then try to crop it the cropping occurs at the opposite side to the dragged crop handle.

Steps to Reproduce:
1. Insert an image
2. Flip the image vertically
3. Select the crop tool and try to crop from the top crop handle

Actual Results:  
The image is cropped from the bottom

Expected Results:
The image should be cropped from the top


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36
Comment 1 Xisco Faulí 2016-12-30 14:54:17 UTC
Hello Paul,

Thank you for reporting the bug. Unfortunately I can't reproduce in

Version: 5.4.0.0.alpha0+
Build ID: 767ec2f138d824b6b51eef73ac9b7d2b193a1e98
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Could you please try to reproduce it with a master build from http://dev-builds.libreoffice.org/daily/master/ ?
You can install it alongsidethe standard version.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build
Comment 2 Paul McAuley 2016-12-30 18:26:59 UTC
Created attachment 130040 [details]
Screen recording of this flip/crop bug

I have just tested again and can confirm the bug still exists with build:
Version: 5.4.0.0.alpha0+
Build ID: a7c51323b7343f82b5aea6098f5d5e31a8bad0e9
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-12-29_23:48:09
Locale: en-GB (en_GB.UTF-8); Calc: group

Attached is also a screen recording of the bug to make it clear.
Comment 3 Paul McAuley 2016-12-30 18:36:58 UTC
The bug also occurs after rotating, but does not occur in Draw or Impress.
Comment 4 Telesto 2016-12-30 19:20:26 UTC
Created attachment 130041 [details]
Example file
Comment 5 Telesto 2016-12-30 19:27:04 UTC
Confirming with:
Version: 5.4.0.0.alpha0+
Build ID: a7c51323b7343f82b5aea6098f5d5e31a8bad0e9
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-12-29_23:35:20
Locale: nl-NL (nl_NL); Calc: CL

and with
Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: en-US (nl_NL)
Comment 6 Julien Nabet 2017-01-15 00:16:08 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I noticed that when flipping horizontally, crop handle from right or left is also wrong.
After rotating the images the flip button which changed a bit reset to its initial state and I don't reproduce the pb then.
Comment 7 Ekansh Jha 2018-02-27 13:18:13 UTC
Hi! I would like to work on this issue. I have searched some code pointers but I am still confused about them. Could anyone please suggest pointers or the code part to look at.
Comment 8 Telesto 2018-02-27 16:36:57 UTC
(In reply to Ekansh Jha from comment #7)
> Hi! I would like to work on this issue. I have searched some code pointers
> but I am still confused about them. Could anyone please suggest pointers or
> the code part to look at.

No clue.. The IRC Dev channel is probably a better place to ask =). Jan Holesovsky (kendy@collabora.com) might know something based on: https://cgit.freedesktop.org/libreoffice/core/commit/?id=8c4a1663f5d93380268365d35a5581d8065df897
Comment 9 QA Administrators 2019-05-01 02:45:40 UTC Comment hidden (obsolete)
Comment 10 Rene Engelhard 2019-08-13 18:22:32 UTC
This now (also) popped up in http://bugs.debian.org/934678 for 6.3.0
Comment 11 Commit Notification 2021-06-08 20:10:27 UTC
Bayram Çiçek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/59aed1d334de21270628c784920c61f2b8eb1da0

tdf#104995: Fix opposite cropping issue on flipped images in Writer

It will be available in 7.2.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.
Comment 12 BogdanB 2021-06-12 09:26:33 UTC
It's ok now.

Verified in
Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 68b6004fe9df184bcbaf46dd53abfec228219df6
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 13 Telesto 2021-06-12 11:08:03 UTC
Thanks for the fix!
Comment 14 Mehmet gelisin 2021-09-11 13:03:05 UTC Comment hidden (spam)