summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/polypolygoneditor.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2015-01-14 18:03:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-14 20:42:32 +0000
commitc752d8bdf099b4ba2ef2e145e0d9da42ba7e74d7 (patch)
tree8386738dfe2bb6b05e8ee0e3cbc6709499bfd937 /svx/source/svdraw/polypolygoneditor.cxx
parentc0948f29ebd61a232406c30c306d7d8b23a596a6 (diff)
fdo#39440 svx: reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: I8c63a767c62b3a666ad445a0a3095d1bb1224f5e Reviewed-on: https://gerrit.libreoffice.org/13908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/svdraw/polypolygoneditor.cxx')
-rw-r--r--svx/source/svdraw/polypolygoneditor.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/svdraw/polypolygoneditor.cxx b/svx/source/svdraw/polypolygoneditor.cxx
index d01ce7506cf9..594c2ae0f4e0 100644
--- a/svx/source/svdraw/polypolygoneditor.cxx
+++ b/svx/source/svdraw/polypolygoneditor.cxx
@@ -75,11 +75,12 @@ bool PolyPolygonEditor::SetSegmentsKind(SdrPathSegmentKind eKind, const std::set
{
// do change at aNewPolyPolygon. Take a look at edge.
basegfx::B2DPolygon aCandidate(maPolyPolygon.getB2DPolygon(nPolyNum));
- bool bCandidateChanged(false);
const sal_uInt32 nCount(aCandidate.count());
if(nCount && (nPntNum + 1 < nCount || aCandidate.isClosed()))
{
+ bool bCandidateChanged(false);
+
// it's a valid edge, check control point usage
const sal_uInt32 nNextIndex((nPntNum + 1) % nCount);
const bool bContolUsed(aCandidate.areControlPointsUsed()