summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-27 14:15:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-27 21:17:20 +0200
commit53491f8a66d72176aab332983f9aff47ecd3d654 (patch)
tree628d8539e19bfad27fcc2b7902b08409afef222e /drawinglayer
parente6538f5bdd876911ea30f84a6512c03908e620fd (diff)
loplugin:returnconstant in ucbhelper,drawinglayer
Change-Id: I4e84c570fe0e555a3aeb1f11632715de466d6e0e Reviewed-on: https://gerrit.libreoffice.org/58192 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx12
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.hxx2
2 files changed, 7 insertions, 7 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index e363baf032d3..aae85f6d0e06 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -105,14 +105,14 @@ namespace drawinglayer
mpOutputDevice->SetAntialiasing(m_pImpl->m_nOrigAntiAliasing);
}
- bool VclPixelProcessor2D::tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency)
+ void VclPixelProcessor2D::tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency)
{
basegfx::B2DPolyPolygon aLocalPolyPolygon(rSource.getB2DPolyPolygon());
if(!aLocalPolyPolygon.count())
{
// no geometry, done
- return true;
+ return;
}
const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rSource.getBColor()));
@@ -123,8 +123,6 @@ namespace drawinglayer
mpOutputDevice->DrawTransparent(
aLocalPolyPolygon,
fTransparency);
-
- return true;
}
bool VclPixelProcessor2D::tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency)
@@ -443,8 +441,9 @@ namespace drawinglayer
basegfx::B2DPolyPolygon aLocalPolyPolygon;
static bool bAllowed(true);
- if(bAllowed && tryDrawPolyPolygonColorPrimitive2DDirect(rPolyPolygonColorPrimitive2D, 0.0))
+ if(bAllowed)
{
+ tryDrawPolyPolygonColorPrimitive2DDirect(rPolyPolygonColorPrimitive2D, 0.0);
// okay, done. In this case no gaps should have to be repaired, too
}
else
@@ -555,7 +554,8 @@ namespace drawinglayer
// single transparent tools::PolyPolygon identified, use directly
const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
- bDrawTransparentUsed = tryDrawPolyPolygonColorPrimitive2DDirect(*pPoPoColor, rUniTransparenceCandidate.getTransparence());
+ bDrawTransparentUsed = true;
+ tryDrawPolyPolygonColorPrimitive2DDirect(*pPoPoColor, rUniTransparenceCandidate.getTransparence());
break;
}
case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D:
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index 0190fed7dfe7..216abc70c331 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -58,7 +58,7 @@ namespace drawinglayer
virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
// some helpers to try direct paints (shortcuts)
- bool tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
+ void tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
bool tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency);
bool tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency);