[Libreoffice-commits] core.git: drawinglayer/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 2 12:53:36 UTC 2018


 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   78 -------------
 1 file changed, 78 deletions(-)

New commits:
commit 89f2d2449a3f7c31ddf14cad8812d44e530f0057
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Aug 2 11:49:43 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Aug 2 14:53:11 2018 +0200

    loplugin:expressionalwayszero
    
    ...after d3e7bbec20c25bc26b3dadc9791f53239473b13d "coverity#1438196 deliberate
    'Constant' variable guards dead code", so finally just remove the code guarded
    by always-false bSupportSvtGraphicFill, which has been dead ever since
    70e3eb2c1762fb1ca097cf671e3c7ce3d0dfd1b7 "Resolves: #i121267# added support for
    taking clipping into account..." introduced bSupportSvtGraphicFill
    
    Change-Id: I0d95e7346c2bfd29de51ae2e4253e8298e143333
    Reviewed-on: https://gerrit.libreoffice.org/58469
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 69cc7b98db11..80fa378d14e0 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1781,51 +1781,12 @@ namespace drawinglayer
             const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPolygonCandidate.getBColor()));
             aLocalPolyPolygon.transform(maCurrentTransformation);
 
-            // XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END support
-            SvtGraphicFill* pSvtGraphicFill = nullptr;
-
-            // #i121267# Not needed, does not give better quality compared with
-            // the MetaActionType::POLYPOLYGON written by the DrawPolyPolygon command
-            // below
-            const bool bSupportSvtGraphicFill(false);
-
-            if(bSupportSvtGraphicFill && !mnSvtGraphicFillCount && aLocalPolyPolygon.count())
-            {
-                // setup simple color fill stuff like in impgrfll
-                pSvtGraphicFill = new SvtGraphicFill(
-                    getFillPolyPolygon(aLocalPolyPolygon),
-                    Color(aPolygonColor),
-                    0.0,
-                    SvtGraphicFill::fillEvenOdd,
-                    SvtGraphicFill::fillSolid,
-                    SvtGraphicFill::Transform(),
-                    false,
-                    SvtGraphicFill::hatchSingle,
-                    Color(),
-                    SvtGraphicFill::GradientType::Linear,
-                    Color(),
-                    Color(),
-                    0,
-                    Graphic());
-            }
-
             // set line and fill color
             mpOutputDevice->SetFillColor(Color(aPolygonColor));
             mpOutputDevice->SetLineColor();
 
-            // call VCL directly; encapsulate with SvtGraphicFill
-            if(bSupportSvtGraphicFill)
-            {
-                    impStartSvtGraphicFill(pSvtGraphicFill);
-            }
-
             mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon);
 
-            if(bSupportSvtGraphicFill)
-            {
-                impEndSvtGraphicFill(pSvtGraphicFill);
-            }
-
             mpOutputDevice->Pop();
         }
 
@@ -1931,53 +1892,14 @@ namespace drawinglayer
                         // now transform
                         aLocalPolyPolygon.transform(maCurrentTransformation);
 
-                        // XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END support
-                        SvtGraphicFill* pSvtGraphicFill = nullptr;
-
-                        // #i121267# Not needed, does not give better quality compared with
-                        // the MetaActionType::POLYPOLYGON written by the DrawPolyPolygon command
-                        // below
-                        const bool bSupportSvtGraphicFill(false);
-
-                        if(bSupportSvtGraphicFill && !mnSvtGraphicFillCount && aLocalPolyPolygon.count())
-                        {
-                            // setup simple color with transparence fill stuff like in impgrfll
-                            pSvtGraphicFill = new SvtGraphicFill(
-                                getFillPolyPolygon(aLocalPolyPolygon),
-                                Color(aPolygonColor),
-                                rUniTransparenceCandidate.getTransparence(),
-                                SvtGraphicFill::fillEvenOdd,
-                                SvtGraphicFill::fillSolid,
-                                SvtGraphicFill::Transform(),
-                                false,
-                                SvtGraphicFill::hatchSingle,
-                                Color(),
-                                SvtGraphicFill::GradientType::Linear,
-                                Color(),
-                                Color(),
-                                0,
-                                Graphic());
-                        }
-
                         // set line and fill color
                         const sal_uInt16 nTransPercentVcl(static_cast<sal_uInt16>(basegfx::fround(rUniTransparenceCandidate.getTransparence() * 100.0)));
                         mpOutputDevice->SetFillColor(Color(aPolygonColor));
                         mpOutputDevice->SetLineColor();
 
-                        // call VCL directly; encapsulate with SvtGraphicFill
-                        if(bSupportSvtGraphicFill)
-                        {
-                            impStartSvtGraphicFill(pSvtGraphicFill);
-                        }
-
                         mpOutputDevice->DrawTransparent(
                             ::tools::PolyPolygon(aLocalPolyPolygon),
                             nTransPercentVcl);
-
-                        if(bSupportSvtGraphicFill)
-                        {
-                            impEndSvtGraphicFill(pSvtGraphicFill);
-                        }
                     }
                     else
                     {


More information about the Libreoffice-commits mailing list