summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-21 17:06:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-22 06:43:35 +0000
commit41f7878ccbc457ef0431c999d38d9d77265d5dc7 (patch)
treee0b6700f1019b5537ca1629d82fd65cfd1a7f626 /vcl
parent7444355f1d544e015083c2412696e1df6f295e2d (diff)
convert BmpFilter to scoped enum
Change-Id: I22c5b49f108d4ce103dea5098a2a0dc9d6bc854c Reviewed-on: https://gerrit.libreoffice.org/32292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/bitmap4.cxx32
-rw-r--r--vcl/workben/outdevgrind.cxx2
-rw-r--r--vcl/workben/vcldemo.cxx2
3 files changed, 18 insertions, 18 deletions
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index 63940bd73f7f..e516541148af 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -44,7 +44,7 @@ bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam )
switch( eFilter )
{
- case BMP_FILTER_SMOOTH:
+ case BmpFilter::Smooth:
{
// Blur for positive values of mnRadius
if (pFilterParam->mnRadius > 0.0)
@@ -63,42 +63,42 @@ bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam )
}
break;
- case BMP_FILTER_SHARPEN:
+ case BmpFilter::Sharpen:
{
const long pSharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 };
bRet = ImplConvolute3( &pSharpenMatrix[ 0 ] );
}
break;
- case BMP_FILTER_REMOVENOISE:
+ case BmpFilter::RemoveNoise:
bRet = ImplMedianFilter();
break;
- case BMP_FILTER_SOBEL_GREY:
+ case BmpFilter::SobelGrey:
bRet = ImplSobelGrey();
break;
- case BMP_FILTER_SOLARIZE:
+ case BmpFilter::Solarize:
bRet = ImplSolarize( pFilterParam );
break;
- case BMP_FILTER_SEPIA:
+ case BmpFilter::Sepia:
bRet = ImplSepia( pFilterParam );
break;
- case BMP_FILTER_MOSAIC:
+ case BmpFilter::Mosaic:
bRet = ImplMosaic( pFilterParam );
break;
- case BMP_FILTER_EMBOSS_GREY:
+ case BmpFilter::EmbossGrey:
bRet = ImplEmbossGrey( pFilterParam );
break;
- case BMP_FILTER_POPART:
+ case BmpFilter::PopArt:
bRet = ImplPopArt();
break;
- case BMP_FILTER_DUOTONE:
+ case BmpFilter::DuoTone:
bRet = ImplDuotoneFilter( pFilterParam->mnProgressStart, pFilterParam->mnProgressEnd );
break;
@@ -576,9 +576,9 @@ bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam )
long nGrey11, nGrey12, nGrey13;
long nGrey21, nGrey22, nGrey23;
long nGrey31, nGrey32, nGrey33;
- double fAzim = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
+ double fAzim = ( ( pFilterParam && pFilterParam->meFilter == BmpFilter::EmbossGrey ) ?
( pFilterParam->maEmbossAngles.mnAzimuthAngle100 * 0.01 ) : 0.0 ) * F_PI180;
- double fElev = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
+ double fElev = ( ( pFilterParam && pFilterParam->meFilter == BmpFilter::EmbossGrey ) ?
( pFilterParam->maEmbossAngles.mnElevationAngle100 * 0.01 ) : 90.0 ) * F_PI180;
long* pHMap = new long[ nWidth + 2 ];
long* pVMap = new long[ nHeight + 2 ];
@@ -672,7 +672,7 @@ bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam )
if( pWriteAcc )
{
- const sal_uInt8 cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
+ const sal_uInt8 cThreshold = ( pFilterParam && pFilterParam->meFilter == BmpFilter::Solarize ) ?
pFilterParam->mcSolarGreyThreshold : 128;
if( pWriteAcc->HasPalette() )
@@ -720,7 +720,7 @@ bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam )
if( pReadAcc )
{
- long nSepiaPercent = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SEPIA ) ?
+ long nSepiaPercent = ( pFilterParam && pFilterParam->meFilter == BmpFilter::Sepia ) ?
pFilterParam->mnSepiaPercent : 10;
const long nSepia = 10000 - 100 * SAL_BOUND( nSepiaPercent, 0, 100 );
BitmapPalette aSepiaPal( 256 );
@@ -798,9 +798,9 @@ bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam )
bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam )
{
- sal_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BmpFilter::Mosaic ) ?
pFilterParam->maMosaicTileSize.mnTileWidth : 4;
- sal_uLong nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uLong nTileHeight = ( pFilterParam && pFilterParam->meFilter == BmpFilter::Mosaic ) ?
pFilterParam->maMosaicTileSize.mnTileHeight : 4;
bool bRet = false;
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 562f4d1f27d3..0e0e19df2519 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -127,7 +127,7 @@ void setupMethodStubs( functor_vector_type& res )
const Bitmap aBitmap( aIntro.GetBitmap() );
Bitmap aBitmapBW( aBitmap );
- aBitmapBW.Filter( BMP_FILTER_EMBOSS_GREY );
+ aBitmapBW.Filter( BmpFilter::EmbossGrey );
Bitmap aBitmapAlien( Size( 100, 100 ), 8 );
aBitmapAlien.Erase( COL_RED );
#endif
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 964904fdf71f..40e2e7d94e33 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -143,7 +143,7 @@ public:
Application::Abort("Failed to load intro image");
maIntroBW = maIntro.GetBitmap();
- maIntroBW.Filter(BMP_FILTER_EMBOSS_GREY);
+ maIntroBW.Filter(BmpFilter::EmbossGrey);
InitRenderers();
mnSegmentsY = rtl::math::round(std::sqrt(maRenderers.size()), 0,