[Libreoffice-commits] core.git: canvas/source include/vcl vcl/headless vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/unx vcl/win

Noel (via logerrit) logerrit at kemper.freedesktop.org
Wed Mar 31 15:38:50 UTC 2021


 canvas/source/directx/dx_vcltools.cxx   |    6 ---
 include/vcl/BitmapReadAccess.hxx        |    8 ----
 include/vcl/Scanline.hxx                |    5 --
 vcl/headless/svpbmp.cxx                 |    9 +----
 vcl/qt5/Qt5Bitmap.cxx                   |    4 --
 vcl/quartz/salbmp.cxx                   |    3 -
 vcl/skia/salbmp.cxx                     |    3 -
 vcl/source/bitmap/BitmapReadAccess.cxx  |   54 --------------------------------
 vcl/source/bitmap/BitmapWriteAccess.cxx |    6 ---
 vcl/source/bitmap/bitmappaint.cxx       |   46 ---------------------------
 vcl/source/bitmap/bmpfast.cxx           |   14 --------
 vcl/source/bitmap/dibtools.cxx          |    1 
 vcl/source/bitmap/salbmp.cxx            |    8 ----
 vcl/source/gdi/salmisc.cxx              |   24 --------------
 vcl/source/helper/canvasbitmap.cxx      |   14 --------
 vcl/unx/generic/gdi/salbmp.cxx          |   18 ----------
 vcl/win/gdi/salbmp.cxx                  |    1 
 17 files changed, 6 insertions(+), 218 deletions(-)

New commits:
commit 740757d17452e3b2f9bfa7897c05dedeca639e34
Author:     Noel <noel.grandin at collabora.co.uk>
AuthorDate: Wed Mar 31 14:32:02 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Mar 31 17:38:04 2021 +0200

    remove internal 4bit scanline formats
    
    since we have already removed the 4-bit internal bitmap formats.
    
    Change-Id: Ie481aaa8e25642a47e30beb6f37e2d3beda304e9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113412
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx
index 68a07ae79b4a..707d358e5869 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -176,7 +176,6 @@ namespace dxcanvas::tools
                     // one of the following formats:
 
                     //    ScanlineFormat::N1BitMsbPal
-                    //    ScanlineFormat::N4BitMsnPal
                     //    ScanlineFormat::N8BitPal
                     //    ScanlineFormat::N24BitTcBgr
                     //    ScanlineFormat::N32BitTcMask
@@ -240,7 +239,6 @@ namespace dxcanvas::tools
                             // to hand-formulate the following
                             // formats, too.
                             case ScanlineFormat::N1BitMsbPal:
