Author: orcmid
Date: Tue Jul 19 22:08:51 2016
New Revision: 1753425

URL: http://svn.apache.org/viewvc?rev=1753425&view=rev
Log:
Clean up inconsistent whitespace (tabs vs spaces)

Modified:
    openoffice/trunk/main/tools/source/generic/poly2.cxx

Modified: openoffice/trunk/main/tools/source/generic/poly2.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/tools/source/generic/poly2.cxx?rev=1753425&r1=1753424&r2=1753425&view=diff
==============================================================================
--- openoffice/trunk/main/tools/source/generic/poly2.cxx (original)
+++ openoffice/trunk/main/tools/source/generic/poly2.cxx Tue Jul 19 22:08:51 
2016
@@ -283,61 +283,61 @@ void PolyPolygon::Optimize( sal_uIntPtr
 
        if(nOptimizeFlags && Count())
        {
-        // #115630# ImplDrawHatch does not work with beziers included in the 
polypolygon, take care of that
-        bool bIsCurve(false);
+               // #115630# ImplDrawHatch does not work with beziers included 
in the polypolygon, take care of that
+               bool bIsCurve(false);
 
-        for(sal_uInt16 a(0); !bIsCurve && a < Count(); a++)
-        {
-            if((*this)[a].HasFlags())
-            {
-                bIsCurve = true;
-            }
-        }
-
-        if(bIsCurve)
-        {
-            OSL_ENSURE(false, "Optimize does *not* support curves, falling 
back to AdaptiveSubdivide()...");
-            PolyPolygon aPolyPoly;
-
-            AdaptiveSubdivide(aPolyPoly);
-            aPolyPoly.Optimize(nOptimizeFlags, pData);
-            *this = aPolyPoly;
-        }
-        else
-        {
-                   double              fArea;
-                   const sal_Bool      bEdges = ( nOptimizeFlags & 
POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
-                   sal_uInt16          nPercent = 0;
-
-                   if( bEdges )
-                   {
-                           const Rectangle aBound( GetBoundRect() );
-
-                           fArea = ( aBound.GetWidth() + aBound.GetHeight() ) 
* 0.5;
-                           nPercent = pData ? pData->GetPercentValue() : 50;
-                           nOptimizeFlags &= ~POLY_OPTIMIZE_EDGES;
-                   }
-
-                   // watch for ref counter
-                   if( mpImplPolyPolygon->mnRefCount > 1 )
-                   {
-                           mpImplPolyPolygon->mnRefCount--;
-                           mpImplPolyPolygon = new ImplPolyPolygon( 
*mpImplPolyPolygon );
-                   }
-
-                   // Optimize polygons
-                   for( sal_uInt16 i = 0, nPolyCount = 
mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
-                   {
-                           if( bEdges )
-                           {
-                                   mpImplPolyPolygon->mpPolyAry[ i 
]->Optimize( POLY_OPTIMIZE_NO_SAME );
-                                   Polygon::ImplReduceEdges( *( 
mpImplPolyPolygon->mpPolyAry[ i ] ), fArea, nPercent );
-                           }
-
-                           if( nOptimizeFlags )
-                                   mpImplPolyPolygon->mpPolyAry[ i 
]->Optimize( nOptimizeFlags, pData );
-                   }
-        }
+               for(sal_uInt16 a(0); !bIsCurve && a < Count(); a++)
+               {
+                       if((*this)[a].HasFlags())
+                       {
+                               bIsCurve = true;
+                       }
+               }
+
+               if(bIsCurve)
+               {
+                       OSL_ENSURE(false, "Optimize does *not* support curves, 
falling back to AdaptiveSubdivide()...");
+                       PolyPolygon aPolyPoly;
+
+                       AdaptiveSubdivide(aPolyPoly);
+                       aPolyPoly.Optimize(nOptimizeFlags, pData);
+                       *this = aPolyPoly;
+               }
+               else
+               {
+                       double          fArea;
+                       const sal_Bool  bEdges = ( nOptimizeFlags & 
POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
+                       sal_uInt16              nPercent = 0;
+
+                       if( bEdges )
+                       {
+                               const Rectangle aBound( GetBoundRect() );
+
+                               fArea = ( aBound.GetWidth() + 
aBound.GetHeight() ) * 0.5;
+                               nPercent = pData ? pData->GetPercentValue() : 
50;
+                               nOptimizeFlags &= ~POLY_OPTIMIZE_EDGES;
+                       }
+
+                       // watch for ref counter
+                       if( mpImplPolyPolygon->mnRefCount > 1 )
+                       {
+                               mpImplPolyPolygon->mnRefCount--;
+                               mpImplPolyPolygon = new ImplPolyPolygon( 
*mpImplPolyPolygon );
+                       }
+
+                       // Optimize polygons
+                       for( sal_uInt16 i = 0, nPolyCount = 
mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
+                       {
+                               if( bEdges )
+                               {
+                                       mpImplPolyPolygon->mpPolyAry[ i 
]->Optimize( POLY_OPTIMIZE_NO_SAME );
+                                       Polygon::ImplReduceEdges( *( 
mpImplPolyPolygon->mpPolyAry[ i ] ), fArea, nPercent );
+                               }
+
+                               if( nOptimizeFlags )
+                                       mpImplPolyPolygon->mpPolyAry[ i 
]->Optimize( nOptimizeFlags, pData );
+                       }
+               }
        }
 }
 
@@ -390,53 +390,53 @@ void PolyPolygon::GetXOR( const PolyPoly
 
 void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& 
rResult, sal_uIntPtr nOperation ) const
 { 
-    // Convert to B2DPolyPolygon, temporarily. It might be
-    // advantageous in the future, to have a PolyPolygon adaptor that
-    // just simulates a B2DPolyPolygon here...
-    basegfx::B2DPolyPolygon aMergePolyPolygonA( getB2DPolyPolygon() );
-    basegfx::B2DPolyPolygon aMergePolyPolygonB( rPolyPoly.getB2DPolyPolygon() 
);
-
-    // normalize the two polypolygons before. Force properly oriented
-    // polygons. 
-    aMergePolyPolygonA = basegfx::tools::prepareForPolygonOperation( 
aMergePolyPolygonA );
-    aMergePolyPolygonB = basegfx::tools::prepareForPolygonOperation( 
aMergePolyPolygonB );
+       // Convert to B2DPolyPolygon, temporarily. It might be
+       // advantageous in the future, to have a PolyPolygon adaptor that
+       // just simulates a B2DPolyPolygon here...
+       basegfx::B2DPolyPolygon aMergePolyPolygonA( getB2DPolyPolygon() );
+       basegfx::B2DPolyPolygon aMergePolyPolygonB( 
rPolyPoly.getB2DPolyPolygon() );
+
+       // normalize the two polypolygons before. Force properly oriented
+       // polygons. 
+       aMergePolyPolygonA = basegfx::tools::prepareForPolygonOperation( 
aMergePolyPolygonA );
+       aMergePolyPolygonB = basegfx::tools::prepareForPolygonOperation( 
aMergePolyPolygonB );
 
        switch( nOperation )
-    {
-        // All code extracted from svx/source/svdraw/svedtv2.cxx
-        // -----------------------------------------------------
-
-        case POLY_CLIP_UNION:
-        {
-            // merge A and B (OR)
-            aMergePolyPolygonA = 
basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aMergePolyPolygonB);
-            break;
-        }
-
-        case POLY_CLIP_DIFF:
-        {
-            // subtract B from A (DIFF)
-            aMergePolyPolygonA = 
basegfx::tools::solvePolygonOperationDiff(aMergePolyPolygonA, 
aMergePolyPolygonB);
-            break;
-        }
-
-        case POLY_CLIP_XOR:
-        {
-            // compute XOR between poly A and B
-            aMergePolyPolygonA = 
basegfx::tools::solvePolygonOperationXor(aMergePolyPolygonA, 
aMergePolyPolygonB);
-            break;
-        }
-
-        default:
-        case POLY_CLIP_INT:
-        {
-            // cut poly 1 against polys 2..n (AND)
-            aMergePolyPolygonA = 
basegfx::tools::solvePolygonOperationAnd(aMergePolyPolygonA, 
aMergePolyPolygonB);
-            break;
-        }
-    }
+       {
+               // All code extracted from svx/source/svdraw/svedtv2.cxx
+               // -----------------------------------------------------
+
+               case POLY_CLIP_UNION:
+               {
+                       // merge A and B (OR)
+                       aMergePolyPolygonA = 
basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aMergePolyPolygonB);
+                       break;
+               }
+
+               case POLY_CLIP_DIFF:
+               {
+                       // subtract B from A (DIFF)
+                       aMergePolyPolygonA = 
basegfx::tools::solvePolygonOperationDiff(aMergePolyPolygonA, 
aMergePolyPolygonB);
+                       break;
+               }
+
+               case POLY_CLIP_XOR:
+               {
+                       // compute XOR between poly A and B
+                       aMergePolyPolygonA = 
basegfx::tools::solvePolygonOperationXor(aMergePolyPolygonA, 
aMergePolyPolygonB);
+                       break;
+               }
+
+               default:
+               case POLY_CLIP_INT:
+               {
+                       // cut poly 1 against polys 2..n (AND)
+                       aMergePolyPolygonA = 
basegfx::tools::solvePolygonOperationAnd(aMergePolyPolygonA, 
aMergePolyPolygonB);
+                       break;
+               }
+       }
 
-    rResult = PolyPolygon( aMergePolyPolygonA );
+       rResult = PolyPolygon( aMergePolyPolygonA );
 }
 
 // -----------------------------------------------------------------------


Reply via email to