Bug 87700 - UNO: New command to rotate image 180 degrees
Summary: UNO: New command to rotate image 180 degrees
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0
Keywords: topicUI
Depends on:
Blocks: UNO-Command-New Writer-Images Object-Rotation
  Show dependency treegraph
 
Reported: 2014-12-25 11:36 UTC by Yousuf Philips (jay) (retired)
Modified: 2022-09-01 07:45 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-12-25 11:36:32 UTC
Writer has commands to rotate 90 degrees clock and counterclock wise, but no command to rotate it 180 degrees. This command would be useful for inclusion in the image context menu, so a user doesnt need to open the context menu twice to achieve this. Maybe also useful in the image toolbar.
Comment 1 Cor Nouws 2014-12-28 20:31:33 UTC
Don't we have something as flip vertical / horizontal?
Hmm, that still isn´t the same of course ;)
Comment 2 Yousuf Philips (jay) (retired) 2014-12-28 20:37:27 UTC
Yep we do have flip vertical and flip horizontal, but unless both halves of the image are exactly the same, they wont be the same as rotate 180.
Comment 3 Heiko Tietze 2016-08-23 14:29:12 UTC
Moving this to component Writer (remove ux-advice from the CC list). Also adding EASYHACK, plus NEEDINFO for the code pointers.
Comment 4 jani 2016-08-24 06:56:40 UTC
Missing code pointer and skill<foo>
Comment 5 Xisco Faulí 2016-09-15 15:26:58 UTC
Removing keyword 'needsDevEval' as this bug is an easyHack
Comment 6 Xisco Faulí 2016-09-27 10:36:15 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2016-10-12 09:11:55 UTC
(In reply to Yousuf Philips (jay) from comment #2)
> Yep we do have flip vertical and flip horizontal, but unless both halves of
> the image are exactly the same, they wont be the same as rotate 180.

Applying a flip vertical _and_ flip horizontal _together_, is mathematically the same as a rotation by 180°.

From a technical point the methods are different:
If you use 90°-rotation, then in case the image is linked, it is embedded automatically and the transformation actually changes the image. As the image itself is changed, the cropping handle tool will work as visually expected after a 180° rotation. But the user is not asked, whether he wants to embed the image. 

If you use flipping, then only the flip-information is stored and the image remains unchanged. That is possible with linked images too. But the cropping handle tool is faulty in that case and you have to use cropping from the Crop tab of the image properties to get the correct result.

I personal have no strong opinion about which way to go.
Comment 8 Yousuf Philips (jay) (retired) 2016-10-12 12:02:47 UTC
(In reply to Regina Henschel from comment #7)
> Applying a flip vertical _and_ flip horizontal _together_, is mathematically
> the same as a rotation by 180°.

Rotating by flipping doesnt modify the underlying file, so that would be preferable in my view.
Comment 9 jani 2016-10-25 13:34:10 UTC
Adding a new UNO command, is surely not an easy hack, first of all it has to be documented carefully, with test cases etc.
Comment 10 filippo 2016-10-25 14:36:16 UTC
(In reply to jan iversen from comment #9)
> Adding a new UNO command, is surely not an easy hack, first of all it has to
> be documented carefully, with test cases etc.

I don't understand. My patch is not correct?
Wath sould i do?
sorry but I ' m new in these things.
Comment 11 jani 2016-10-25 14:38:50 UTC
(In reply to filippo from comment #10)
> (In reply to jan iversen from comment #9)
> > Adding a new UNO command, is surely not an easy hack, first of all it has to
> > be documented carefully, with test cases etc.
> 
> I don't understand. My patch is not correct?
> Wath sould i do?
> sorry but I ' m new in these things.

Sorry to confuse you, this was not about your patch, which I think is in review state.

This was about this bug in general, which is a bit more than a normal easyHacks, so hats off that you submitted a patch.

Feel free to contact me anytime.
Comment 12 Commit Notification 2016-12-23 18:30:26 UTC
giacco committed a patch related to this issue.
It has been pushed to "master":

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

tdf#87700 command to rotate 180 degrees

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 13 Commit Notification 2017-01-27 17:10:38 UTC
giacco committed a patch related to this issue.
It has been pushed to "master":

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

tdf#87700 command to rotate 180 degrees

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 14 Heiko Tietze 2017-01-29 14:01:16 UTC
(In reply to Commit Notification from comment #13)
> Affected users are encouraged to test the fix and report feedback.

Works like a charm, well done! Now we miss one the icon for this function. @Andreas, could you please do an icon for 180° rotation (90 left and right is in the context menu, for instance).
Comment 15 Yousuf Philips (jay) (retired) 2017-04-22 17:41:40 UTC
Patch merged to hide the button by default in the toolbar.

https://gerrit.libreoffice.org/#/c/36741/