summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-08 16:18:32 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-05 08:17:14 -0500
commitf2c17cd76e7e941dbd5cdf20d0a6514bc65083a8 (patch)
tree2513e9a1175d02f2f192986385b01ddc0c0caceb
parentf519c90e60b1e9fc63f5d16b5c53cd243a5d151c (diff)
convert BmpConversion to scoped enum
and drop unused 4BIT_TRANS and 1BIT_MATRIX enumerators Also fix a bug in x11::convertBitmapDepth where we were incorrectly passing BmpConversion enumeratirs to ReduceColors Reviewed-on: https://gerrit.libreoffice.org/34062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b5699cd01b6a52906880c107bac6f3802ea7353d) Change-Id: I903c6866750e46ee752e10a17c05fcaaf6b11242 (cherry picked from commit 2d171734f349c0f9868106f57f5644a70fbeb945)
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx2
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx8
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx16
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--include/vcl/bitmap.hxx22
-rw-r--r--include/vcl/gdimtf.hxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx2
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
-rw-r--r--sfx2/source/doc/graphhelp.cxx2
-rw-r--r--svtools/source/graphic/grfmgr2.cxx8
-rw-r--r--svx/source/dialog/_contdlg.cxx2
-rw-r--r--svx/source/gallery2/galobj.cxx8
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx2
-rw-r--r--vcl/qa/cppunit/BitmapTest.cxx2
-rw-r--r--vcl/qa/cppunit/jpeg/JpegReaderTest.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx6
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.cxx2
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx2
-rw-r--r--vcl/source/gdi/alpha.cxx6
-rw-r--r--vcl/source/gdi/bitmap.cxx12
-rw-r--r--vcl/source/gdi/bitmap3.cxx43
-rw-r--r--vcl/source/gdi/bitmap4.cxx2
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
-rw-r--r--vcl/source/gdi/gdimtf.cxx2
-rw-r--r--vcl/source/gdi/impbmp.cxx2
-rw-r--r--vcl/source/gdi/impvect.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx4
-rw-r--r--vcl/source/gdi/pngwrite.cxx4
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--vcl/source/gdi/print2.cxx4
-rw-r--r--vcl/source/outdev/bitmap.cxx10
-rw-r--r--vcl/source/outdev/transparent.cxx2
-rw-r--r--vcl/unx/generic/dtrans/bmp.cxx8
-rw-r--r--vcl/workben/fftester.cxx34
-rw-r--r--vcl/workben/vcldemo.cxx2
37 files changed, 114 insertions, 131 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 8544f4c44d03..1ebdca9952df 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -445,7 +445,7 @@ namespace drawinglayer
// a bitmap in gray or Black/White (!)
if(aBitmapEx.GetBitCount() < 24)
{
- aBitmapEx.Convert(BMP_CONVERSION_24BIT);
+ aBitmapEx.Convert(BmpConversion::N24Bit);
}
aBitmapEx.Scale(aNeededBitmapSizePixel, BmpScaleFlag::Interpolate);
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 29a75abf43d8..4b1315fc44ff 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -253,17 +253,17 @@ bool GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
if( !!aMask )
{
- if( aAccBmp.Convert( BMP_CONVERSION_8BIT_TRANS ) )
+ if( aAccBmp.Convert( BmpConversion::N8BitTrans ) )
{
- aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aMask.Convert( BmpConversion::N1BitThreshold );
aAccBmp.Replace( aMask, BMP_COL_TRANS );
bTransparent = true;
}
else
- aAccBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
+ aAccBmp.Convert( BmpConversion::N8BitColors );
}
else
- aAccBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
+ aAccBmp.Convert( BmpConversion::N8BitColors );
m_pAcc = aAccBmp.AcquireReadAccess();
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 4f299eb02018..3bef3cf94f4e 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -359,7 +359,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
if ( mbGrayScale )
{
BitmapEx aTempBitmapEx( rGraphic.GetBitmapEx() );
- aTempBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aTempBitmapEx.Convert( BmpConversion::N8BitGreys );
nErrCode = GraphicConverter::Export( rTargetStream, aTempBitmapEx, ConvertDataFormat::TIF ) ;
}
else
@@ -490,7 +490,7 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
Size aSizeBitmap( ( aSizePoint.Width() + 7 ) & ~7, aSizePoint.Height() );
Bitmap aTmpBitmap( pPreview->GetBitmap() );
aTmpBitmap.Scale( aSizeBitmap, BmpScaleFlag::BestQuality );
- aTmpBitmap.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aTmpBitmap.Convert( BmpConversion::N1BitThreshold );
BitmapReadAccess* pAcc = aTmpBitmap.AcquireReadAccess();
if ( pAcc )
{
@@ -798,7 +798,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
Bitmap aBitmap = static_cast<const MetaBmpAction*>(pMA)->GetBitmap();
if ( mbGrayScale )
- aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBitmap.Convert( BmpConversion::N8BitGreys );
Point aPoint = static_cast<const MetaBmpAction*>(pMA)->GetPoint();
Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
@@ -809,7 +809,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
Bitmap aBitmap = static_cast<const MetaBmpScaleAction*>(pMA)->GetBitmap();
if ( mbGrayScale )
- aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBitmap.Convert( BmpConversion::N8BitGreys );
Point aPoint = static_cast<const MetaBmpScaleAction*>(pMA)->GetPoint();
Size aSize = static_cast<const MetaBmpScaleAction*>(pMA)->GetSize();
ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
@@ -822,7 +822,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
aBitmap.Crop( Rectangle( static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcPoint(),
static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcSize() ) );
if ( mbGrayScale )
- aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBitmap.Convert( BmpConversion::N8BitGreys );
Point aPoint = static_cast<const MetaBmpScalePartAction*>(pMA)->GetDestPoint();
Size aSize = static_cast<const MetaBmpScalePartAction*>(pMA)->GetDestSize();
ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
@@ -834,7 +834,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
BitmapEx aBitmapEx( static_cast<MetaBmpExAction*>(pMA)->GetBitmapEx() );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
- aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBitmap.Convert( BmpConversion::N8BitGreys );
Bitmap aMask( aBitmapEx.GetMask() );
Point aPoint( static_cast<const MetaBmpExAction*>(pMA)->GetPoint() );
Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
@@ -847,7 +847,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
BitmapEx aBitmapEx( static_cast<MetaBmpExScaleAction*>(pMA)->GetBitmapEx() );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
- aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBitmap.Convert( BmpConversion::N8BitGreys );
Bitmap aMask( aBitmapEx.GetMask() );
Point aPoint = static_cast<const MetaBmpExScaleAction*>(pMA)->GetPoint();
Size aSize( static_cast<const MetaBmpExScaleAction*>(pMA)->GetSize() );
@@ -862,7 +862,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcSize() ) );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
- aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBitmap.Convert( BmpConversion::N8BitGreys );
Bitmap aMask( aBitmapEx.GetMask() );
Point aPoint = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestPoint();
Size aSize = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestSize();
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 8bbfbca3f724..98427c6ebab6 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3917,9 +3917,9 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false, true );
if ( eDrawMode == GRAPHICDRAWMODE_GREYS )
- aBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBitmapEx.Convert( BmpConversion::N8BitGreys );
else if ( eDrawMode == GRAPHICDRAWMODE_MONO )
- aBitmapEx.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aBitmapEx.Convert( BmpConversion::N1BitThreshold );
aGraf = aBitmapEx;
}
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 676fdf0875ad..082c146d933b 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -73,19 +73,17 @@ namespace o3tl
#define BMP_COL_TRANS Color( 252, 3, 251 )
-enum BmpConversion
+enum class BmpConversion
{
- BMP_CONVERSION_NONE = 0,
- BMP_CONVERSION_1BIT_THRESHOLD = 1,
- BMP_CONVERSION_1BIT_MATRIX = 2,
- BMP_CONVERSION_4BIT_GREYS = 3,
- BMP_CONVERSION_4BIT_COLORS = 4,
- BMP_CONVERSION_8BIT_GREYS = 5,
- BMP_CONVERSION_8BIT_COLORS = 6,
- BMP_CONVERSION_24BIT = 7,
- BMP_CONVERSION_4BIT_TRANS = 8,
- BMP_CONVERSION_8BIT_TRANS = 9,
- BMP_CONVERSION_GHOSTED = 10
+ NNONE,
+ N1BitThreshold,
+ N4BitGreys,
+ N4BitColors,
+ N8BitGreys,
+ N8BitColors,
+ N24Bit,
+ N8BitTrans,
+ Ghosted
};
enum class BmpCombine
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index d8b8d16e0e60..af9547e9b9da 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -194,7 +194,7 @@ public:
/// Creates an antialiased thumbnail, with maximum width or height of nMaximumExtent.
bool CreateThumbnail(BitmapEx& rBitmapEx,
sal_uInt32 nMaximumExtent = 256,
- BmpConversion nColorConversion = BMP_CONVERSION_24BIT,
+ BmpConversion nColorConversion = BmpConversion::N24Bit,
BmpScaleFlag nScaleFlag = BmpScaleFlag::BestQuality) const;
void UseCanvas( bool _bUseCanvas );
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index ac175ca9b135..1eb7c4c160b4 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -400,7 +400,7 @@ void XclExpImgData::Save( XclExpStream& rStrm )
{
Bitmap aBmp = maGraphic.GetBitmap();
if( aBmp.GetBitCount() != 24 )
- aBmp.Convert( BMP_CONVERSION_24BIT );
+ aBmp.Convert( BmpConversion::N24Bit );
if( BitmapReadAccess* pAccess = aBmp.AcquireReadAccess() )
{
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 7a285f93cd19..a143e4625055 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -654,7 +654,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl, ListBox&, void)
else
aBmp.Scale( nYRatio, nYRatio );
- aBmp.Convert( BMP_CONVERSION_24BIT );
+ aBmp.Convert( BmpConversion::N24Bit );
pImg->SetImage(Image(aBmp));
}
else
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index c54a0df748a4..16f1e683d913 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -704,7 +704,7 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl, Idle *, void)
aBmp.Scale( nYRatio, nYRatio );
// Convert to true color, to allow CopyPixel
- aBmp.Convert( BMP_CONVERSION_24BIT );
+ aBmp.Convert( BmpConversion::N24Bit );
// and copy it into the Any
SvMemoryStream aData;
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index 542c8ff4aef2..c2a7fe298335 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -191,7 +191,7 @@ bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile* pMetaFile, const
BitmapEx aResultBitmap;
- bResult = pMetaFile->CreateThumbnail(aResultBitmap, 256, BMP_CONVERSION_8BIT_COLORS, BmpScaleFlag::Default);
+ bResult = pMetaFile->CreateThumbnail(aResultBitmap, 256, BmpConversion::N8BitColors, BmpScaleFlag::Default);
if (!bResult || aResultBitmap.IsEmpty())
return false;
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 408bee56e2a0..c59fdf0cc9a6 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1406,11 +1406,11 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, Gra
switch( aAttr.GetDrawMode() )
{
case GRAPHICDRAWMODE_MONO:
- rBmpEx.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ rBmpEx.Convert( BmpConversion::N1BitThreshold );
break;
case GRAPHICDRAWMODE_GREYS:
- rBmpEx.Convert( BMP_CONVERSION_8BIT_GREYS );
+ rBmpEx.Convert( BmpConversion::N8BitGreys );
break;
case GRAPHICDRAWMODE_WATERMARK:
@@ -1560,11 +1560,11 @@ void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr
switch( aAttr.GetDrawMode() )
{
case GRAPHICDRAWMODE_MONO:
- rAnimation.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ rAnimation.Convert( BmpConversion::N1BitThreshold );
break;
case GRAPHICDRAWMODE_GREYS:
- rAnimation.Convert( BMP_CONVERSION_8BIT_GREYS );
+ rAnimation.Convert( BmpConversion::N8BitGreys );
break;
case GRAPHICDRAWMODE_WATERMARK:
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index c3e6959041ec..2b0555820971 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -137,7 +137,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
aTransMap.SetOrigin( Point() );
pVDev->SetMapMode( aTransMap );
aBmp = pVDev->GetBitmap( Point(), rSizePix );
- aBmp.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aBmp.Convert( BmpConversion::N1BitThreshold );
}
}
else if( rGraphic.IsTransparent() )
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 45af5e587330..7e1508958e8a 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -125,7 +125,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
if( ( aBmpSize.Width() <= S_THUMB ) && ( aBmpSize.Height() <= S_THUMB ) )
{
- aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
+ aThumbBmp.Convert( BmpConversion::N8BitColors );
bRet = true;
}
else
@@ -138,7 +138,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
(double) aNewSize.Height() / aBmpSize.Height(),
BmpScaleFlag::BestQuality ) )
{
- aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
+ aThumbBmp.Convert( BmpConversion::N8BitColors );
bRet = true;
}
}
@@ -159,7 +159,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
if( !aThumbBmp.IsEmpty() )
{
- aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
+ aThumbBmp.Convert( BmpConversion::N8BitColors );
bRet = true;
}
}
@@ -508,7 +508,7 @@ bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
if(!!aThumbBmp)
{
aThumbBmp.Scale(Size(nTargetSizeX, nTargetSizeY), BmpScaleFlag::BestQuality);
- aThumbBmp.Convert(BMP_CONVERSION_8BIT_COLORS);
+ aThumbBmp.Convert(BmpConversion::N8BitColors);
bRet = true;
}
}
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 58addbc8e5e1..53a6691a2254 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -442,7 +442,7 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
{
Bitmap aWorkBmp( rBmp );
- if( aWorkBmp.Convert( BMP_CONVERSION_8BIT_GREYS ) )
+ if( aWorkBmp.Convert( BmpConversion::N8BitGreys ) )
{
bool bRet = false;
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 35b31fdf7fb5..fe76f51e5232 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -70,7 +70,7 @@ void BitmapTest::testConvert()
CPPUNIT_ASSERT_EQUAL(sal_Int32(255), sal_Int32(rColor.GetBlue()));
}
- aBitmap.Convert(BMP_CONVERSION_24BIT);
+ aBitmap.Convert(BmpConversion::N24Bit);
CPPUNIT_ASSERT_EQUAL(sal_uInt16(24), aBitmap.GetBitCount());
{
diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
index 8fcba6ee929e..573d3639b0ae 100644
--- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
@@ -122,7 +122,7 @@ void JpegReaderTest::testReadGray()
CPPUNIT_ASSERT_EQUAL(12L, aSize.Width());
CPPUNIT_ASSERT_EQUAL(12L, aSize.Height());
- aBitmap.Convert(BmpConversion::BMP_CONVERSION_24BIT); // convert to 24bit so we don't need to deal with palette
+ aBitmap.Convert(BmpConversion::N24Bit); // convert to 24bit so we don't need to deal with palette
int nMaxDelta = 1;
CPPUNIT_ASSERT(checkRect(aBitmap, 0, 8, 8, Color(0xff, 0xff, 0xff), nMaxDelta));
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 794bd3e29438..364705b882d4 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1935,10 +1935,10 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString
if( aFilterName.equalsIgnoreAsciiCase( EXP_BMP ) )
{
Bitmap aBmp( aGraphic.GetBitmap() );
- sal_Int32 nColorRes = aConfigItem.ReadInt32( "Colors", 0 );
- if ( nColorRes && ( nColorRes <= (sal_uInt16)BMP_CONVERSION_24BIT) )
+ BmpConversion nColorRes = (BmpConversion) aConfigItem.ReadInt32( "Colors", 0 );
+ if ( nColorRes != BmpConversion::NNONE && ( nColorRes <= BmpConversion::N24Bit) )
{
- if( !aBmp.Convert( (BmpConversion) nColorRes ) )
+ if( !aBmp.Convert( nColorRes ) )
aBmp = aGraphic.GetBitmap();
}
bool bRleCoding = aConfigItem.ReadBool( "RLE_Coding", true );
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index c2b5308ce50a..6ffa172c3018 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -193,7 +193,7 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
if ( mbGreys )
{
- if ( !aGraphicBmp.Convert( BMP_CONVERSION_8BIT_GREYS ) )
+ if ( !aGraphicBmp.Convert( BmpConversion::N8BitGreys ) )
aGraphicBmp = rGraphic.GetBitmap();
}
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index d061fb75b5a2..48cebc820f9f 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -1745,7 +1745,7 @@ void WinMtfOutput::ResolveBitmapActions( std::vector<std::unique_ptr<BSaveStruct
Bitmap aMask( aBitmap );
if ( ( nUsed & 1 ) && ( nRasterOperation & 0xb0 ) == 0xb0 ) // pattern used
{
- aBitmap.Convert( BMP_CONVERSION_24BIT );
+ aBitmap.Convert( BmpConversion::N24Bit );
aBitmap.Erase( maFillStyle.aFillColor );
}
BitmapEx aBmpEx( aBitmap, aMask );
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index dc4b50797030..0ece422f591d 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -30,7 +30,7 @@ AlphaMask::AlphaMask( const Bitmap& rBitmap ) :
Bitmap( rBitmap )
{
if( !!rBitmap )
- Convert( BMP_CONVERSION_8BIT_GREYS );
+ Convert( BmpConversion::N8BitGreys );
}
AlphaMask::AlphaMask( const AlphaMask& rAlphaMask ) :
@@ -59,7 +59,7 @@ AlphaMask& AlphaMask::operator=( const Bitmap& rBitmap )
*static_cast<Bitmap*>(this) = rBitmap;
if( !!rBitmap )
- Convert( BMP_CONVERSION_8BIT_GREYS );
+ Convert( BmpConversion::N8BitGreys );
return *this;
}
@@ -154,7 +154,7 @@ void AlphaMask::ReleaseAccess( BitmapReadAccess* pAccess )
if( pAccess )
{
Bitmap::ReleaseAccess( pAccess );
- Convert( BMP_CONVERSION_8BIT_GREYS );
+ Convert( BmpConversion::N8BitGreys );
}
}
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 95560548e547..05410d6b5867 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -799,15 +799,15 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
int nNextIndex = 0;
if( ( nSrcBitCount == 24 ) && ( nDstBitCount < 24 ) )
- Convert( BMP_CONVERSION_24BIT );
+ Convert( BmpConversion::N24Bit );
else if( ( nSrcBitCount == 8 ) && ( nDstBitCount < 8 ) )
{
- Convert( BMP_CONVERSION_8BIT_COLORS );
+ Convert( BmpConversion::N8BitColors );
nNextIndex = 16;
}
else if( ( nSrcBitCount == 4 ) && ( nDstBitCount < 4 ) )
{
- Convert( BMP_CONVERSION_4BIT_COLORS );
+ Convert( BmpConversion::N4BitColors );
nNextIndex = 2;
}
@@ -1545,7 +1545,7 @@ bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal
// Bitmaps with 1 bit color depth can cause problems
// if they have other entries than black/white in their palette
if( 1 == GetBitCount() )
- Convert( BMP_CONVERSION_4BIT_COLORS );
+ Convert( BmpConversion::N4BitColors );
ScopedWriteAccess pAcc(*this);
bool bRet = false;
@@ -1607,7 +1607,7 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
// Bitmaps with 1 bit color depth can cause problems
// if they have other entries than black/white in their palette
if( 1 == GetBitCount() )
- Convert( BMP_CONVERSION_4BIT_COLORS );
+ Convert( BmpConversion::N4BitColors );
ScopedWriteAccess pAcc(*this);
bool bRet = false;
@@ -1774,7 +1774,7 @@ bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
// Convert to a truecolor bitmap, if we're a paletted one. There's
// room for tradeoff decision here, maybe later for an overload (or a flag)
if( GetBitCount() <= 8 )
- Convert( BMP_CONVERSION_24BIT );
+ Convert( BmpConversion::N24Bit );
AlphaMask::ScopedReadAccess pAlphaAcc(const_cast<AlphaMask&>(rAlpha));
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index d602f6321dd4..cde6cf28d2d8 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -263,19 +263,15 @@ bool Bitmap::Convert( BmpConversion eConversion )
switch( eConversion )
{
- case BMP_CONVERSION_1BIT_THRESHOLD:
+ case BmpConversion::N1BitThreshold:
bRet = ImplMakeMono( 128 );
break;
- case BMP_CONVERSION_1BIT_MATRIX:
- bRet = ImplMakeMonoDither();
- break;
-
- case BMP_CONVERSION_4BIT_GREYS:
+ case BmpConversion::N4BitGreys:
bRet = ImplMakeGreyscales( 16 );
break;
- case BMP_CONVERSION_4BIT_COLORS:
+ case BmpConversion::N4BitColors:
{
if( nBitCount < 4 )
bRet = ImplConvertUp( 4 );
@@ -286,22 +282,11 @@ bool Bitmap::Convert( BmpConversion eConversion )
}
break;
- case BMP_CONVERSION_4BIT_TRANS:
- {
- Color aTrans( BMP_COL_TRANS );
-
- if( nBitCount < 4 )
- bRet = ImplConvertUp( 4, &aTrans );
- else
- bRet = ImplConvertDown( 4, &aTrans );
- }
- break;
-
- case BMP_CONVERSION_8BIT_GREYS:
+ case BmpConversion::N8BitGreys:
bRet = ImplMakeGreyscales( 256 );
break;
- case BMP_CONVERSION_8BIT_COLORS:
+ case BmpConversion::N8BitColors:
{
if( nBitCount < 8 )
bRet = ImplConvertUp( 8 );
@@ -312,7 +297,7 @@ bool Bitmap::Convert( BmpConversion eConversion )
}
break;
- case BMP_CONVERSION_8BIT_TRANS:
+ case BmpConversion::N8BitTrans:
{
Color aTrans( BMP_COL_TRANS );
@@ -323,7 +308,7 @@ bool Bitmap::Convert( BmpConversion eConversion )
}
break;
- case BMP_CONVERSION_24BIT:
+ case BmpConversion::N24Bit:
{
if( nBitCount < 24 )
bRet = ImplConvertUp( 24 );
@@ -332,7 +317,7 @@ bool Bitmap::Convert( BmpConversion eConversion )
}
break;
- case BMP_CONVERSION_GHOSTED:
+ case BmpConversion::Ghosted:
bRet = ImplConvertGhosted();
break;
@@ -1029,18 +1014,18 @@ void Bitmap::ImplAdaptBitCount(Bitmap& rNew) const
{
case 1:
{
- rNew.Convert(BMP_CONVERSION_1BIT_THRESHOLD);
+ rNew.Convert(BmpConversion::N1BitThreshold);
break;
}
case 4:
{
if(HasGreyPalette())
{
- rNew.Convert(BMP_CONVERSION_4BIT_GREYS);
+ rNew.Convert(BmpConversion::N4BitGreys);
}
else
{
- rNew.Convert(BMP_CONVERSION_4BIT_COLORS);
+ rNew.Convert(BmpConversion::N4BitColors);
}
break;
}
@@ -1048,17 +1033,17 @@ void Bitmap::ImplAdaptBitCount(Bitmap& rNew) const
{
if(HasGreyPalette())
{
- rNew.Convert(BMP_CONVERSION_8BIT_GREYS);
+ rNew.Convert(BmpConversion::N8BitGreys);
}
else
{
- rNew.Convert(BMP_CONVERSION_8BIT_COLORS);
+ rNew.Convert(BmpConversion::N8BitColors);
}
break;
}
case 24:
{
- rNew.Convert(BMP_CONVERSION_24BIT);
+ rNew.Convert(BmpConversion::N24Bit);
break;
}
default:
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index b60644fb439a..30c33bcd36b1 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -983,7 +983,7 @@ extern "C" int SAL_CALL ImplPopArtCmpFnc( const void* p1, const void* p2 )
bool Bitmap::ImplPopArt()
{
/* note: GetBitCount() after that is no more than 8 */
- bool bRet = ( GetBitCount() <= 8 ) || Convert( BMP_CONVERSION_8BIT_COLORS );
+ bool bRet = ( GetBitCount() <= 8 ) || Convert( BmpConversion::N8BitColors );
if( bRet )
{
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index dd3dedcd7a83..7e30fc82804c 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -170,7 +170,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) :
// X11SalGraphics::drawAlphaBitmap()'s render acceleration
// can handle the bitmap depth mismatch directly
if( aBitmap.GetBitCount() < aMask.GetBitCount() )
- aBitmap.Convert( BMP_CONVERSION_24BIT );
+ aBitmap.Convert( BmpConversion::N24Bit );
}
BitmapEx::BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor ) :
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 74bdd0747026..29a0e9021278 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2196,7 +2196,7 @@ void GDIMetaFile::Convert( MtfConversion eConversion )
ImplBmpConvertParam aBmpParam;
aColParam.eConversion = eConversion;
- aBmpParam.eConversion = ( MtfConversion::N1BitThreshold == eConversion ) ? BMP_CONVERSION_1BIT_THRESHOLD : BMP_CONVERSION_8BIT_GREYS;
+ aBmpParam.eConversion = ( MtfConversion::N1BitThreshold == eConversion ) ? BmpConversion::N1BitThreshold : BmpConversion::N8BitGreys;
ImplExchangeColors( ImplColConvertFnc, &aColParam, ImplBmpConvertFnc, &aBmpParam );
}
diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx
index 13386856ac12..25ebb604d0f1 100644
--- a/vcl/source/gdi/impbmp.cxx
+++ b/vcl/source/gdi/impbmp.cxx
@@ -115,7 +115,7 @@ bool ImpBitmap::ImplReplace( const Color& rSearchColor, const Color& rReplaceCol
bool ImpBitmap::ImplConvert( BmpConversion eConversion )
{
// avoid large chunk of obsolete and hopefully rarely used conversions.
- if (eConversion != BMP_CONVERSION_8BIT_GREYS)
+ if (eConversion != BmpConversion::N8BitGreys)
return false;
// frequently used conversion for creating alpha masks
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 4a8f4f423341..dee3d16c2ae9 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -738,7 +738,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp,
bool bRet = false;
if( xBmp->GetBitCount() > 1 )
- xBmp->Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ xBmp->Convert( BmpConversion::N1BitThreshold );
Bitmap::ScopedReadAccess pRAcc(*xBmp);
std::unique_ptr <ImplVectMap> xMap(ImplExpand( pRAcc.get(), COL_BLACK ));
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index c51caa91417c..f861e3c1ad09 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -12202,13 +12202,13 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
if( m_aContext.Version < PDFWriter::PDF_1_4 || ! rObject.m_aBitmap.IsAlpha() )
{
aBitmap = getExportBitmap(rObject.m_aBitmap.GetMask());
- aBitmap.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aBitmap.Convert( BmpConversion::N1BitThreshold );
SAL_WARN_IF( aBitmap.GetBitCount() != 1, "vcl", "mask conversion failed" );
}
else if( aBitmap.GetBitCount() != 8 )
{
aBitmap = getExportBitmap(rObject.m_aBitmap.GetAlpha().GetBitmap());
- aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBitmap.Convert( BmpConversion::N8BitGreys );
SAL_WARN_IF( aBitmap.GetBitCount() != 8, "vcl", "alpha mask conversion failed" );
}
}
@@ -12610,10 +12610,10 @@ const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx
BitmapEx aBitmap( i_rBitmap );
if( m_aContext.ColorMode == PDFWriter::DrawGreyscale )
{
- BmpConversion eConv = BMP_CONVERSION_8BIT_GREYS;
+ BmpConversion eConv = BmpConversion::N8BitGreys;
int nDepth = aBitmap.GetBitmap().GetBitCount();
if( nDepth <= 4 )
- eConv = BMP_CONVERSION_4BIT_GREYS;
+ eConv = BmpConversion::N4BitGreys;
if( nDepth > 1 )
aBitmap.Convert( eConv );
}
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index af63e2cdb3a3..3fd3d66b0be9 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -152,10 +152,10 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
{
if( m_aContext.ColorMode == PDFWriter::DrawGreyscale )
{
- BmpConversion eConv = BMP_CONVERSION_8BIT_GREYS;
+ BmpConversion eConv = BmpConversion::N8BitGreys;
int nDepth = aBitmapEx.GetBitmap().GetBitCount();
if( nDepth <= 4 )
- eConv = BMP_CONVERSION_4BIT_GREYS;
+ eConv = BmpConversion::N4BitGreys;
if( nDepth > 1 )
aBitmapEx.Convert( eConv );
}
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 108e412a5640..aa1cb1cd21f6 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -147,13 +147,13 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
{
if (mnBitsPerPixel <= 8 && rBmpEx.IsAlpha())
{
- aBmp.Convert( BMP_CONVERSION_24BIT );
+ aBmp.Convert( BmpConversion::N24Bit );
mnBitsPerPixel = 24;
}
if (mnBitsPerPixel <= 8) // transparent palette
{
- aBmp.Convert(BMP_CONVERSION_8BIT_TRANS);
+ aBmp.Convert(BmpConversion::N8BitTrans);
aBmp.Replace(rBmpEx.GetMask(), BMP_COL_TRANS);
mnBitsPerPixel = 8;
mpAccess = Bitmap::ScopedReadAccess(aBmp);
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index da2305cd66ba..6e1753805810 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -761,7 +761,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
BmpMirrorFlags nMirrFlags = BmpMirrorFlags::NONE;
if( aMask.GetBitCount() > 1 )
- aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aMask.Convert( BmpConversion::N1BitThreshold );
// mirrored horizontically
if( aDestSz.Width() < 0 )
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 53fab0f9f15f..54a8d0af9389 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -231,7 +231,7 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
if( aActualColor.GetColorError( aBgColor ) )
{
// no, create truecolor bitmap, then
- aBmp.Convert( BMP_CONVERSION_24BIT );
+ aBmp.Convert( BmpConversion::N24Bit );
// fill masked out areas white
aBmp.Replace( aBmpEx.GetMask(), aBgColor );
@@ -245,7 +245,7 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
else
{
// blend with alpha channel
- aBmp.Convert( BMP_CONVERSION_24BIT );
+ aBmp.Convert( BmpConversion::N24Bit );
aBmp.Blend(aBmpEx.GetAlpha(),aBgColor);
}
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index cbf44167608a..618217c05fd4 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -100,10 +100,10 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
else if( !!aBmp )
{
if ( mnDrawMode & DrawModeFlags::GrayBitmap )
- aBmp.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBmp.Convert( BmpConversion::N8BitGreys );
if ( mnDrawMode & DrawModeFlags::GhostedBitmap )
- aBmp.Convert( BMP_CONVERSION_GHOSTED );
+ aBmp.Convert( BmpConversion::Ghosted );
}
}
@@ -337,10 +337,10 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
else if( !!aBmpEx )
{
if ( mnDrawMode & DrawModeFlags::GrayBitmap )
- aBmpEx.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aBmpEx.Convert( BmpConversion::N8BitGreys );
if ( mnDrawMode & DrawModeFlags::GhostedBitmap )
- aBmpEx.Convert( BMP_CONVERSION_GHOSTED );
+ aBmpEx.Convert( BmpConversion::Ghosted );
}
}
@@ -486,7 +486,7 @@ BitmapEx OutputDevice::GetBitmapEx( const Point& rSrcPt, const Size& rSize ) con
// ensure 8 bit alpha
if( aAlphaBitmap.GetBitCount() > 8 )
- aAlphaBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
+ aAlphaBitmap.Convert( BmpConversion::N8BitGreys );
return BitmapEx(GetBitmap( rSrcPt, rSize ), AlphaMask( aAlphaBitmap ) );
}
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index cfb3572e36bb..e7aad12b23da 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -129,7 +129,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
BmpMirrorFlags nMirrFlags = BmpMirrorFlags::NONE;
if( aMask.GetBitCount() > 1 )
- aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aMask.Convert( BmpConversion::N1BitThreshold );
// mirrored horizontically
if( aDestSz.Width() < 0L )
diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx
index daf538c696d9..2c68ed952c50 100644
--- a/vcl/unx/generic/dtrans/bmp.cxx
+++ b/vcl/unx/generic/dtrans/bmp.cxx
@@ -750,16 +750,16 @@ css::uno::Sequence<sal_Int8> x11::convertBitmapDepth(
if (bm.GetBitCount() != depth) {
switch (depth) {
case 1:
- bm.Convert(BMP_CONVERSION_1BIT_THRESHOLD);
+ bm.Convert(BmpConversion::N1BitThreshold);
break;
case 4:
- bm.ReduceColors(BMP_CONVERSION_4BIT_COLORS);
+ bm.ReduceColors(1<<4);
break;
case 8:
- bm.ReduceColors(BMP_CONVERSION_8BIT_COLORS);
+ bm.ReduceColors(1<<8);
break;
case 24:
- bm.Convert(BMP_CONVERSION_24BIT);
+ bm.Convert(BmpConversion::N24Bit);
break;
}
}
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 624547ad54f1..8c2c86df70e1 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -116,7 +116,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) ImportJPEG(aFileStream, aGraphic, nullptr, GraphicFilterImportFlags::NONE);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "gif") == 0)
{
@@ -124,7 +124,7 @@ try_again:
Graphic aGraphic;
ret = (int) ImportGIF(aFileStream, aGraphic);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "xbm") == 0)
{
@@ -132,7 +132,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) ImportXBM(aFileStream, aGraphic);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "xpm") == 0)
{
@@ -140,21 +140,21 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) ImportXPM(aFileStream, aGraphic);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "png") == 0)
{
SvFileStream aFileStream(out, StreamMode::READ);
vcl::PNGReader aReader(aFileStream);
BitmapEx aTarget = aReader.Read();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "bmp") == 0)
{
Bitmap aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) ReadDIB(aTarget, aFileStream, true);
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "svm") == 0)
{
@@ -177,7 +177,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "dxf") == 0)
{
@@ -194,7 +194,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "met") == 0)
{
@@ -211,7 +211,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if ((strcmp(argv[2], "pbm") == 0) || strcmp(argv[2], "ppm") == 0)
{
@@ -228,7 +228,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "psd") == 0)
{
@@ -245,7 +245,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "eps") == 0)
{
@@ -262,7 +262,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "pct") == 0)
{
@@ -279,7 +279,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "pcx") == 0)
{
@@ -296,7 +296,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "ras") == 0)
{
@@ -313,7 +313,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "tga") == 0)
{
@@ -330,7 +330,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if (strcmp(argv[2], "tif") == 0)
{
@@ -347,7 +347,7 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
BitmapEx aTarget = aGraphic.GetBitmapEx();
- aTarget.Convert(BMP_CONVERSION_24BIT);
+ aTarget.Convert(BmpConversion::N24Bit);
}
else if ( (strcmp(argv[2], "doc") == 0) ||
(strcmp(argv[2], "ww8") == 0) ||
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 40e2e7d94e33..98e6b2da5b2e 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1396,7 +1396,7 @@ public:
rDev.DrawBitmapEx(aBelow, aResult);
Bitmap aGrey = aSrc.GetBitmap();
- aGrey.Convert(BMP_CONVERSION_8BIT_GREYS);
+ aGrey.Convert(BmpConversion::N8BitGreys);
rDev.DrawBitmap(aBelow, aGrey);
aBelow.Move(aGrey.GetSizePixel().Width(),0);