diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-21 10:43:11 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-22 20:21:55 +0200 |
commit | 1c061348aa573967132349736675f81bcf5e46af (patch) | |
tree | 33fe1a51b1f03499469b5f5339b812efac047845 /vcl | |
parent | ba6cbddd8890b3a5693a187b32c9b92a67511f3d (diff) |
convert Link<> to typed
and drop an unused parameter
Change-Id: I2f3bc15e4168103a6cb2d19807d291d8da24387e
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.cxx | 16 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.hxx | 4 |
3 files changed, 9 insertions, 17 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 9d1ec353b92c..643f46bb4cfe 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2452,12 +2452,12 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, } } -bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly, BmpVectorizeFlags nFlags, const Link<>* pProgress ) +bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly, BmpVectorizeFlags nFlags ) { - return ImplVectorizer::ImplVectorize( *this, rPolyPoly, nFlags, pProgress ); + return ImplVectorizer::ImplVectorize( *this, rPolyPoly, nFlags ); } -bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<>* pProgress ) +bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<long,void>* pProgress ) { return ImplVectorizer::ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress ); } diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 0b3b70dee1a6..7e3c7dd2a791 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -42,8 +42,8 @@ #define VECT_MAP( _def_pIn, _def_pOut, _def_nVal ) _def_pOut[_def_nVal]=(_def_pIn[_def_nVal]=((_def_nVal)*4L)+1L)+5L; #define BACK_MAP( _def_nVal ) ((((_def_nVal)+2)>>2)-1) #define VECT_PROGRESS( _def_pProgress, _def_nVal ) \ - if(_def_pProgress&&_def_pProgress->IsSet()) \ - (_def_pProgress->Call(reinterpret_cast<void*>(_def_nVal))); + if(_def_pProgress && _def_pProgress->IsSet()) \ + (_def_pProgress->Call(_def_nVal)); class ImplVectMap; class ImplChain; @@ -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<>* pProgress ) + sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<long,void>* pProgress ) { bool bRet = false; @@ -735,26 +735,20 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly, - BmpVectorizeFlags nFlags, const Link<>* pProgress ) + BmpVectorizeFlags nFlags ) { std::unique_ptr<Bitmap> xBmp(new Bitmap( rMonoBmp )); BitmapReadAccess* pRAcc; bool bRet = false; - VECT_PROGRESS( pProgress, 10 ); - if( xBmp->GetBitCount() > 1 ) xBmp->Convert( BMP_CONVERSION_1BIT_THRESHOLD ); - VECT_PROGRESS( pProgress, 30 ); - pRAcc = xBmp->AcquireReadAccess(); std::unique_ptr <ImplVectMap> xMap(ImplExpand( pRAcc, COL_BLACK )); Bitmap::ReleaseAccess( pRAcc ); xBmp.reset(); - VECT_PROGRESS( pProgress, 60 ); - if( xMap ) { rPolyPoly.Clear(); @@ -822,8 +816,6 @@ bool ImplVectorize( const Bitmap& rMonoBmp, bRet = true; } - VECT_PROGRESS( pProgress, 100 ); - return bRet; } diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx index 297023dbaf88..235b6f52a5b8 100644 --- a/vcl/source/gdi/impvect.hxx +++ b/vcl/source/gdi/impvect.hxx @@ -27,9 +27,9 @@ namespace ImplVectorizer { bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, - sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<>* pProgress ); + sal_uInt8 cReduce, BmpVectorizeFlags nFlags, const Link<long,void>* pProgress ); bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly, - BmpVectorizeFlags nFlags, const Link<>* pProgress ); + BmpVectorizeFlags nFlags ); }; #endif |