Bug 118032 - FILESAVE: gradient not exported to PDF
Summary: FILESAVE: gradient not exported to PDF
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Regressions-EMFPlus-Rework
  Show dependency treegraph
Reported: 2018-06-06 11:36 UTC by Xisco Faulí
Modified: 2019-11-04 17:00 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

How the PDF looks in 6.1 (55.49 KB, application/pdf)
2018-06-06 11:36 UTC, Xisco Faulí

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2018-06-06 11:36:01 UTC
Created attachment 142558 [details]
How the PDF looks in 6.1

Steps to reproduce:
1. Open attachment 111685 [details] from bug 87967
2. Export to .PDF

-> the green gradient is not exported to PDF

Reproduced in

Build ID: 8b96445766efe237eb47608ade6c147673466e2e
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2018-06-06 11:37:19 UTC
Regression introduced by:

author	Armin Le Grand <Armin.Le.Grand@cib.de>	2017-10-30 16:29:09 +0100
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-04-17 02:05:57 +0200
commit 7f9b0f47979dcb7abfed37bb7cd38ab51eac6011 (patch)
tree 639b6289605dc4b108b70d2da56dd214e62a5be1
parent 0f93692fda4226323422cf82ce34ae4bd5e22fab (diff)
tdf#113197 Add MaskPrimitive (clip) to EMF/WMF if needed
Added code to quartz vcl implementation that takes care
when BitmapPalette.count != (depth^^2)-1 - which may
be the case anytime. If then a bitmap value exists that
goes beyond that count, a invalid access was executed

Bisected with: bibisect-linux64-6.1

Adding Cc: to Armin Le Grand
Comment 2 Bartosz 2018-11-02 11:17:12 UTC
It seems that this document has PPT document inside.

The root cause of the issue is this part of code, which breaking clipping target region:

                const basegfx::B2DRange aMtfRange(aMtfTarget.Left(), aMtfTarget.Top(), aMtfTarget.Right(), aMtfTarget.Bottom());

                // tdf#113197 get content range and check if we have an overlap with
                // defined target range (aMtfRange)
                if (!aMtfRange.isEmpty())
                    const basegfx::B2DRange aContentRange(xRetval.getB2DRange(rViewInformation));

                    // also test equal since isInside gives also true for equal
                    if (!aMtfRange.equal(aContentRange) && !aMtfRange.isInside(aContentRange))
                        // contentRange is partly larger than aMtfRange (stuff sticks
                        // outside), clipping is needed
                        const drawinglayer::primitive2d::Primitive2DReference xMask(
                            new drawinglayer::primitive2d::MaskPrimitive2D(

                        xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xMask };
Comment 3 QA Administrators 2019-11-03 03:30:55 UTC Comment hidden (obsolete)
Comment 4 Xisco Faulí 2019-11-04 17:00:35 UTC
This issue was fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=a4c46ceec433edf0c5de03ea8d36857a455cafd2

Kudos to Regina