summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2010-11-27 20:32:08 -0800
committerJoseph Powers <jpowers27@cox.net>2010-11-27 20:32:08 -0800
commit1ffd381b663939a093ef1d8c47c6b1cc2df8ecea (patch)
tree172864f542870de4f35bdcfba0b4ad59d430a529 /svx
parentcfc7050d534a4a0072eea29de2cb1076542a3667 (diff)
cppcheck: Variable scope reduction
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xoutdev/_xpoly.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 0fb2aba264..c10590fd1c 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -1385,9 +1385,8 @@ void XPolygon::Distort(const Rectangle& rRefRect,
pImpXPolygon->CheckPointDelete();
CheckReference();
- long Xr, Wr, X1, X2, X3, X4;
- long Yr, Hr, Y1, Y2, Y3, Y4;
- double fTx, fTy, fUx, fUy;
+ long Xr, Wr;
+ long Yr, Hr;
Xr = rRefRect.Left();
Yr = rRefRect.Top();
@@ -1396,6 +1395,8 @@ void XPolygon::Distort(const Rectangle& rRefRect,
if ( Wr && Hr )
{
+ long X1, X2, X3, X4;
+ long Y1, Y2, Y3, Y4;
DBG_ASSERT(rDistortedRect.pImpXPolygon->nPoints >= 4,
"Distort-Rechteck zu klein");
@@ -1412,6 +1413,7 @@ void XPolygon::Distort(const Rectangle& rRefRect,
for (USHORT i = 0; i < nPntCnt; i++)
{
+ double fTx, fTy, fUx, fUy;
Point& rPnt = pImpXPolygon->pPointAry[i];
fTx = (double)(rPnt.X() - Xr) / Wr;
@@ -1473,7 +1475,7 @@ basegfx::B2DPolygon XPolygon::getB2DPolygon() const
// the long run
DBG_ASSERT(pImpXPolygon != 0, "XPolygon::getB2DPolygon(): XPolygon has no implementation incarnated (!)");
const Polygon aSource(GetPointCount(), pImpXPolygon->pPointAry, pImpXPolygon->pFlagAry);
-
+
return aSource.getB2DPolygon();
}