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

New commits:
commit 082f0b250a04e16d608ce67e08e702874f390b15
Author:     Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de>
AuthorDate: Wed Nov 30 17:12:59 2022 +0100
Commit:     Armin Le Grand <armin.le.gr...@me.com>
CommitDate: Thu Dec 1 10:41:20 2022 +0100

    Handle PolyPolygonGraphicPrimitive2D with used DefinitionRange correctly
    
    If the range which defines the bitmap fill is defined and different from
    the range of the defining geometry (e.g. used for FillStyle
    UseSlideBackground) this cannot be expressed in a SvtGraphicFill data
    package. Thus, just use decomposition here directly. See also
    tdf#149754 in drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
    and the comment there for more info.
    
    Change-Id: I8e1b26fb2bf523e6fd7af1040166f8197747e7ea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143503
    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 e771d2466b1d..393fbfee9cfc 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1789,6 +1789,16 @@ void 
VclMetafileProcessor2D::processPolyPolygonGraphicPrimitive2D(
     // need to handle PolyPolygonGraphicPrimitive2D here to support 
XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END
     basegfx::B2DPolyPolygon 
aLocalPolyPolygon(rBitmapCandidate.getB2DPolyPolygon());
 
+    if (!rBitmapCandidate.getDefinitionRange().isEmpty()
+        && aLocalPolyPolygon.getB2DRange() != 
rBitmapCandidate.getDefinitionRange())
+    {
+        // The range which defines the bitmap fill is defined and different 
from the
+        // range of the defining geometry (e.g. used for FillStyle 
UseSlideBackground).
+        // This cannot be done calling vcl, thus use decomposition here 
directly
+        process(rBitmapCandidate);
+        return;
+    }
+
     fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon);
 
     std::unique_ptr<SvtGraphicFill> pSvtGraphicFill;

Reply via email to