Bug 34551 - Gradient: Option to "Rotate fill effect with shape" not available
Summary: Gradient: Option to "Rotate fill effect with shape" not available
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: All Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval, topicUI
Depends on:
Blocks: Impress-Gradient Object-Fill Area-Fill-Tab Draw-Images
  Show dependency treegraph
 
Reported: 2011-02-21 17:52 UTC by librebugzilla
Modified: 2023-08-10 00:01 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Gradient test .doc (23.50 KB, application/msword)
2011-02-21 17:52 UTC, librebugzilla
Details
Simple sample document tp demnstrate the requested function (16.33 KB, application/vnd.oasis.opendocument.graphics)
2011-02-22 03:21 UTC, Rainer Bielefeld Retired
Details
Gradient test .docx (33.35 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-02-13 08:30 UTC, Luke
Details
"Rotate with shape" easyhack (65.17 KB, image/png)
2016-07-06 09:25 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description librebugzilla 2011-02-21 17:52:53 UTC
Created attachment 43631 [details]
Gradient test .doc

See attached .doc document.
It is created by making 2 adjacent squares, both with a gradient effect to simulate a 3 color gradient in word (2003).
Both squares have the "Rotate fill effect with shape" option set in context menu->format autoshape->colors and lines->Color->Fill effect->Rotate fill effect with shape.
The squares have then be grouped, copied to the right and rotated as a whole.
In word, this rotates the gradient effect, however, when opening the .doc document in writer, the gradient is not rotated.
Comment 1 Rainer Bielefeld Retired 2011-02-22 01:32:53 UTC
Is such "Rotate fill effect with shape" available in LibO? I doubt, seems to be an enhancement request?

@librebugzilla@mailmetrash.com
You ask for making available a WORD feature in LibO?
You do not see a LibO feature that does not work as expected?
Comment 2 librebugzilla 2011-02-22 03:08:55 UTC
@Rainer Bielefeld

In Writer/Draw I would manually rotate both the gradient (and thus creating a new gradient) and the object with the same degrees to get the same effect.
I guess the option is not exactly the same, so this might classify as a feature/enhancement.
I'm not sure what the policy is on formatting/display mismatches on .doc documents in libreoffice, if those are considered bugs or enhancements.
I always try to use odt where I can, but I can't always do that because of interoperability in the workplace.

Anyway, if this is considered an enhancement, I guess it would be an enhancement in Draw to have an option to rotate a gradient with the rotation of an object.
To exemplify this, in draw, when you make a square with a standard gradient, then use the "effects" tool to rotate this object, the gradient does not rotate with the object.

Always seemed strange to me that it didn't, but the a fore mentioned workaround to create a new rotated gradient worked too.
This does get a bit cumbersome on drawings with lots of gradients though.
Comment 3 Rainer Bielefeld Retired 2011-02-22 03:21:40 UTC
Created attachment 43644 [details]
Simple sample document tp demnstrate the requested function
Comment 4 Björn Michaelsen 2011-12-23 11:45:45 UTC Comment hidden (obsolete)
Comment 5 sasha.libreoffice 2012-01-20 03:23:05 UTC
reproduced in LibO 3.5.0 beta 2 on Fedora 64 bit and Windows XP 32 bit
situation now even worse: rectangles itself are not rotated
Comment 6 Joel Madero 2014-07-13 01:33:33 UTC Comment hidden (obsolete)
Comment 7 Luke 2016-02-13 08:30:21 UTC
Created attachment 122604 [details]
Gradient test .docx

Still no option to rotate the effect with the shape in Version: 5.2.0.0.alpha0+. DOC and DOCX formats not correctly imported.
Comment 8 Heiko Tietze 2016-02-13 09:26:31 UTC
The applied area style should be static and rotated with the object. So I'd understand it as a feature that is not directly associated with the area fill style. Having people in mind that want to keep their sundown with the sunny side up it needs to be optional, which adds complexity to the UI (coming from the area style revamp idea I try to keep the new dialog simple). 

As an effective workaround to the rotation issue the object can be copied and pasted as bitmap. And images rotate all pixels. Sounds like a cleaner solution.
Comment 9 Luke 2016-02-13 21:39:09 UTC
Heiko Tietze,
MS Office interoperability is very important to most LibreOffice users. This is a basic feature that that has been available to Office users since 97 and a feature that we must support just like the Corel and WPS Office do.

It's not a feature that must me implemented now, but when redoing the UI, it's something that you should expect will be added in the future.
Comment 10 Heiko Tietze 2016-06-28 08:00:03 UTC
(In reply to Luke from comment #9)
> MS Office interoperability is very important to most LibreOffice users. This
> is a basic feature that that has been available to Office users since 97 and
> a feature that we must support just like the Corel and WPS Office do.

You are right, and actually it works as expected, more or less. Try with a clear two-color gradient (guess the import filter fails when a multi-stop gradient or transparency is being used). The rotated shape will have an angle.
The less well working part is how it looks. My test (v5.3 on Windows) was from black to white and there is not much white in rotated shapes.

Anyway, the enhancement request was the "Rotate fill effect with shape" option (MS Word calls it "Rotate with shape"), which just copies the rotation value into the angle field. Sounds to me like an EASYHACK. Setting NEEDINFO and DEVEVAL for the codepointers. (CC Rishabh: Please have a look.)

The request is for all fill styles including bitmap, and not excluding pattern and hatching. For hatching the same applies as for gradients since we have an angle there. But pattern and bitmaps wont work out of the box since LibreOffice has no means to freely rotate images. Would be nice, however.
Comment 11 Luke 2016-06-28 19:40:56 UTC
We should limit the scope of this bug to the cases our engine supports as long as the attribute are preserved on round trip. 

Until Bug 73797 is resolved all we can to do for is to preserve the attribute for bitmaps. Some code pointers from Bug 36117:

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

docx: http://cgit.freedesktop.org/libreoffice/core/commit/?id=664197d95becd516c3dac25a50439078ba61e051
Comment 12 jani 2016-07-06 06:20:07 UTC
see comment #11
Comment 13 Heiko Tietze 2016-07-06 09:25:33 UTC
Created attachment 126085 [details]
"Rotate with shape" easyhack

(In reply to jan iversen from comment #12)
> see comment #11

Agreeing on comment 11 it's still an EASYHACK. having "[ ] Rotate with shape" checked, the gradient's value for angle is adjusted to the object rotation. 

Add a checkbox to area dialog, read its state on rotation, and modify the gradient angle continuously if checked.

This easyhack would work on gradient only, but could be applied to hatching as well. Of course it's better to have an option with the rotation input that affects all area styles. But this sounds more difficult to me.

The mockup is just a rough idea, the arrangement is not well done.
Comment 14 jani 2016-09-15 15:20:35 UTC
Checked the code, this is far from an easyhack
Comment 15 xordevoreaux 2021-04-12 14:38:50 UTC
Given that the current implementation in 

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 7a0e0a84a02f505200331c19b28d45e898cd5a12
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

sets an independent value for the rotation of a gradient versus the rotation of the gradient's containing shape, this bug doesn't really apply to gradients any more, the effect is achievable. It's the remaining fill pattern types that don't rotate with the object nor have a way to set the fill's orientation.