Bug 98595 - FILEOPEN: OOXML - Rectangular fill not imported correctly
Summary: FILEOPEN: OOXML - Rectangular fill not imported correctly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:ooxml
Depends on:
Blocks: OOXML-Object-Fill 128795
  Show dependency treegraph
 
Reported: 2016-03-11 03:37 UTC by Luke
Modified: 2023-06-02 14:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple DOCX example (16.97 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-03-11 03:37 UTC, Luke
Details
Comparision Word vs Writer (51.84 KB, image/png)
2016-03-11 03:42 UTC, Luke
Details
Pros/Cons of Mapping Rect vs Square (157.67 KB, image/png)
2019-02-01 23:39 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2016-03-11 03:37:56 UTC
Created attachment 123484 [details]
Simple DOCX example

A slideshow I opened was missing a "spotlight" like effect created with the radial fill. I found that we're incorrectly mapping fill gradients in both shapes and backgrounds. The correct mapping should be:

Radial -> Radial
Rectangular -> Quadratic 
Path -> Quadratic (centered)
Comment 1 Luke 2016-03-11 03:42:41 UTC
Created attachment 123485 [details]
Comparision Word vs Writer
Comment 2 Robinson Tryon (qubit) 2016-03-11 10:18:07 UTC
TESTING with Ubuntu 14.04 +
LO 5.2.0.0.alpha0+ (2016-02-24_23:58:47)

(In reply to Luke from comment #0)
> A slideshow I opened was missing a "spotlight" like effect created with the
> radial fill. I found that we're incorrectly mapping fill gradients in both
> shapes and backgrounds.

CONFIRMED -- LibreOffice does not match the document rendering in MS-Office.

Status -> NEW
Comment 3 QA Administrators 2017-05-22 13:20:25 UTC Comment hidden (obsolete)
Comment 4 eisa01 2018-03-18 09:50:27 UTC Comment hidden (obsolete)
Comment 5 Luke 2019-02-01 23:39:24 UTC
Created attachment 148853 [details]
Pros/Cons of Mapping Rect vs Square

Miklos fixed the MSO Radial to LO Radial mapping in Bug 94238. 

The MSO Rectangular to LO’s square / quad  is not so cut and dry

If you map it to LO’s rect
1)	No "X" shape / incorrectly fades to a center line 
2)	The Corners of the X are correct
3)	MSO’s first gradient stop can be emulated with LO’s border

If you map it to LO’s square:
4)	"X" shape / correct fade to a center point 
5)	The corner of the X’s are off center 
6)	MSO’s first gradient stop cannot be emulated with LO’s border (note missing top/bottom border)

If we decide square is preferable, i have a patch at

https://gerrit.libreoffice.org/#/c/67254/
Comment 6 QA Administrators 2021-11-19 05:18:51 UTC Comment hidden (obsolete)
Comment 7 Luke 2021-12-01 01:20:06 UTC
Still repo in 7.2. 

I'm torn on this issue. See Comment 5. The Radial mapping in Bug 94238 maps 1 to 1 in MSO/LO. Here's it's not so cut an dry. I think the correct solution may be to add a new fill type "Rectangular" that maps more closely to MSO's.
Comment 8 Justin L 2023-06-02 14:53:44 UTC
fixed with 7.6 commit bb198176684c3d9377e26c04a29ec66deb811949
Author: Armin Le Grand (allotropia) on Fri Apr 21 15:18:09 2023 +0200
    MCGR: Make MCGR default for oox im/export, cleanup