[Libreoffice-commits] core.git: 2 commits - canvas/source include/vcl vcl/source

Noel (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 5 06:53:23 UTC 2020


 canvas/source/directx/dx_vcltools.cxx |    5 +----
 include/vcl/Scanline.hxx              |    3 +--
 include/vcl/bitmapaccess.hxx          |    2 --
 include/vcl/event.hxx                 |    3 +--
 vcl/source/bitmap/BitmapTools.cxx     |   10 ----------
 vcl/source/gdi/bmpacc.cxx             |    8 +-------
 vcl/source/gdi/bmpacc2.cxx            |   13 -------------
 vcl/source/gdi/bmpfast.cxx            |    9 ---------
 vcl/source/gdi/salmisc.cxx            |    4 +---
 vcl/source/helper/canvasbitmap.cxx    |   10 ----------
 vcl/source/outdev/bitmap.cxx          |    3 +--
 vcl/source/window/window.cxx          |    8 --------
 12 files changed, 6 insertions(+), 72 deletions(-)

New commits:
commit 4388ce8614ee720244697e44c1f056b597273913
Author:     Noel <noelgrandin at gmail.com>
AuthorDate: Wed Nov 4 20:04:26 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 5 07:52:48 2020 +0100

    INPUTENABLE is unused
    
    since
        commit be3b1a8393ca3e77f31bea5d9caa7271fd53e9e4
        Author: Caolán McNamara <caolanm at redhat.com>
        Date:   Mon Aug 17 17:28:58 2020 +0100
        weld OAppDetailPageHelper
    
    Change-Id: I97afdbd536c587a360b8f72b9faca71e8fa32ba3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105306
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index 88cd3018b4e1..9173ce0e7d00 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -284,8 +284,7 @@ enum class MouseNotifyEvent
     KEYUP            = 5,
     GETFOCUS         = 6,
     LOSEFOCUS        = 7,
-    COMMAND          = 8,
-    INPUTENABLE      = 10
+    COMMAND          = 8
 };
 
 class VCL_DLLPUBLIC NotifyEvent
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 2d9cfd5966cd..5e079161e492 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2490,7 +2490,6 @@ void Window::EnableInput( bool bEnable, bool bChild )
     if (!mpWindowImpl)
         return;
 
-    bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled);
     if ( mpWindowImpl->mpBorderWindow )
     {
         mpWindowImpl->mpBorderWindow->EnableInput( bEnable, false );
@@ -2538,13 +2537,6 @@ void Window::EnableInput( bool bEnable, bool bChild )
 
     if ( IsReallyVisible() )
         ImplGenerateMouseMove();
-
-    // #104827# notify parent
-    if ( bNotify && bEnable )
-    {
-        NotifyEvent aNEvt( MouseNotifyEvent::INPUTENABLE, this );
-        CompatNotify( aNEvt );
-    }
 }
 
 void Window::EnableInput( bool bEnable, const vcl::Window* pExcludeWindow )
commit b45b18cec479cf89241b8d5b11a66f22f9fe3165
Author:     Noel <noelgrandin at gmail.com>
AuthorDate: Wed Nov 4 19:46:49 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 5 07:52:40 2020 +0100

    N8BitTcMask is unused
    
    since
        commit 77809fba7d4bf5e0b604ffa3937c18d5530c2d56
        Author: Luboš Luňák <l.lunak at collabora.com>
        Date:   Fri Oct 9 19:28:49 2020 +0200
        implement ImplFastBitmapConversion() for 8bit gray source
    
    Change-Id: I730aef10c1705ae6d3141014228cf79b8bfa3c63
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105305
    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 b7eb0570e48a..6309ebaaacb3 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -191,8 +191,7 @@ namespace dxcanvas::tools
                                       "::dxcanvas::tools::bitmapFromVCLBitmapEx(): "
                                       "Unable to acquire read access to alpha" );
 
