diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-27 15:24:40 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-27 17:38:31 +0100 |
commit | 71be29d7f54d228502eafd4ab9d4ac00917e9e9d (patch) | |
tree | 9caa9b762b388f703956c0d9848b5e809d93fa61 /vcl | |
parent | d29348f2da2e405ac651d009354e8f967a216170 (diff) |
PVS: V560 A part of conditional expression is always false:
!bDoDirectCairoStroke.
Since
commit 9c9f76dd5b6fb115e521ac6568673c7a10879192
Author: Armin Le Grand <Armin.Le.Grand@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 <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/CairoCommon.cxx | 35 |
1 files changed, 3 insertions, 32 deletions
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++) |