vcl/headless/CairoCommon.cxx |   35 +++--------------------------------
 1 file changed, 3 insertions(+), 32 deletions(-)

New commits:
commit 71be29d7f54d228502eafd4ab9d4ac00917e9e9d
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Nov 27 15:24:40 2024 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Nov 27 17:38:31 2024 +0100

    PVS: V560 A part of conditional expression is always false:
    
    !bDoDirectCairoStroke.
    
    Since
    commit 9c9f76dd5b6fb115e521ac6568673c7a10879192
    Author: Armin Le Grand <armin.le.gr...@me.com>
    Date:   Sat Feb 8 12:14:09 2020 +0100
    
        tdf#130478 add direct dash paint in cairo
    
    Change-Id: I31cc48d7757048a4ea985a2de2c7c8380114acb1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177423
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 754fd9d1797b..a36837d02923 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -1143,29 +1143,12 @@ bool CairoCommon::drawPolyLine(const 
basegfx::B2DHomMatrix& rObjectToDevice,
     const bool bStrokeUsed(0.0 != fDotDashLength);
     assert(!bStrokeUsed || (bStrokeUsed && pStroke));
 
-    // MM01 decide if to stroke directly
-    static const bool bDoDirectCairoStroke(true);
-
     // MM01 activate to stroke directly
-    if (bDoDirectCairoStroke && bStrokeUsed)
+    if (bStrokeUsed)
     {
         cairo_set_dash(cr, pStroke->data(), pStroke->size(), 0.0);
     }
 
-    if (!bDoDirectCairoStroke && pSystemDependentData_CairoPath)
-    {
-        // MM01 - check on stroke change. Used against not used, or if both 
used,
-        // equal or different?
-        const bool 
bStrokeWasUsed(!pSystemDependentData_CairoPath->getStroke().empty());
-
-        if (bStrokeWasUsed != bStrokeUsed
-            || (bStrokeUsed && *pStroke != 
pSystemDependentData_CairoPath->getStroke()))
-        {
-            // data invalid, forget
-            pSystemDependentData_CairoPath.reset();
-        }
-    }
-
     // check for basegfx::B2DLineJoin::NONE to react accordingly
     const bool bNoJoin(basegfx::B2DLineJoin::NONE == eLineJoin && fLineWidth > 
0.0
                        && !basegfx::fTools::equalZero(fLineWidth));
@@ -1196,20 +1179,8 @@ bool CairoCommon::drawPolyLine(const 
basegfx::B2DHomMatrix& rObjectToDevice,
         // MM01 need to do line dashing as fallback stuff here now
         basegfx::B2DPolyPolygon aPolyPolygonLine;
 
-        if (!bDoDirectCairoStroke && bStrokeUsed)
-        {
-            // apply LineStyle
-            basegfx::utils::applyLineDashing(rPolyLine, // source
-                                             *pStroke, // pattern
-                                             &aPolyPolygonLine, // target for 
lines
-                                             nullptr, // target for gaps
-                                             fDotDashLength); // full length 
if available
-        }
-        else
-        {
-            // no line dashing or direct stroke, just copy
-            aPolyPolygonLine.append(rPolyLine);
-        }
+        // no line dashing or direct stroke, just copy
+        aPolyPolygonLine.append(rPolyLine);
 
         // MM01 checked/verified for Cairo
         for (sal_uInt32 a(0); a < aPolyPolygonLine.count(); a++)

Reply via email to