-                            case ScanlineFormat::N4BitMsnPal:
                             case ScanlineFormat::N32BitTcMask:
                             {
                                 Scanline pAScan = pAlphaReadAccess->GetScanline( y );
@@ -261,7 +259,6 @@ namespace dxcanvas::tools
                             break;
 
                             case ScanlineFormat::N1BitLsbPal:
-                            case ScanlineFormat::N4BitLsnPal:
                             case ScanlineFormat::N24BitTcRgb:
                             case ScanlineFormat::N32BitTcAbgr:
                             case ScanlineFormat::N32BitTcArgb:
@@ -285,7 +282,6 @@ namespace dxcanvas::tools
                     // one of the following formats:
 
                     //    ScanlineFormat::N1BitMsbPal
-                    //    ScanlineFormat::N4BitMsnPal
                     //    ScanlineFormat::N8BitPal
                     //    ScanlineFormat::N24BitTcBgr
                     //    ScanlineFormat::N32BitTcMask
@@ -371,7 +367,6 @@ namespace dxcanvas::tools
                             // to hand-formulate the following
                             // formats, too.
                             case ScanlineFormat::N1BitMsbPal:
-                            case ScanlineFormat::N4BitMsnPal:
                             case ScanlineFormat::N32BitTcMask:
                             {
                                 Scanline pMScan = pMaskReadAccess->GetScanline( y );
@@ -395,7 +390,6 @@ namespace dxcanvas::tools
                             break;
 
                             case ScanlineFormat::N1BitLsbPal:
-                            case ScanlineFormat::N4BitLsnPal:
                             case ScanlineFormat::N24BitTcRgb:
                             case ScanlineFormat::N32BitTcAbgr:
                             case ScanlineFormat::N32BitTcArgb:
diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index 845e9994aa6b..b68332e89294 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -119,10 +119,6 @@ public:
                                               const ColorMask& rMask);
     static BitmapColor GetPixelForN1BitLsbPal(ConstScanline pScanline, tools::Long nX,
                                               const ColorMask& rMask);
-    static BitmapColor GetPixelForN4BitMsnPal(ConstScanline pScanline, tools::Long nX,
-                                              const ColorMask& rMask);
-    static BitmapColor GetPixelForN4BitLsnPal(ConstScanline pScanline, tools::Long nX,
-                                              const ColorMask& rMask);
     static BitmapColor GetPixelForN8BitPal(ConstScanline pScanline, tools::Long nX,
                                            const ColorMask& rMask);
     static BitmapColor GetPixelForN24BitTcBgr(ConstScanline pScanline, tools::Long nX,
@@ -152,10 +148,6 @@ public:
                                        const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN1BitLsbPal(Scanline pScanline, tools::Long nX,
                                        const BitmapColor& rBitmapColor, const ColorMask& rMask);
-    static void SetPixelForN4BitMsnPal(Scanline pScanline, tools::Long nX,
-                                       const BitmapColor& rBitmapColor, const ColorMask& rMask);
-    static void SetPixelForN4BitLsnPal(Scanline pScanline, tools::Long nX,
-                                       const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN8BitPal(Scanline pScanline, tools::Long nX,
                                     const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN24BitTcBgr(Scanline pScanline, tools::Long nX,
diff --git a/include/vcl/Scanline.hxx b/include/vcl/Scanline.hxx
index 707ee41fa9cd..6f40ce7a0c58 100644
--- a/include/vcl/Scanline.hxx
+++ b/include/vcl/Scanline.hxx
@@ -31,9 +31,6 @@ enum class ScanlineFormat {
     N1BitMsbPal       = 0x00000001,
     N1BitLsbPal       = 0x00000002,
 
-    N4BitMsnPal       = 0x00000004,
-    N4BitLsnPal       = 0x00000008,
-
     N8BitPal          = 0x00000010,
 
     N24BitTcBgr       = 0x00000100,
@@ -50,7 +47,7 @@ enum class ScanlineFormat {
 
 namespace o3tl
 {
-    template<> struct typed_flags<ScanlineFormat> : is_typed_flags<ScanlineFormat, 0x0001fb1f> {};
+    template<> struct typed_flags<ScanlineFormat> : is_typed_flags<ScanlineFormat, 0x0001fb13> {};
 }
 
 inline ScanlineFormat RemoveScanline(ScanlineFormat nFormat)
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 7dfa5a89eb41..4524478078ac 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -81,21 +81,18 @@ static std::unique_ptr<BitmapBuffer> ImplCreateDIB(
         case 1:
             pDIB->mnFormat = ScanlineFormat::N1BitLsbPal;
             break;
-        case 4:
-            pDIB->mnFormat = ScanlineFormat::N4BitMsnPal;
-            break;
         case 8:
             pDIB->mnFormat = ScanlineFormat::N8BitPal;
             break;
         case 24:
             pDIB->mnFormat = SVP_24BIT_FORMAT;
             break;
-        default:
-            nBitCount = 32;
-            [[fallthrough]];
         case 32:
             pDIB->mnFormat = SVP_CAIRO_FORMAT;
             break;
+        default:
+            assert(false);
+            pDIB->mnFormat = SVP_CAIRO_FORMAT;
     }
 
     pDIB->mnFormat |= ScanlineFormat::TopDown;
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx
index bb7f762ee874..fd7932f879bd 100644
--- a/vcl/qt5/Qt5Bitmap.cxx
+++ b/vcl/qt5/Qt5Bitmap.cxx
@@ -236,10 +236,6 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/)
             pBuffer->mnFormat = ScanlineFormat::N1BitMsbPal | ScanlineFormat::TopDown;
             pBuffer->maPalette = m_aPalette;
             break;
-        case 4:
-            pBuffer->mnFormat = ScanlineFormat::N4BitMsnPal | ScanlineFormat::TopDown;
-            pBuffer->maPalette = m_aPalette;
-            break;
         case 8:
             pBuffer->mnFormat = ScanlineFormat::N8BitPal | ScanlineFormat::TopDown;
             pBuffer->maPalette = m_aPalette;
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index f50c81c3b637..1b9a777616de 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -659,9 +659,6 @@ BitmapBuffer* QuartzSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
         case 1:
             pBuffer->mnFormat = ScanlineFormat::N1BitMsbPal;
             break;
-        case 4:
-            pBuffer->mnFormat = ScanlineFormat::N4BitMsnPal;
-            break;
         case 8:
             pBuffer->mnFormat = ScanlineFormat::N8BitPal;
             break;
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 3b4ec7104af4..f9e17eed1b79 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -250,9 +250,6 @@ BitmapBuffer* SkiaSalBitmap::AcquireBuffer(BitmapAccessMode nMode)
         case 1:
             buffer->mnFormat = ScanlineFormat::N1BitMsbPal;
             break;
-        case 4:
-            buffer->mnFormat = ScanlineFormat::N4BitMsnPal;
-            break;
         case 8:
             buffer->mnFormat = ScanlineFormat::N8BitPal;
             break;
diff --git a/vcl/source/bitmap/BitmapReadAccess.cxx b/vcl/source/bitmap/BitmapReadAccess.cxx
index b0ad156ddf91..cf531189913c 100644
--- a/vcl/source/bitmap/BitmapReadAccess.cxx
+++ b/vcl/source/bitmap/BitmapReadAccess.cxx
@@ -64,10 +64,6 @@ FncGetPixel BitmapReadAccess::GetPixelFunction(ScanlineFormat nFormat)
             return GetPixelForN1BitMsbPal;
         case ScanlineFormat::N1BitLsbPal:
             return GetPixelForN1BitLsbPal;
-        case ScanlineFormat::N4BitMsnPal:
-            return GetPixelForN4BitMsnPal;
-        case ScanlineFormat::N4BitLsnPal:
-            return GetPixelForN4BitLsnPal;
         case ScanlineFormat::N8BitPal:
             return GetPixelForN8BitPal;
         case ScanlineFormat::N24BitTcBgr:
@@ -110,10 +106,6 @@ FncSetPixel BitmapReadAccess::SetPixelFunction(ScanlineFormat nFormat)
             return SetPixelForN1BitMsbPal;
         case ScanlineFormat::N1BitLsbPal:
             return SetPixelForN1BitLsbPal;
-        case ScanlineFormat::N4BitMsnPal:
-            return SetPixelForN4BitMsnPal;
-        case ScanlineFormat::N4BitLsnPal:
-            return SetPixelForN4BitLsnPal;
         case ScanlineFormat::N8BitPal:
             return SetPixelForN8BitPal;
         case ScanlineFormat::N24BitTcBgr:
@@ -292,52 +284,6 @@ void BitmapReadAccess::SetPixelForN1BitLsbPal(const Scanline pScanline, tools::L
         rByte &= ~(1 << (nX & 7));
 }
 
-BitmapColor BitmapReadAccess::GetPixelForN4BitMsnPal(ConstScanline pScanline, tools::Long nX,
-                                                     const ColorMask&)
-{
-    return BitmapColor((pScanline[nX >> 1] >> (nX & 1 ? 0 : 4)) & 0x0f);
-}
-
-void BitmapReadAccess::SetPixelForN4BitMsnPal(const Scanline pScanline, tools::Long nX,
-                                              const BitmapColor& rBitmapColor, const ColorMask&)
-{
-    sal_uInt8& rByte = pScanline[nX >> 1];
-
-    if (nX & 1)
-    {
-        rByte &= 0xf0;
-        rByte |= (rBitmapColor.GetIndex() & 0x0f);
-    }
-    else
-    {
-        rByte &= 0x0f;
-        rByte |= (rBitmapColor.GetIndex() << 4);
-    }
-}
-
-BitmapColor BitmapReadAccess::GetPixelForN4BitLsnPal(ConstScanline pScanline, tools::Long nX,
-                                                     const ColorMask&)
-{
-    return BitmapColor((pScanline[nX >> 1] >> (nX & 1 ? 4 : 0)) & 0x0f);
-}
-
-void BitmapReadAccess::SetPixelForN4BitLsnPal(const Scanline pScanline, tools::Long nX,
-                                              const BitmapColor& rBitmapColor, const ColorMask&)
-{
-    sal_uInt8& rByte = pScanline[nX >> 1];
-
-    if (nX & 1)
-    {
-        rByte &= 0x0f;
-        rByte |= (rBitmapColor.GetIndex() << 4);
-    }
-    else
-    {
-        rByte &= 0xf0;
-        rByte |= (rBitmapColor.GetIndex() & 0x0f);
-    }
-}
-
 BitmapColor BitmapReadAccess::GetPixelForN8BitPal(ConstScanline pScanline, tools::Long nX,
                                                   const ColorMask&)
 {
diff --git a/vcl/source/bitmap/BitmapWriteAccess.cxx b/vcl/source/bitmap/BitmapWriteAccess.cxx
index 8d6675ee7ba4..d30477b9f257 100644
--- a/vcl/source/bitmap/BitmapWriteAccess.cxx
+++ b/vcl/source/bitmap/BitmapWriteAccess.cxx
@@ -91,12 +91,6 @@ void BitmapWriteAccess::CopyScanline(tools::Long nY, ConstScanline aSrcScanline,
             case ScanlineFormat::N1BitLsbPal:
                 pFncGetPixel = GetPixelForN1BitLsbPal;
                 break;
-            case ScanlineFormat::N4BitMsnPal:
-                pFncGetPixel = GetPixelForN4BitMsnPal;
-                break;
-            case ScanlineFormat::N4BitLsnPal:
-                pFncGetPixel = GetPixelForN4BitLsnPal;
-                break;
             case ScanlineFormat::N8BitPal:
                 pFncGetPixel = GetPixelForN8BitPal;
                 break;
diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx
index 6acf00fe0cac..201f05e74a79 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -478,51 +478,7 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
             const BitmapColor aTest(pReadAcc->GetBestMatchingColor(rTransColor));
 
             if (pWriteAcc->GetBitCount() == 1
-                && (pReadAcc->GetScanlineFormat() == ScanlineFormat::N4BitMsnPal
-                    || pReadAcc->GetScanlineFormat() == ScanlineFormat::N4BitLsnPal))
-            {
-                // optimized for 4Bit-MSN/LSN source palette
-                const sal_uInt8 cTest = aTest.GetIndex();
-                const tools::Long nShiftInit
-                    = ((pReadAcc->GetScanlineFormat() == ScanlineFormat::N4BitMsnPal) ? 4 : 0);
-
-                if (pWriteAcc->GetScanlineFormat() == ScanlineFormat::N1BitMsbPal
-                    && aWhite.GetIndex() == 1)
-                {
-                    // optimized for 1Bit-MSB destination palette
-                    for (tools::Long nY = 0; nY < nHeight; ++nY)
-                    {
-                        Scanline pSrc = pReadAcc->GetScanline(nY);
-                        Scanline pDst = pWriteAcc->GetScanline(nY);
-                        for (tools::Long nX = 0, nShift = nShiftInit; nX < nWidth;
-                             nX++, nShift ^= 4)
-                        {
-                            if (cTest == ((pSrc[nX >> 1] >> nShift) & 0x0f))
-                                pDst[nX >> 3] |= 1 << (7 - (nX & 7));
-                            else
-                                pDst[nX >> 3] &= ~(1 << (7 - (nX & 7)));
-                        }
-                    }
-                }
-                else
-                {
-                    for (tools::Long nY = 0; nY < nHeight; ++nY)
-                    {
-                        Scanline pSrc = pReadAcc->GetScanline(nY);
-                        Scanline pDst = pWriteAcc->GetScanline(nY);
-                        for (tools::Long nX = 0, nShift = nShiftInit; nX < nWidth;
-                             nX++, nShift ^= 4)
-                        {
-                            if (cTest == ((pSrc[nX >> 1] >> nShift) & 0x0f))
-                                pWriteAcc->SetPixelOnData(pDst, nX, aWhite);
-                            else
-                                pWriteAcc->SetPixelOnData(pDst, nX, aBlack);
-                        }
-                    }
-                }
-            }
-            else if (pWriteAcc->GetBitCount() == 1
-                     && pReadAcc->GetScanlineFormat() == ScanlineFormat::N8BitPal)
+                && pReadAcc->GetScanlineFormat() == ScanlineFormat::N8BitPal)
             {
                 // optimized for 8Bit source palette
                 const sal_uInt8 cTest = aTest.GetIndex();
diff --git a/vcl/source/bitmap/bmpfast.cxx b/vcl/source/bitmap/bmpfast.cxx
index 1d8515762320..5ee7b22d9ddf 100644
--- a/vcl/source/bitmap/bmpfast.cxx
+++ b/vcl/source/bitmap/bmpfast.cxx
@@ -335,8 +335,6 @@ static bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc
     {
         case ScanlineFormat::N1BitMsbPal:
         case ScanlineFormat::N1BitLsbPal:
-        case ScanlineFormat::N4BitMsnPal:
-        case ScanlineFormat::N4BitLsnPal:
         case ScanlineFormat::N8BitPal:
             break;
 
@@ -422,8 +420,6 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
     {
         case ScanlineFormat::N1BitMsbPal:
         case ScanlineFormat::N1BitLsbPal:
-        case ScanlineFormat::N4BitMsnPal:
-        case ScanlineFormat::N4BitLsnPal:
             break;
 
         case ScanlineFormat::N32BitTcMask:
@@ -642,8 +638,6 @@ static bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, c
     {
         case ScanlineFormat::N1BitMsbPal:
         case ScanlineFormat::N1BitLsbPal:
-        case ScanlineFormat::N4BitMsnPal:
-        case ScanlineFormat::N4BitLsnPal:
         case ScanlineFormat::N8BitPal:
             break;
 
@@ -735,8 +729,6 @@ bool ImplFastBitmapBlending( BitmapWriteAccess const & rDstWA,
     {
         case ScanlineFormat::N1BitMsbPal:
         case ScanlineFormat::N1BitLsbPal:
-        case ScanlineFormat::N4BitMsnPal:
-        case ScanlineFormat::N4BitLsnPal:
             break;
 
         case ScanlineFormat::N32BitTcMask:
@@ -787,12 +779,6 @@ bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
             nFillByte = rColor.GetIndex();
             nFillByte = static_cast<sal_uInt8>( -(nFillByte & 1) ); // 0x00 or 0xFF
             break;
-        case ScanlineFormat::N4BitMsnPal:
-        case ScanlineFormat::N4BitLsnPal:
-            nFillByte = rColor.GetIndex();
-            nFillByte &= 0x0F;
-            nFillByte |= (nFillByte << 4);
-            break;
         case ScanlineFormat::N8BitPal:
             nFillByte = rColor.GetIndex();
             break;
diff --git a/vcl/source/bitmap/dibtools.cxx b/vcl/source/bitmap/dibtools.cxx
index a4cd7bcd8404..94341bad56f6 100644
--- a/vcl/source/bitmap/dibtools.cxx
+++ b/vcl/source/bitmap/dibtools.cxx
@@ -1291,7 +1291,6 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess const & rAcc, BitmapRead
         switch(rAcc.GetScanlineFormat())
         {
             case ScanlineFormat::N1BitMsbPal:
-            case ScanlineFormat::N4BitMsnPal:
             case ScanlineFormat::N8BitPal:
             case ScanlineFormat::N24BitTcBgr:
             {
diff --git a/vcl/source/bitmap/salbmp.cxx b/vcl/source/bitmap/salbmp.cxx
index 7159ac3d5a6b..a1fc7de7a60a 100644
--- a/vcl/source/bitmap/salbmp.cxx
+++ b/vcl/source/bitmap/salbmp.cxx
@@ -63,14 +63,6 @@ void SalBitmap::updateChecksum() const
                     extraBitsMask = mask1Bit[ extraBitsCount ];
                     break;
                 }
-                case ScanlineFormat::N4BitMsnPal:
-                    assert(extraBitsCount == 4);
-                    extraBitsMask = 0xf0;
-                    break;
-                case ScanlineFormat::N4BitLsnPal:
-                    assert(extraBitsCount == 4);
-                    extraBitsMask = 0x0f;
-                    break;
                 default:
                     break;
             }
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 593b2b706888..037ea8073bae 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -114,26 +114,6 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rD
             DOUBLE_SCANLINES();
         }
     }
-    else if( RemoveScanline( rSrcBuffer.mnFormat ) == ScanlineFormat::N4BitMsnPal )
-    {
-        tools::Long nMapX;
-
-        for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
-        {
-            tools::Long nMapY = pMapY[nActY];
-            Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
-
-            for (tools::Long nX = 0; nX < rDstBuffer.mnWidth;)
-            {
-                nMapX = pMapX[ nX ];
-                pFncSetPixel( pDstScan, nX++,
-                              pColBuf[ ( pSrcScan[ nMapX >> 1 ] >> ( nMapX & 1 ? 0 : 4 ) ) & 0x0f ],
-                              rDstMask );
-            }
-
-            DOUBLE_SCANLINES();
-        }
-    }
     else if( RemoveScanline( rSrcBuffer.mnFormat ) == ScanlineFormat::N8BitPal )
     {
         for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
@@ -271,8 +251,6 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
     {
         IMPL_CASE_SET_FORMAT( N1BitMsbPal, 1 );
         IMPL_CASE_SET_FORMAT( N1BitLsbPal, 1 );
-        IMPL_CASE_SET_FORMAT( N4BitMsnPal, 1 );
-        IMPL_CASE_SET_FORMAT( N4BitLsnPal, 4 );
         IMPL_CASE_SET_FORMAT( N8BitPal, 8 );
         IMPL_CASE_SET_FORMAT( N24BitTcBgr, 24 );
         IMPL_CASE_SET_FORMAT( N24BitTcRgb, 24 );
@@ -325,8 +303,6 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
     // do we need a destination palette or color mask?
     if( ( nDstScanlineFormat == ScanlineFormat::N1BitMsbPal ) ||
         ( nDstScanlineFormat == ScanlineFormat::N1BitLsbPal ) ||
-        ( nDstScanlineFormat == ScanlineFormat::N4BitMsnPal ) ||
-        ( nDstScanlineFormat == ScanlineFormat::N4BitLsnPal ) ||
         ( nDstScanlineFormat == ScanlineFormat::N8BitPal ) )
     {
         assert(pDstPal && "destination buffer requires palette");
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 97a1293bfad7..67d01fb64336 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -152,20 +152,6 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
             m_aLayout.IsMsbFirst = false;
             break;
 
-        case ScanlineFormat::N4BitMsnPal:
-            m_bPalette           = true;
-            m_nBitsPerInputPixel = 4;
-            m_nEndianness        = util::Endianness::LITTLE; // doesn't matter
-            m_aLayout.IsMsbFirst = true;
-            break;
-
-        case ScanlineFormat::N4BitLsnPal:
-            m_bPalette           = true;
-            m_nBitsPerInputPixel = 4;
-            m_nEndianness        = util::Endianness::LITTLE; // doesn't matter
-            m_aLayout.IsMsbFirst = false;
-            break;
-
         case ScanlineFormat::N8BitPal:
             m_bPalette           = true;
             m_nBitsPerInputPixel = 8;
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 4c25000ec13c..4579fcfe7bdf 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -151,9 +151,9 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
     switch( nBitCount )
     {
         case 1: pDIB->mnFormat |= ScanlineFormat::N1BitMsbPal; break;
-        case 4: pDIB->mnFormat |= ScanlineFormat::N4BitMsnPal; break;
         case 8: pDIB->mnFormat |= ScanlineFormat::N8BitPal; break;
         case 24: pDIB->mnFormat |= ScanlineFormat::N24BitTcBgr; break;
+        case 4: assert(false); break;
         default:
             SAL_WARN("vcl.gdi", "32-bit images not supported, converting to 24-bit");
             nBitCount = 24;
@@ -254,15 +254,6 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
                 }
                 break;
 
-                case 4:
-                {
-                    aSrcBuf.mnFormat |= ( LSBFirst == pImage->bitmap_bit_order
-                                            ? ScanlineFormat::N4BitLsnPal
-                                            : ScanlineFormat::N4BitMsnPal
-                                        );
-                }
-                break;
-
                 case 8:
                 {
                     aSrcBuf.mnFormat |= ScanlineFormat::N8BitPal;
@@ -400,13 +391,6 @@ XImage* X11SalBitmap::ImplCreateXImage(
                                     );
                 break;
 
-                case 4:
-                    nDstFormat |=   ( LSBFirst == pImage->bitmap_bit_order
-                                        ? ScanlineFormat::N4BitLsnPal
-                                        : ScanlineFormat::N4BitMsnPal
-                                    );
-                break;
-
                 case 8:
                     nDstFormat |= ScanlineFormat::N8BitPal;
                 break;
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index e807a2faef61..67ce7b381536 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -829,7 +829,6 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
             pBuffer.reset(new BitmapBuffer);
 
             pBuffer->mnFormat = pBIH->biBitCount == 1 ? ScanlineFormat::N1BitMsbPal :
-                                pBIH->biBitCount == 4 ? ScanlineFormat::N4BitMsnPal :
                                 pBIH->biBitCount == 8 ? ScanlineFormat::N8BitPal :
                                 pBIH->biBitCount == 24 ? ScanlineFormat::N24BitTcBgr :
                                 pBIH->biBitCount == 32 ? ScanlineFormat::N32BitTcMask :


More information about the Libreoffice-commits mailing list