Bug 94238 - FILEOPEN: OOXML - Radial fill not imported correctly
Summary: FILEOPEN: OOXML - Radial fill not imported correctly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords: filter:ooxml
Depends on: 48392
Blocks: OOXML-Object-Fill
  Show dependency treegraph
 
Reported: 2015-09-15 09:46 UTC by Yousuf Philips (jay) (retired)
Modified: 2023-04-17 09:57 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (23.65 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-09-15 09:46 UTC, Yousuf Philips (jay) (retired)
Details
Radial becomes Ellipsoid in pptx too (191.19 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2017-01-23 14:15 UTC, Regina Henschel
Details
Gradient in MS Office compared to LibreOffice (91.61 KB, application/vnd.sun.xml.impress)
2017-01-23 22:50 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-09-15 09:46:51 UTC
Created attachment 118734 [details]
sample

Steps:
1) Open attached document
2) Notice that all the rectangle shapes have ellipsoid gradients
3) Notice that the rectangle that is under 'Radial TL' has a center X and center Y value of 30%

All of these rectangles should have a radial gradient and 4 of the rectangles should have the center X and center Y set to the corners of the rectangles.

Version: 5.1.0.0.alpha1+
Build ID: eb2e1ab4651350bffc53f618961a910bd3bbcfd9
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-09-02_23:57:52
Locale: en-US (en_US.UTF-8)
Comment 1 Buovjaga 2015-09-19 16:30:31 UTC
Yeah.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+ (x64)
Build ID: 9ce08dcc2e32c5554ddf71b79173f8854e0568ad
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-09-17_21:43:51
Locale: en-US (fi_FI)
Comment 2 QA Administrators 2016-11-08 10:26:12 UTC Comment hidden (obsolete)
Comment 3 Regina Henschel 2017-01-23 14:15:55 UTC
Created attachment 130629 [details]
Radial becomes Ellipsoid in pptx too

The error is still present.

I see the same problem in import pptx. The attached file has rectangles in the left part. The right part has a screenshot of how it looks in PowerPoint.

I have used Version: 5.4.0.0.alpha0+
Build ID: 99eed82939999d9a9689788a4134dd05d5c20c5a
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-14_23:37:40
Locale: de-DE (de_DE); Calc: group
Comment 4 Regina Henschel 2017-01-23 22:50:28 UTC
Created attachment 130641 [details]
Gradient in MS Office compared to LibreOffice

The fix to get a radial gradient is easy:

In file /core/oox/source/drawingml/fillproperties.cxx line #371
exchange
awt::GradientStyle_ELLIPTICAL
with
awt::GradientStyle_RADIAL
That looks good in case the center is at 50%|50%.

But it does not solve the whole problem. MS Office has a different way to go from start to end color. The end of the gradient is flatter, so that the whole area gets a gradient, whereas LibreOffice has a hard end at periphery of the circle and fills the rest with solid color, and the radius of the circle is smaller than in MS Office. Therefore, if the center is in the corner MS Office and LibreOffice look different.

This problem cannot be solved with our current radial gradient without breaking existing drawings.
Comment 5 QA Administrators 2018-01-24 03:24:30 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2018-01-24 12:52:51 UTC
The error still exists in Version: 6.1.0.0.alpha0+ (x64)
Build ID: 75f5d70d5d9f58a76e42d151f187c50bad50378c
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-01-23_07:38:07
Locale: de-DE (de_DE); Calc: CL

I think, that for a real good solution the ODF elements <svg:linearGradient> (16.40.2) and <svg:radialGradient> (16.40.3) need to be implemented.
Comment 7 Commit Notification 2019-01-30 22:36:55 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/fa6d726a9369fd49ff2b6c00da682641a025ba50%5E%21

Related: tdf#94238 PPTX import: handle subset of radial gradient fill

It will be available in 6.3.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 8 Commit Notification 2019-02-04 17:43:56 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/82365563fb2fd55d90d444a104fa475d4ffc4cf1%5E%21

Related: tdf#94238 PPTX export: handle border and center of radial gradient

It will be available in 6.3.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 9 Luke 2019-02-05 00:15:18 UTC
I think radial should be used in all 5 positions, not just center. The shape of the ellipsoid is all wrong, and it introduces a hard line that breaks the radial symmetry.
Comment 10 QA Administrators 2021-02-05 04:12:13 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2023-02-06 03:19:26 UTC Comment hidden (obsolete)
Comment 12 Regina Henschel 2023-02-06 13:08:02 UTC
The problem still exists in Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f1830bff71847a9c17715cff52383956719847fe
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded

An ODF conform solution is only possible if the <svg:radialGradient> element is implemented. That is bug 48392.