Bug 73797 - Allow rotation of images in Writer by any angle / degree (currently only 90° steps possible), w/options for non-destructive handling of source image
Summary: Allow rotation of images in Writer by any angle / degree (currently only 90° ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Armin Le Grand (allotropia)
URL:
Whiteboard: target:5.3.0
Keywords:
: 87701 92741 114621 (view as bug list)
Depends on:
Blocks: Writer-Images Calc-Images Calc-Enhancements Writer-Enhancements Object-Rotation
  Show dependency treegraph
 
Reported: 2014-01-19 14:35 UTC by Gerry
Modified: 2022-01-18 14:41 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments
90 degree rotated image docx (60.21 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-12-26 10:14 UTC, Yousuf Philips (jay) (retired)
Details
45 degree rotated image in .doc (24.50 KB, application/msword)
2016-02-18 21:53 UTC, Luke
Details
Test document with Writer-image and with shape-image (110.82 KB, application/vnd.oasis.opendocument.text)
2016-09-12 15:20 UTC, Regina Henschel
Details
Shows rounded rectangle with rotation but text within is not rotated. (14.27 KB, image/png)
2016-10-31 20:19 UTC, Patrick Headley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerry 2014-01-19 14:35:34 UTC
Writer introduced rotation of images in version 4.1 (see bug 34423). However, it allows to rotate images only by 90° steps.

Please add the ability to rotate images in Writer by any angle / degree.
Comment 1 Cor Nouws 2014-01-19 15:57:49 UTC
set to new too, as enhancement
Ciao,
Cor
Comment 2 Tomaz Vajngerl 2014-12-26 00:27:56 UTC
*** Bug 87701 has been marked as a duplicate of this bug. ***
Comment 3 V Stuart Foote 2014-12-26 00:59:08 UTC
To also address issue of bug 87701, guess we should allow selection--retain original image adding a duplicate bitmap (ODF file size increases), or rotate bitmap and replace original image.
Comment 4 Yousuf Philips (jay) (retired) 2014-12-26 10:14:23 UTC
Created attachment 111363 [details]
90 degree rotated image docx

The original image should be retained unmodified and any modification of it should only be of its visual representation, similar to how we have for flip vertically/horizontally.

Due to this current limitation, when you open a docx file which has a rotated image in it, LO loads it up as a drawing object with its area filled with the image.
Comment 5 V Stuart Foote 2015-07-14 22:30:56 UTC
*** Bug 92741 has been marked as a duplicate of this bug. ***
Comment 6 Timur 2015-07-15 09:15:24 UTC
I add Bug 48804 -  "Add option to rotate text 180 degrees in writer" to See also.
Comment 7 V Stuart Foote 2015-07-15 13:30:27 UTC
As this enhancment likely requires rework of Writer's image handling, adding the desired option of non-destructive handling of source image to summary lest it be overlooked.
Comment 8 Luke 2016-02-18 21:53:38 UTC
Created attachment 122780 [details]
45 degree rotated image in .doc

Rotation control are necessary for MS-DOC interoperability. Also it would be useful for scanned images that come out slightly skewed.
Comment 9 christian 2016-03-04 11:26:12 UTC Comment hidden (me-too)
Comment 10 Commit Notification 2016-09-10 17:42:05 UTC
Gulsah Kose committed a patch related to this issue.
It has been pushed to "master":

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

tdf#73797 Enable object rotation (.uno:ToggleObjectRotateMode) for writer

It will be available in 5.3.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 11 Luke 2016-09-12 02:40:16 UTC
Gulsah Kose,
Thanks for looking into this. With .docx files that contain images, we have the option to control rotation under 'Position and Size' dialog/sidebar. In writer we still do not have this option for native documents with inserted images. In Calc and Impress, this feature is found under format->object->'Position and Size'.

Armin,
Could do you have any advice on this feature?
Comment 12 Regina Henschel 2016-09-12 15:20:29 UTC
Created attachment 127281 [details]
Test document with Writer-image and with shape-image

Gulsah Kose, the patch does not work. I have tested it with Version: 5.3.0.0.alpha0+
Build ID: ba269f7294e2416659011cbb498a2c6b5f9d5199
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-09-12_02:36:16
Locale: de-DE (de_DE); Calc: group

Now the icon ".uno:ToggleObjectRotateMode" is enabled for a Writer image ("com.sun.star.text.TextGraphicObject"), but such images are not able to rotate. On the other hand, for a shape-image (which has been copied from Draw) this icon is disabled now. But shape-images can rotate.

So the situation is worse than before, the old feature no longer works and the enabled icon promises a feature, which does not exist.

The upper image in the test document is of kind com.sun.star.text.TextGraphicObject, the lower image is a shape-image.
Comment 13 Commit Notification 2016-09-13 09:19:05 UTC
jan iversen committed a patch related to this issue.
It has been pushed to "master":

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

Revert "tdf#73797 Enable object rotation (.uno:ToggleObjectRotateMode) for writer"

It will be available in 5.3.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 Armin Le Grand (allotropia) 2016-09-18 14:31:00 UTC
AFAIR the problem is that Writer has it's own GraphicFrames which differ in myny as pects from Draw/Impress/Calc GraphicFrames. The Writer ones cannot be tranmsformed aka freely rotated, while the others can.
I discussed several times with Writer guys the last years how to solve that. Due to the massive differences there is no way to just use Draw/Impressw GraphicFrames - all the Border/Distance stuff from WirterFrames would be lost. Thus the only way is to teach these to be rotated. For this to do, I do not know enough about Writer. I would expect many caveats (else it would have been done?)
Comment 15 Luke 2016-09-21 20:25:24 UTC
Based on the developers comments, there seems to be a lot of technical debit and/or lack of expertise with writer image object. 

Miklos,
We import docx images(see  attachment 122780 [details]) as a drawing object instead of an image object. Would it make more sense to extend this drawing object to cover all of the features that the image object now covers? Then we could make insert -> image use the same container as our docx importer.
Comment 16 Luke 2016-09-23 03:18:54 UTC
To clarify, this was a feature request of OpenOffice 1.1 with 24 votes[1] and many duplicates. Multiple OOo and LO developers have been unable to resolve[2], so I thought we might need to approach it from a different angle. 

Miklos, Do you think your DOCX Image object could be extended to be used as the default image container for native Writer files too? 


[1] https://bz.apache.org/ooo/show_bug.cgi?id=12909
[2] Bug 34423
Comment 17 Armin Le Grand (allotropia) 2016-09-23 11:35:19 UTC
Well, technically the problem is mainly that you will have to know the Writer layouting *very well* to do such a change - the math is trivial.
Comment 18 Patrick Headley 2016-10-31 20:19:30 UTC Comment hidden (off-topic)
Comment 19 Patrick Headley 2016-10-31 20:21:19 UTC Comment hidden (off-topic)
Comment 20 Luke 2016-10-31 21:16:21 UTC Comment hidden (off-topic)
Comment 21 Cor Nouws 2016-12-28 21:55:18 UTC Comment hidden (obsolete)
Comment 22 Luke 2017-01-04 08:20:13 UTC Comment hidden (obsolete)
Comment 23 Jean-Baptiste Faure 2017-12-23 17:26:35 UTC
*** Bug 114621 has been marked as a duplicate of this bug. ***
Comment 24 Roeland 2018-01-31 20:25:14 UTC
According to the 6.0 release notes this should be fixes, is this correct?

Also, are there any bug reports corresponding to "a feature to allow rotating with the Object is planned for the future" and "a single action, e.g. a Button, to do this in one step may be implemented to make this more accessible to the user"?
Comment 25 V Stuart Foote 2018-01-31 21:56:14 UTC
(In reply to Roeland from comment #24)
> According to the 6.0 release notes this should be fixes, is this correct?
> 

Armin W. is doing this incrementally, when he's finished I'm sure he'll close it out.

> Also, are there any bug reports corresponding to "a feature to allow
> rotating with the Object is planned for the future" and "a single action,
> e.g. a Button, to do this in one step may be implemented to make this more
> accessible to the user"?

You mean _beyond_ the Sidebar -> Properties deck -> Position & Size content panel for the selected image?  There you'll find a rotation compass widget, and alternatively a droplist with fixed rotation value selections. Also, for the selected image, its Context menu -> Rotate or Flip -> Reset Rotation to revert to un-rotated state.
Comment 26 Armin Le Grand (allotropia) 2018-02-08 13:04:50 UTC
Done with LO6.0
Comment 27 Gerry 2018-02-08 17:13:29 UTC
Dear Armin, thanks a lot for this work. This feature is highly appreciated for everybody working with lots of documents.

Does the fix to this bug also resolve bug 73796 which deals with SVGs when inserted as image in a document?
Comment 28 V Stuart Foote 2018-02-08 18:51:49 UTC
(In reply to Gerry from comment #27)
> Dear Armin, thanks a lot for this work. This feature is highly appreciated
> for everybody working with lots of documents.
> 
> Does the fix to this bug also resolve bug 73796 which deals with SVGs when
> inserted as image in a document?

Seems like it does. An inserted SVG (and duplicate PNG) remain intact in ODF archive's Pictures directory, when rotated on Writer canvas.