summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/impvect.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-06 15:39:01 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-09-07 06:49:12 +0000
commit673b436c3592c5747f3dce4947168d6fa3ba45ea (patch)
treee5711bd1da76e9a554954f7275784fca4429c29f /vcl/source/gdi/impvect.cxx
parent702496391b2b9ef53f83752b34feb3c33d7fb4e9 (diff)
loplugin:constantparam in vcl
Change-Id: I0cae8e5de1170dec4c82df7f1f5377143a079876 Reviewed-on: https://gerrit.libreoffice.org/28686 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/gdi/impvect.cxx')
-rw-r--r--vcl/source/gdi/impvect.cxx24
1 files changed, 9 insertions, 15 deletions
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index b33ef2744ab0..7f0559a43209 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -51,7 +51,7 @@ class ImplChain;
namespace ImplVectorizer
{
ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
- void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, BmpVectorizeFlags nFlags );
+ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce );
bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
bool ImplIsUp( ImplVectMap* pMap, long nY, long nX );
void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly );
@@ -632,7 +632,7 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
namespace ImplVectorizer {
bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<long,void>* pProgress )
+ sal_uInt8 cReduce, const Link<long,void>* pProgress )
{
bool bRet = false;
@@ -688,15 +688,14 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
if( xMap )
{
aPolyPoly.Clear();
- ImplCalculate( xMap.get(), aPolyPoly, cReduce, nFlags );
+ ImplCalculate( xMap.get(), aPolyPoly, cReduce );
xMap.reset();
if( aPolyPoly.Count() )
{
ImplLimitPolyPoly( aPolyPoly );
- if( nFlags & BmpVectorizeFlags::ReduceEdges )
- aPolyPoly.Optimize( PolyOptimizeFlags::EDGES );
+ aPolyPoly.Optimize( PolyOptimizeFlags::EDGES );
if( aPolyPoly.Count() )
{
@@ -734,8 +733,7 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
}
bool ImplVectorize( const Bitmap& rMonoBmp,
- tools::PolyPolygon& rPolyPoly,
- BmpVectorizeFlags nFlags )
+ tools::PolyPolygon& rPolyPoly )
{
std::unique_ptr<Bitmap> xBmp(new Bitmap( rMonoBmp ));
BitmapReadAccess* pRAcc;
@@ -752,12 +750,11 @@ bool ImplVectorize( const Bitmap& rMonoBmp,
if( xMap )
{
rPolyPoly.Clear();
- ImplCalculate( xMap.get(), rPolyPoly, 0, nFlags );
+ ImplCalculate( xMap.get(), rPolyPoly, 0 );
xMap.reset();
ImplLimitPolyPoly( rPolyPoly );
- if( nFlags & BmpVectorizeFlags::ReduceEdges )
- rPolyPoly.Optimize( PolyOptimizeFlags::EDGES );
+ rPolyPoly.Optimize( PolyOptimizeFlags::EDGES );
// #i14895#:setting the correct direction for polygons
// that represent holes and non-holes; non-hole polygons
@@ -938,7 +935,7 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
return pMap;
}
-void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, BmpVectorizeFlags nFlags )
+void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce )
{
const long nWidth = pMap->Width(), nHeight= pMap->Height();
@@ -966,10 +963,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8
aChain.ImplBeginAdd( aStartPt );
ImplGetChain( pMap, aStartPt, aChain );
- if( nFlags & BmpVectorizeFlags::Inner )
- aChain.ImplEndAdd( bInner ? VECT_POLY_INLINE_INNER : VECT_POLY_INLINE_OUTER );
- else
- aChain.ImplEndAdd( bInner ? VECT_POLY_OUTLINE_INNER : VECT_POLY_OUTLINE_OUTER );
+ aChain.ImplEndAdd( bInner ? VECT_POLY_OUTLINE_INNER : VECT_POLY_OUTLINE_OUTER );
const tools::Polygon& rPoly = aChain.ImplGetPoly();