summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-26 10:29:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-27 10:17:25 +0100
commitce6ac77816005b380700118d0b1de0f145503024 (patch)
treef3936299590be68eeef28df37c2d160e34c64178 /tools/source
parent33e80611c46ffb8b324e1d445287f0957546de97 (diff)
remove unused PolyOptimizeFlags enum values
Change-Id: I3a2145277212b7b45c25bea2e33aae3f6f4a7776 Reviewed-on: https://gerrit.libreoffice.org/64066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/generic/poly.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 4217531800b5..6f2d3115dfcf 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1033,11 +1033,10 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
Optimize( PolyOptimizeFlags::NO_SAME );
ImplReduceEdges( *this, fArea, nPercent );
}
- else if( nOptimizeFlags & ( PolyOptimizeFlags::REDUCE | PolyOptimizeFlags::NO_SAME ) )
+ else if( nOptimizeFlags & PolyOptimizeFlags::NO_SAME )
{
tools::Polygon aNewPoly;
const Point& rFirst = mpImplPolygon->mxPointAry[ 0 ];
- const int nReduce = ( nOptimizeFlags & PolyOptimizeFlags::REDUCE ) ? 4 : 0;
while( nSize && ( mpImplPolygon->mxPointAry[ nSize - 1 ] == rFirst ) )
nSize--;
@@ -1051,8 +1050,7 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
for( sal_uInt16 i = 1; i < nSize; i++ )
{
- if( ( mpImplPolygon->mxPointAry[ i ] != mpImplPolygon->mxPointAry[ nLast ] ) &&
- ( !nReduce || ( nReduce < FRound( CalcDistance( nLast, i ) ) ) ) )
+ if( mpImplPolygon->mxPointAry[ i ] != mpImplPolygon->mxPointAry[ nLast ])
{
nLast = i;
aNewPoly[ nNewCount++ ] = mpImplPolygon->mxPointAry[ i ];
@@ -1078,16 +1076,6 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
SetSize( mpImplPolygon->mnPoints + 1 );
mpImplPolygon->mxPointAry[ mpImplPolygon->mnPoints - 1 ] = mpImplPolygon->mxPointAry[ 0 ];
}
- else if( ( nOptimizeFlags & PolyOptimizeFlags::OPEN ) &&
- ( mpImplPolygon->mxPointAry[ 0 ] == mpImplPolygon->mxPointAry[ nSize - 1 ] ) )
- {
- const Point& rFirst = mpImplPolygon->mxPointAry[ 0 ];
-
- while( nSize && ( mpImplPolygon->mxPointAry[ nSize - 1 ] == rFirst ) )
- nSize--;
-
- SetSize( nSize );
- }
}
}
}