[Libreoffice-commits] .: svx/source

Joseph Powers jpowers at kemper.freedesktop.org
Sat Nov 27 20:32:16 PST 2010


 svx/source/xoutdev/_xpoly.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 1ffd381b663939a093ef1d8c47c6b1cc2df8ecea
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Sat Nov 27 20:32:08 2010 -0800

    cppcheck: Variable scope reduction

diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 0fb2aba..c10590f 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();
 }
 


More information about the Libreoffice-commits mailing list