Bug 155827 - MCGR FILESAVE PPTX axial and linear mixed color and transparency gradient is wrong in export
Summary: MCGR FILESAVE PPTX axial and linear mixed color and transparency gradient is ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.6.0.0 beta1+
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: OOXML-Object-Fill
  Show dependency treegraph
 
Reported: 2023-06-14 08:36 UTC by Regina Henschel
Modified: 2023-06-20 21:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot left pptx right fodp (79.82 KB, image/png)
2023-06-14 08:36 UTC, Regina Henschel
Details
How pp open saving as odp or ppts (150.13 KB, image/png)
2023-06-14 14:28 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-06-14 08:36:39 UTC
Created attachment 187903 [details]
Screenshot left pptx right fodp

Open attachment 187901 [details] from bug 155825. It contains a shape and a screenshot of the shape. Save the file to pptx. Open the saved file. You see that the linear transparency gradient is exported as if it was axial.
(In the following the Number is the offset and the characters are the values.)
Imagine an axial color gradient with
   0 A, 1 B
together with a linear transparency gradient
   0 X, 1 Y.
Then the visual appearance is
   0 BX, 0.5 A middle_of_X_and_Y, 1 BY

But in because you apply axial after synchronizing you get 0 BY, 0.5 AX, 1 BY.

The error is in WriteGradientFill in oox/source/export/drawingml.cxx around lines 780 to 820. The conversion from axial to linear has to be done before synchronizeColorStops.
Comment 1 m_a_riosv 2023-06-14 14:21:36 UTC
Reproducible
Version: 7.6.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: be55b15d98c5f059483845a183fcb5ea8023d27c
CPU threads: 16; OS: Windows 10.0 Build 2 621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
and
Microsoft® PowerPoint® para Microsoft 365 MSO (versión 2305 compilación 16.0.16501.20074) de 64 bits
Comment 2 m_a_riosv 2023-06-14 14:28:08 UTC
Created attachment 187910 [details]
How pp open saving as odp or ppts

BTW saving as odp (v 1.3 or v 1.2) and open with pp, is different from pptx.
Comment 3 Commit Notification 2023-06-20 09:30:18 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b08ceed6e82e58089e58d15e5ac694b8517349be

tdf#155827 MCGR: Axial to linear in oox export, apply...

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 4 Commit Notification 2023-06-20 21:13:29 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/211ba7dd49ef52820cfd11dab33d9767497fa3c4

tdf#155827 MCGR: Axial to linear in oox export, apply...

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.