Bug 153762 - FILESAVE DOCX gradient direction and type is wrong
Summary: FILESAVE DOCX gradient direction and type is wrong
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, implementationError
Depends on:
Blocks: OOXML-Object-Fill Object-Fill-Gradient
  Show dependency treegraph
 
Reported: 2023-02-20 14:49 UTC by Regina Henschel
Modified: 2024-02-20 08:22 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
shape with 'rect' gradient (23.68 KB, application/zip)
2023-02-20 14:49 UTC, Regina Henschel
Details
saved as DOCX with LO 7.6 alpha0+ (11.76 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-02-20 15:43 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-02-20 14:49:07 UTC
Created attachment 185494 [details]
shape with 'rect' gradient

Open attached document. It has a shape with gradient fill kind "rect" and center top-right and a screenshot of rendering in Word.

Save the file back to docx without any change and open it in Word. Notice that the left part of the shape is green, but it should be violet.

[The fact, that LO renders the fill different than Word, is another bug. I guess we have already a report for that.]
Comment 1 m_a_riosv 2023-02-20 15:04:36 UTC
Reproducible.
Microsoft® Word para Microsoft 365 MSO (versión 2301 compilación 16.0.16026.20002) de 64 bits
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9788a565b3241d1bd62394b9e29c322361d05f80
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Comment 2 Stéphane Guillou (stragu) 2023-02-20 15:43:58 UTC
Created attachment 185497 [details]
saved as DOCX with LO 7.6 alpha0+

We don't need to open it again in Word to see the change: save as DOCX in LO and reload does it. Resulting file displays similarly in LO and Office 365.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b52117c0be97c45824d2897657084f8ac7e9bf42
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

In the resulting file, the gradient changes to Linear type (instead of Square), and From Color / To Color are inverted.

Was already the case in:

Version: 6.0.0.3
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk2; 
Locale: en-AU (en_AU.UTF-8); Calc: group
Comment 3 Gabor Kelemen (allotropia) 2023-02-20 21:49:49 UTC
Different fill rendering is likely bug 128795
Comment 4 Justin L 2024-02-16 16:17:37 UTC
repro 24.8+
Comment 5 Stéphane Guillou (stragu) 2024-02-20 03:43:03 UTC
Testing with the linux-64-releases bibisect repo:
- up to version 4.2.8.2, gradient fill is replaced with purple solid fill;
- since version libreoffice-4.3.0.0.beta1, issue as described in comment 0.

So I assume this is since Jacobo's work in https://blogs.igalia.com/jaragunde/2014/06/tales-of-libreoffice-interoperability-shape-theme-colors-and-styles/
Comment 6 Stéphane Guillou (stragu) 2024-02-20 08:21:53 UTC
Bibisected with linux-64-43max. A bit of history:

1) At repo's oldest, shape fill is saved as solid purple.

2) Then it starts losing the whole object at [c506f2e2ba98a68692da4aa726d93464926d36e6] which is:

commit 57450afb768c085df0ba2344aa94b5f843060178
author	Miklos Vajna 	Tue Dec 03 11:59:42 2013 +0100
committer	Miklos Vajna 	Tue Dec 03 15:39:04 2013 +0100
DOCX import: declare wps as a supported feature

3) At [1c87c74a7b0dfc63163bbd6f4317956ea75eac86], which is:

commit cfb5b20cdc230320ff9f864d1cfd81aaea221da0
author	Miklos Vajna   Wed Dec 18 11:03:57 2013 +0100
committer	Miklos Vajna   Wed Dec 18 11:09:47 2013 +0100
DocxAttributeOutput::OutputFlyFrame_Impl: enable DML export by default

... gradient has green at top _left_ of shape - but this also true in previous commits when Experimental features are turned on. Not sure when it started, too many skipped commits. Maybe one of Miklos' DML Export commits from 2013.

4) As described in comment 0 (left half is green) since [8d8715d38826228d32a98f4e74348dc09ac4a6c5] which is:

commit 2fcf3a871c94feeca11619ef5c8c0466ce61eb74
author	Jacobo Aragunde Pérez 	Fri Jan 31 14:02:12 2014 +0100
committer	Jacobo Aragunde Pérez 	Wed Feb 05 02:00:03 2014 +0100
ooxml: preserve gradient shape fill