Bug 154858 - FILEOPEN PPTX Radial gradient in grouped shape is imported as Linear
Summary: FILEOPEN PPTX Radial gradient in grouped shape is imported as Linear
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: medium normal
Assignee: Balázs Varga (allotropia)
URL:
Whiteboard: target:25.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Object-Fill-Gradient
  Show dependency treegraph
 
Reported: 2023-04-17 12:35 UTC by Gabor Kelemen (allotropia)
Modified: 2025-04-13 23:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from PP (34.81 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2023-04-17 12:35 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the file in PP and Impress master (167.42 KB, image/png)
2023-04-17 12:39 UTC, Gabor Kelemen (allotropia)
Details
Gradient center in shape corner (358.98 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2025-04-09 13:22 UTC, Regina Henschel
Details
screenshot result with the patch (138.35 KB, image/png)
2025-04-09 15:04 UTC, Balázs Varga (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-04-17 12:35:04 UTC
Created attachment 186724 [details]
Example file from PP

This is split form bug 123223 and minimized from its example file attachment 148976 [details]

Attached file contains a grouped shape with the upper ellipse shape having a Radial fill with a From Center preset and 3 gradient steps.

When opened in Impress, the fill is Linear with 225 degrees and looks completely different than in PP.

1. Open attached file
-> the upper ellipse has a linear gradient fill instead of radial if LO is run with MCGR_TEST=0 

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 19ecb4a390bc0bc6dad6688cdc2b70a8d05bcde2
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

This changed in 7.0 to the current state, with:

https://git.libreoffice.org/core/+/898e4ae1364e76af8be22183ac64d73b6a6d8d90

author	Balazs Varga <balazs.varga991@gmail.com>	Tue May 05 16:58:23 2020 +0200
committer	László Németh <nemeth@numbertext.org>	Tue May 12 16:50:45 2020 +0200

tdf#128794 Chart: Fix OOXML import/export of Radial gradient

It was Ellipsoid instead of Radial before, so not perfect either.
Comment 1 Gabor Kelemen (allotropia) 2023-04-17 12:39:45 UTC
Created attachment 186726 [details]
Screenshot of the file in PP and Impress master

Note that this became visible with recent MCGR work, before it was a solid green fill, but the sidebar/area dialog has shown the settings.
Comment 2 Roman Kuznetsov 2023-05-06 14:06:45 UTC
confirm in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 69d0be09ad81935f7da4b6f8d036c3562357d068
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded
Comment 3 Regina Henschel 2025-04-09 13:22:43 UTC
Created attachment 200250 [details]
Gradient center in shape corner

The attachment has the four MSO preset orientations with the gradient center in the corner of the shape. Please test your solution with these examples too.

The second slide contains a screenshot image, how it looks in PowerPoint.

MSO presets, that have gradient center in the corner of the shape, enlarge the to be filled area by using the <a:tileRect> element and there is currently nothing similar implemented in LibreOffice. Therefore the type "linear" had been considered to give a better appearance than "ellipsoid" in these cases. Using "ellipsoid" unconditionally as I have seen in your patch might not be the best solution in the current situation.
Comment 4 Regina Henschel 2025-04-09 13:39:10 UTC
Armin had introduced the member mpFillGeometryDefiningShape to class SdrObject. It is currently used for gradient fill of FontWork shapes. Perhaps it can be used in import/export with MSO 'radial' gradient fill with the four corner presets as well?
Comment 5 Balázs Varga (allotropia) 2025-04-09 15:04:54 UTC
Created attachment 200252 [details]
screenshot result with the patch

Hi Regina,

Thanks for the example document. I just have checked with the WIP patch: https://gerrit.libreoffice.org/c/core/+/183836, with it we have the correct gradient style set in the correct position. Unfortunately the gradient size is not look the same because our module cannot increase the size of the gradient by modifying the position/direction of the gradient. (which is not an ooxml import issue or related issue to this regression.)
Comment 6 Commit Notification 2025-04-10 10:44:36 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/65439ab2c4fc87e7cc115710a605e9f35dfb39d8

tdf#154858 - FILEOPEN PPTX: fix Radial gradient in shape imported as

It will be available in 25.8.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 7 Commit Notification 2025-04-13 23:13:26 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4f6666529003185fcf40bf23a8f2bcfd8596724c

tdf#154858 radial gradient import remove obsolete part

It will be available in 25.8.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.