drawinglayer/source/processor2d/vclprocessor2d.cxx |    2 
 filter/source/graphicfilter/egif/egif.cxx          |    8 +--
 filter/source/graphicfilter/eps/eps.cxx            |   16 +++----
 filter/source/msfilter/msdffimp.cxx                |    4 -
 include/vcl/bitmap.hxx                             |   22 ++++------
 include/vcl/gdimtf.hxx                             |    2 
 sc/source/filter/excel/xeescher.cxx                |    2 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx              |    2 
 sfx2/source/dialog/filedlghelper.cxx               |    2 
 sfx2/source/doc/graphhelp.cxx                      |    2 
 svtools/source/graphic/grfmgr2.cxx                 |    8 +--
 svx/source/dialog/_contdlg.cxx                     |    2 
 svx/source/gallery2/galobj.cxx                     |    8 +--
 svx/source/xoutdev/_xoutbmp.cxx                    |    2 
 vcl/qa/cppunit/BitmapTest.cxx                      |    2 
 vcl/qa/cppunit/jpeg/JpegReaderTest.cxx             |    2 
 vcl/source/filter/graphicfilter.cxx                |    6 +-
 vcl/source/filter/jpeg/JpegWriter.cxx              |    2 
 vcl/source/filter/wmf/winmtf.cxx                   |    2 
 vcl/source/gdi/alpha.cxx                           |    6 +-
 vcl/source/gdi/bitmap.cxx                          |   12 ++---
 vcl/source/gdi/bitmap3.cxx                         |   43 ++++++---------------
 vcl/source/gdi/bitmap4.cxx                         |    2 
 vcl/source/gdi/bitmapex.cxx                        |    2 
 vcl/source/gdi/gdimtf.cxx                          |    2 
 vcl/source/gdi/impbmp.cxx                          |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                  |    8 +--
 vcl/source/gdi/pdfwriter_impl2.cxx                 |    4 -
 vcl/source/gdi/pngwrite.cxx                        |    4 -
 vcl/source/gdi/print.cxx                           |    2 
 vcl/source/gdi/print2.cxx                          |    4 -
 vcl/source/outdev/bitmap.cxx                       |   10 ++--
 vcl/source/outdev/transparent.cxx                  |    2 
 vcl/unx/generic/dtrans/bmp.cxx                     |    8 +--
 vcl/workben/fftester.cxx                           |   34 ++++++++--------
 vcl/workben/vcldemo.cxx                            |    2 
 36 files changed, 113 insertions(+), 130 deletions(-)

New commits:
commit b5699cd01b6a52906880c107bac6f3802ea7353d
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Wed Feb 8 16:18:32 2017 +0200

    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
    
    Change-Id: I903c6866750e46ee752e10a17c05fcaaf6b11242
    Reviewed-on: https://gerrit.libreoffice.org/34062
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index b47d09f..58a1801 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -457,7 +457,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 1cf1ad2..887935f 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -252,17 +252,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 c6e6721..0f78c47 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -353,7 +353,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
@@ -487,7 +487,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 )
         {
@@ -795,7 +795,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() );
@@ -806,7 +806,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() );
@@ -819,7 +819,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() );
@@ -831,7 +831,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() ) );
@@ -844,7 +844,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() );
@@ -859,7 +859,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 7bbc0e3..745d2cc 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3916,9 +3916,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 217a6f4..aff55ce 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -70,19 +70,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 fed5eb7..735babc 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -193,7 +193,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 c783ea3..3447acb 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -401,7 +401,7 @@ void XclExpImgData::Save( XclExpStream& rStrm )
 {
     Bitmap aBmp = maGraphic.GetBitmap();
     if( aBmp.GetBitCount() != 24 )
-        aBmp.Convert( BMP_CONVERSION_24BIT );
+        aBmp.Convert( BmpConversion::N24Bit );
 
     Bitmap::ScopedReadAccess pAccess(aBmp);
     if( pAccess )
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx 
b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 7bcadbc..a6a6bb4 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -652,7 +652,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 260573c..8cdbd19 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -704,7 +704,7 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl, 
Timer *, 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 f6ab18c..2f7482b 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -189,7 +189,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 7ef820e..fda6832 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1404,11 +1404,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:
@@ -1558,11 +1558,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 c8c20df..4ae00bf 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 2b1c2d9..a24c0fa 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 888482e..95c6733 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -441,7 +441,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 8259ba4..f6d69d6 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 8fcba6e..573d363 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 4bf9efc..7251a68 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1900,10 +1900,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 c2b5308..6ffa172 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 b824a1a..d51db44 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -1800,7 +1800,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 dc4b507..0ece422 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 2ace729..2931f7c 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -785,15 +785,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;
                 }
 
@@ -1531,7 +1531,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;
@@ -1593,7 +1593,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;
@@ -1760,7 +1760,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 b59543a..7d42865 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;
 
@@ -1018,18 +1003,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;
             }
@@ -1037,17 +1022,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 b60644f..30c33bc 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 0124ae1..218aac4 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 1bbeba4..1604103 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2194,7 +2194,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 1338685..25ebb60 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/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 73aa7f2..0c4be9b 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10951,13 +10951,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.pdfwriter", "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.pdfwriter", "alpha 
mask conversion failed" );
         }
     }
@@ -11328,10 +11328,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 a06b9b9..bc96f0b 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 433b97b..affe3de 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 91fbd64..d20345e 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -749,7 +749,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 0e909a0..e794c07 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 36fea7a..8593a3f 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 a473343..1329ac1 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 daf538c..2c68ed9 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 d967541..d1b9cf0 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -120,7 +120,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)
             {
@@ -128,7 +128,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)
             {
@@ -136,7 +136,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)
             {
@@ -144,21 +144,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)
             {
@@ -182,7 +182,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)
             {
@@ -199,7 +199,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)
             {
@@ -216,7 +216,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)
             {
@@ -233,7 +233,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)
             {
@@ -250,7 +250,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)
             {
@@ -267,7 +267,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)
             {
@@ -284,7 +284,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)
             {
@@ -301,7 +301,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)
             {
@@ -318,7 +318,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)
             {
@@ -335,7 +335,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)
             {
@@ -352,7 +352,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 f482653..a41337a 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1398,7 +1398,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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to