summaryrefslogtreecommitdiffstats
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-20 10:20:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-20 13:39:08 +0200
commit56775815a39c2ee4a0f711738947d2fb234c4923 (patch)
treee11780c6736e32518950102ceb73103fabaeb576 /basegfx
parentUpdated core (diff)
downloadcore-56775815a39c2ee4a0f711738947d2fb234c4923.tar.gz
core-56775815a39c2ee4a0f711738947d2fb234c4923.zip
loplugin:constantparam
Change-Id: Ia58d8950b3b9e48bbe9f075b9fe1eed62d9abf0d Reviewed-on: https://gerrit.libreoffice.org/53188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx26
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx18
-rw-r--r--basegfx/source/polygon/b2dpolypolygontools.cxx5
3 files changed, 12 insertions, 37 deletions
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index d99b246b8ad6..f34c7bb3a4a2 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -861,7 +861,7 @@ namespace basegfx
}
}
- B2DPolyPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon& rCandidate, bool bSelfIntersections)
+ B2DPolyPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon& rCandidate)
{
const sal_uInt32 nCount(rCandidate.count());
@@ -871,16 +871,8 @@ namespace basegfx
if(nCount == 1)
{
- if(bSelfIntersections)
- {
- // remove self intersections
- aRetval.append(addPointsAtCutsAndTouches(rCandidate.getB2DPolygon(0)));
- }
- else
- {
- // copy source
- aRetval = rCandidate;
- }
+ // remove self intersections
+ aRetval.append(addPointsAtCutsAndTouches(rCandidate.getB2DPolygon(0)));
}
else
{
@@ -890,16 +882,8 @@ namespace basegfx
for(a = 0; a < nCount; a++)
{
- if(bSelfIntersections)
- {
- // use polygons with solved self intersections
- pTempData[a].setPolygon(addPointsAtCutsAndTouches(rCandidate.getB2DPolygon(a)));
- }
- else
- {
- // copy given polygons
- pTempData[a].setPolygon(rCandidate.getB2DPolygon(a));
- }
+ // use polygons with solved self intersections
+ pTempData[a].setPolygon(addPointsAtCutsAndTouches(rCandidate.getB2DPolygon(a)));
}
// now cuts and touches between the polygons
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 8457ff3044b9..db3365eee313 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -3204,8 +3204,7 @@ namespace basegfx
// converters for css::drawing::PointSequence
B2DPolygon UnoPointSequenceToB2DPolygon(
- const css::drawing::PointSequence& rPointSequenceSource,
- bool bCheckClosed)
+ const css::drawing::PointSequence& rPointSequenceSource)
{
B2DPolygon aRetval;
const sal_uInt32 nLength(rPointSequenceSource.getLength());
@@ -3221,11 +3220,8 @@ namespace basegfx
aRetval.append(B2DPoint(pArray->X, pArray->Y));
}
- if(bCheckClosed)
- {
- // check for closed state flag
- utils::checkClosed(aRetval);
- }
+ // check for closed state flag
+ utils::checkClosed(aRetval);
}
return aRetval;
@@ -3281,8 +3277,7 @@ namespace basegfx
B2DPolygon UnoPolygonBezierCoordsToB2DPolygon(
const css::drawing::PointSequence& rPointSequenceSource,
- const css::drawing::FlagSequence& rFlagSequenceSource,
- bool bCheckClosed)
+ const css::drawing::FlagSequence& rFlagSequenceSource)
{
const sal_uInt32 nCount(static_cast<sal_uInt32>(rPointSequenceSource.getLength()));
OSL_ENSURE(nCount == static_cast<sal_uInt32>(rFlagSequenceSource.getLength()),
@@ -3373,10 +3368,7 @@ namespace basegfx
// #i72807# API import uses old line start/end-equal definition for closed,
// so we need to correct this to closed state here
- if(bCheckClosed)
- {
- checkClosed(aRetval);
- }
+ checkClosed(aRetval);
return aRetval;
}
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index e32101ffc02c..a02373616a50 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -599,7 +599,7 @@ namespace basegfx
for(;pPointSequence != pPointSeqEnd; pPointSequence++)
{
- const B2DPolygon aNewPolygon = UnoPointSequenceToB2DPolygon(*pPointSequence, true/*bCheckClosed*/);
+ const B2DPolygon aNewPolygon = UnoPointSequenceToB2DPolygon(*pPointSequence);
aRetval.append(aNewPolygon);
}
@@ -650,8 +650,7 @@ namespace basegfx
{
const B2DPolygon aNewPolygon(UnoPolygonBezierCoordsToB2DPolygon(
*pPointSequence,
- *pFlagSequence,
- true/*bCheckClosed*/));
+ *pFlagSequence));
pPointSequence++;
pFlagSequence++;