-                    ENSURE_OR_THROW( pAlphaReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal ||
-                                      pAlphaReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitTcMask,
+                    ENSURE_OR_THROW( pAlphaReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal,
                                       "::dxcanvas::tools::bitmapFromVCLBitmapEx(): "
                                       "Unsupported alpha scanline format" );
 
@@ -275,7 +274,6 @@ namespace dxcanvas::tools
 
                             case ScanlineFormat::N1BitLsbPal:
                             case ScanlineFormat::N4BitLsnPal:
-                            case ScanlineFormat::N8BitTcMask:
                             case ScanlineFormat::N24BitTcRgb:
                             case ScanlineFormat::N32BitTcAbgr:
                             case ScanlineFormat::N32BitTcArgb:
@@ -410,7 +408,6 @@ namespace dxcanvas::tools
 
                             case ScanlineFormat::N1BitLsbPal:
                             case ScanlineFormat::N4BitLsnPal:
-                            case ScanlineFormat::N8BitTcMask:
                             case ScanlineFormat::N24BitTcRgb:
                             case ScanlineFormat::N32BitTcAbgr:
                             case ScanlineFormat::N32BitTcArgb:
diff --git a/include/vcl/Scanline.hxx b/include/vcl/Scanline.hxx
index 839130e38141..707ee41fa9cd 100644
--- a/include/vcl/Scanline.hxx
+++ b/include/vcl/Scanline.hxx
@@ -35,7 +35,6 @@ enum class ScanlineFormat {
     N4BitLsnPal       = 0x00000008,
 
     N8BitPal          = 0x00000010,
-    N8BitTcMask       = 0x00000020,
 
     N24BitTcBgr       = 0x00000100,
     N24BitTcRgb       = 0x00000200,
@@ -51,7 +50,7 @@ enum class ScanlineFormat {
 
 namespace o3tl
 {
-    template<> struct typed_flags<ScanlineFormat> : is_typed_flags<ScanlineFormat, 0x0001fb3f> {};
+    template<> struct typed_flags<ScanlineFormat> : is_typed_flags<ScanlineFormat, 0x0001fb1f> {};
 }
 
 inline ScanlineFormat RemoveScanline(ScanlineFormat nFormat)
diff --git a/include/vcl/bitmapaccess.hxx b/include/vcl/bitmapaccess.hxx
index 439228b2451e..12304d96ff86 100644
--- a/include/vcl/bitmapaccess.hxx
+++ b/include/vcl/bitmapaccess.hxx
@@ -244,7 +244,6 @@ public:
     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 GetPixelForN8BitTcMask(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
     static BitmapColor GetPixelForN24BitTcBgr(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
     static BitmapColor GetPixelForN24BitTcRgb(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
     static BitmapColor GetPixelForN32BitTcAbgr(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
@@ -262,7 +261,6 @@ public:
     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 SetPixelForN8BitTcMask(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN24BitTcBgr(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN24BitTcRgb(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN32BitTcAbgr(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index 6ec56ee09138..2fc8b1c96386 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -662,16 +662,6 @@ static bool readAlpha( BitmapReadAccess const * pAlphaReadAcc, tools::Long nY, c
 
     switch( pAlphaReadAcc->GetScanlineFormat() )
     {
-        case ScanlineFormat::N8BitTcMask:
-            pReadScan = pAlphaReadAcc->GetScanline( nY );
-            for( nX = 0; nX < nWidth; nX++ )
-            {
-                nAlpha = data[ nOff ] = 255 - ( *pReadScan++ );
-                if( nAlpha != 255 )
-                    bIsAlpha = true;
-                nOff += 4;
-            }
-            break;
         case ScanlineFormat::N8BitPal:
             pReadScan = pAlphaReadAcc->GetScanline( nY );
             for( nX = 0; nX < nWidth; nX++ )
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index b4883c983303..18c5769678c5 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -133,8 +133,6 @@ FncGetPixel BitmapReadAccess::GetPixelFunction( ScanlineFormat nFormat )
             return GetPixelForN4BitLsnPal;
         case ScanlineFormat::N8BitPal:
             return GetPixelForN8BitPal;
-        case ScanlineFormat::N8BitTcMask:
-            return GetPixelForN8BitTcMask;
         case ScanlineFormat::N24BitTcBgr:
             return GetPixelForN24BitTcBgr;
         case ScanlineFormat::N24BitTcRgb:
@@ -181,8 +179,6 @@ FncSetPixel BitmapReadAccess::SetPixelFunction( ScanlineFormat nFormat )
             return SetPixelForN4BitLsnPal;
         case ScanlineFormat::N8BitPal:
             return SetPixelForN8BitPal;
-        case ScanlineFormat::N8BitTcMask:
-            return SetPixelForN8BitTcMask;
         case ScanlineFormat::N24BitTcBgr:
             return SetPixelForN24BitTcBgr;
         case ScanlineFormat::N24BitTcRgb:
@@ -378,8 +374,7 @@ void BitmapWriteAccess::CopyScanline( tools::Long nY, ConstScanline aSrcScanline
         if(ImplFastCopyScanline( nY, *ImplGetBitmapBuffer(), aSrcScanline, nSrcScanlineFormat, nSrcScanlineSize ))
             return;
 
-        DBG_ASSERT( nFormat != ScanlineFormat::N8BitTcMask &&
-                    nFormat != ScanlineFormat::N32BitTcMask,
+        DBG_ASSERT( nFormat != ScanlineFormat::N32BitTcMask,
                     "No support for pixel formats with color masks yet!" );
         FncGetPixel pFncGetPixel;
         switch( nFormat )
@@ -389,7 +384,6 @@ void BitmapWriteAccess::CopyScanline( tools::Long nY, ConstScanline aSrcScanline
             case ScanlineFormat::N4BitMsnPal:    pFncGetPixel = GetPixelForN4BitMsnPal; break;
             case ScanlineFormat::N4BitLsnPal:    pFncGetPixel = GetPixelForN4BitLsnPal; break;
             case ScanlineFormat::N8BitPal:        pFncGetPixel = GetPixelForN8BitPal; break;
-            case ScanlineFormat::N8BitTcMask:    pFncGetPixel = GetPixelForN8BitTcMask; break;
             case ScanlineFormat::N24BitTcBgr:    pFncGetPixel = GetPixelForN24BitTcBgr; break;
             case ScanlineFormat::N24BitTcRgb:    pFncGetPixel = GetPixelForN24BitTcRgb; break;
             case ScanlineFormat::N32BitTcAbgr:
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index f4ee4e34b278..88f0c7f7482b 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -102,19 +102,6 @@ void BitmapReadAccess::SetPixelForN8BitPal(Scanline pScanline, tools::Long nX, c
     pScanline[ nX ] = rBitmapColor.GetIndex();
 }
 
-BitmapColor BitmapReadAccess::GetPixelForN8BitTcMask(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask)
-{
-    BitmapColor aColor;
-    rMask.GetColorFor8Bit( aColor, pScanline + nX );
-    return aColor;
-}
-
-void BitmapReadAccess::SetPixelForN8BitTcMask(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
-{
-    rMask.SetColorFor8Bit( rBitmapColor, pScanline + nX );
-}
-
-
 BitmapColor BitmapReadAccess::GetPixelForN24BitTcBgr(ConstScanline pScanline, tools::Long nX, const ColorMask&)
 {
     BitmapColor aBitmapColor;
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index b39ca1fe6a34..a1f9927bf626 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -340,8 +340,6 @@ static bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc
         case ScanlineFormat::N8BitPal:
             break;
 
-        case ScanlineFormat::N8BitTcMask:
-//            return ImplConvertToBitmap<ScanlineFormat::N8BitTcMask>( aSrcType, rDst, rSrc );
         case ScanlineFormat::N32BitTcMask:
 //            return ImplConvertToBitmap<ScanlineFormat::N32BitTcMask>( aSrcType, rDst, rSrc );
             break;
@@ -428,8 +426,6 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
         case ScanlineFormat::N4BitLsnPal:
             break;
 
-        case ScanlineFormat::N8BitTcMask:
-//            return ImplConvertFromBitmap<ScanlineFormat::N8BitTcMask>( rDst, rSrc );
         case ScanlineFormat::N32BitTcMask:
 //            return ImplConvertFromBitmap<ScanlineFormat::N32BitTcMask>( rDst, rSrc );
             break;
@@ -651,8 +647,6 @@ static bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, c
         case ScanlineFormat::N8BitPal:
             break;
 
-        case ScanlineFormat::N8BitTcMask:
-//            return ImplBlendToBitmap<ScanlineFormat::N8BitTcMask>( aSrcType, rDst, rSrc, rMsk );
         case ScanlineFormat::N32BitTcMask:
 //            return ImplBlendToBitmap<ScanlineFormat::N32BitTcMask>( aSrcType, rDst, rSrc, rMsk );
             break;
@@ -745,8 +739,6 @@ bool ImplFastBitmapBlending( BitmapWriteAccess const & rDstWA,
         case ScanlineFormat::N4BitLsnPal:
             break;
 
-        case ScanlineFormat::N8BitTcMask:
-//            return ImplBlendFromBitmap<ScanlineFormat::N8BitTcMask>( rDst, rSrc );
         case ScanlineFormat::N32BitTcMask:
 //            return ImplBlendFromBitmap<ScanlineFormat::N32BitTcMask>( rDst, rSrc );
             break;
@@ -802,7 +794,6 @@ bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
             nFillByte |= (nFillByte << 4);
             break;
         case ScanlineFormat::N8BitPal:
-        case ScanlineFormat::N8BitTcMask:
             nFillByte = rColor.GetIndex();
             break;
 
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 1bb094291e86..aa9220b53136 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -284,7 +284,6 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
         IMPL_CASE_SET_FORMAT( N4BitMsnPal, 1 );
         IMPL_CASE_SET_FORMAT( N4BitLsnPal, 4 );
         IMPL_CASE_SET_FORMAT( N8BitPal, 8 );
-        IMPL_CASE_SET_FORMAT( N8BitTcMask, 8 );
         IMPL_CASE_SET_FORMAT( N24BitTcBgr, 24 );
         IMPL_CASE_SET_FORMAT( N24BitTcRgb, 24 );
         IMPL_CASE_SET_FORMAT( N32BitTcAbgr, 32 );
@@ -347,8 +346,7 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
         }
         pDstBuffer->maPalette = *pDstPal;
     }
-    else if( ( nDstScanlineFormat == ScanlineFormat::N8BitTcMask ) ||
-             ( nDstScanlineFormat == ScanlineFormat::N32BitTcMask ) )
+    else if(nDstScanlineFormat == ScanlineFormat::N32BitTcMask )
     {
         assert(pDstMask && "destination buffer requires color mask");
         if (!pDstMask)
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 8ca8ffc638d1..b323c8654a59 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -173,16 +173,6 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
             m_aLayout.IsMsbFirst = false; // doesn't matter
             break;
 
-        case ScanlineFormat::N8BitTcMask:
-            m_bPalette           = false;
-            m_nBitsPerInputPixel = 8;
-            m_nEndianness        = util::Endianness::LITTLE; // doesn't matter
-            m_aLayout.IsMsbFirst = false; // doesn't matter
-            setComponentInfo( m_pBmpAcc->GetColorMask().GetRedMask(),
-                              m_pBmpAcc->GetColorMask().GetGreenMask(),
-                              m_pBmpAcc->GetColorMask().GetBlueMask() );
-            break;
-
         case ScanlineFormat::N24BitTcBgr:
             m_bPalette           = false;
             m_nBitsPerInputPixel = 24;
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 6ba48c1699d5..ad25020a620e 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -989,8 +989,7 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap,
     Bitmap::ScopedReadAccess pBitmapReadAccess(const_cast<Bitmap&>(rBitmap));
     AlphaMask::ScopedReadAccess pAlphaReadAccess(const_cast<AlphaMask&>(rAlpha));
 
-    DBG_ASSERT( pAlphaReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal ||
-                pAlphaReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitTcMask,
+    DBG_ASSERT( pAlphaReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal,
                 "OutputDevice::ImplDrawAlpha(): non-8bit alpha no longer supported!" );
 
     // #i38887# reading from screen may sometimes fail


More information about the Libreoffice-commits mailing list