Bug 145130 - Changing an LO Draw's background gradient color resets its gradient type, angle, and other properties
Summary: Changing an LO Draw's background gradient color resets its gradient type, ang...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:24.2.0 target:7.6.0.0.beta2
Keywords:
Depends on:
Blocks: Sidebar-Properties-Slide Object-Fill-Gradient
  Show dependency treegraph
 
Reported: 2021-10-14 13:17 UTC by xordevoreaux
Modified: 2023-06-28 12:21 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Section for page background compared with area fill of shapes (10.30 KB, image/png)
2023-06-21 17:44 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xordevoreaux 2021-10-14 13:17:36 UTC
Description:
The gradient type, angle, and other properties of a background gradient changes even when all you do is change the color.

Steps to Reproduce:
1. Launch Windows LO Draw
2. Select Page, Page Properties...
3. Click the Background tab
4. Select Gradient
5. Select a type of gradient other than Linear (the default)
6. Change the angle of the gradient to other than 0 degrees (the default)
7. Select any two colors for the gradient
8. Click OK
9. From the Page options on the property side bar, change either gradient color
10. Return to the Background tab of Page Properties... and observe the settings

Actual Results:
Upon updating a page's background gradient color in the Property Side bar, the gradient's properties reset, including type, angle, and border.

Expected Results:
Only the gradient's color should change because that's all we modified.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 17d3cacfb9675268e709cfc95771ad4ce8bde75a
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 1 Regina Henschel 2021-10-14 22:22:52 UTC
The same problem is with fill of shapes. The properties Center and Border, which are not contained in the sidebar, are reset to default, when a color of the gradient is changed in the sidebar.

And additional error: Changing the color of the gradient in the sidebar does not create an undo action, so "undo" does not bring back the original gradient.
Comment 2 xordevoreaux 2022-01-25 00:20:26 UTC
Still a problem in:

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 86a9c860410351125708543c1050bfc0977d3b97
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 3 xordevoreaux 2022-05-17 02:16:30 UTC
Still a problem in

Version: 7.4.0.0.alpha1 (x64) / LibreOffice Community
Build ID: b871abad383583f02eb49c7e49aeae01f6941072
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 4 xordevoreaux 2022-10-07 16:52:50 UTC
Still a problem in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 6d724a494e37412c3fd2e5d0e5e54bda177c4108
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 5 xordevoreaux 2023-01-21 13:17:21 UTC
Still a problem in 

Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 6 xordevoreaux 2023-05-16 01:01:31 UTC
Still a problem in:

Version: 7.6.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: 9366f83c88fc93d40ea0c0035508f24ad5dcb144
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 7 Regina Henschel 2023-06-21 17:44:51 UTC
Created attachment 188046 [details]
Section for page background compared with area fill of shapes

The page background pane in the sidebar misses a field for the kind of gradient and fields for position and rotation of the gradient. Because these do not exist, the pane has no place to store the information. It then simply uses defaults if there is an update needed because the user changes something.

You see the missing parts when you compare the sidebar in case of page background with the case of shapes, see attachment.
Comment 8 Regina Henschel 2023-06-25 12:20:19 UTC
The problem is not solved with multicolor gradient (MCGR).
Comment 9 Regina Henschel 2023-06-27 08:24:05 UTC
But the sidebar has the needed information to keep the existing values. So use them. Adding additional controls in the sidebar pane is a separate issue, which has to go into a new request.
Comment 10 Commit Notification 2023-06-27 12:21:10 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9321f8602ec903e1e311b831da0504826e1e4f90

tdf#145130 Keep existing gradient geometry using sidebar

It will be available in 24.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 11 Regina Henschel 2023-06-27 12:35:58 UTC
Hi Xisco, this is another fix where the UI is involved and I therefore could not include a unit test. I would be nice if you could add a UI test.
Test:
1. Create or open a presentation with a slide with a radial gradient as background (not the master but the slide itself), e.g. "Deep Ocean" gradient from the presets.
2. Open the Properties pane in the sidebar. In the Slide section set any of the color fields to a different color. The fields have not label. I see name "fillattr2" and "fillattr3" in the extended tips.
3. Assure that the gradient type is still "Radial". Without fix the gradient type becomes "Linear".
Comment 12 Commit Notification 2023-06-28 11:10:57 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/2283c4b74eac46ff727145da0a7e593bcc3eae3e

tdf#145130 Keep existing gradient geometry using sidebar

It will be available in 7.6.0.0.beta2.

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 13 Gerald Pfeifer 2023-06-28 12:21:46 UTC
Verified with

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3551d18404cb19cdaa8edb170a549f5c5405d0cb
CPU threads: 8; OS: Linux 6.3; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US

after first ensuring I could reproduce the original issue.

Thank you, Regina!