drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 7c132fd14f7955e2bfbb600b78e939b9eae6a870
Author:     Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de>
AuthorDate: Tue Feb 28 11:32:43 2023 +0100
Commit:     Armin Le Grand <armin.le.gr...@me.com>
CommitDate: Wed Mar 1 09:18:07 2023 +0000

    MCGR: support ColorSteps in emf export
    
    Change-Id: I7a784587dd86efee0934fdead26f615ba7f396e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147960
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <armin.le.gr...@me.com>

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index d2f4a4cc08c5..2f9f75369207 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2006,6 +2006,15 @@ void 
VclMetafileProcessor2D::processPolyPolygonGradientPrimitive2D(
         return;
     }
 
+    if (!rGradientCandidate.getFillGradient().getColorSteps().empty())
+    {
+        // MCGR: if we have COlorSteps, do not try to fallbacl to old 
VCL-Gradient,
+        // that will *not* be capable of representing this properly. Use the
+        // correct decomposition instead
+        process(rGradientCandidate);
+        return;
+    }
+
     // #i112245# Metafiles use tools Polygon and are not able to have more 
than 65535 points
     // per polygon. Split polygon until there are less than that
     fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon);

Reply via email to