[Libreoffice-commits] core.git: vcl/inc vcl/win

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 19 16:39:50 UTC 2021


 vcl/inc/win/salbmp.h    |    2 +-
 vcl/win/gdi/gdiimpl.cxx |    2 +-
 vcl/win/gdi/salbmp.cxx  |    9 +++------
 3 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 4bb0afe359a92df09ad5b61b66bc4cb3562aca1e
Author:     Noel Grandin <noel at peralex.com>
AuthorDate: Mon Apr 19 14:59:23 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Apr 19 18:39:00 2021 +0200

    remove dead code from WinSalBitmap::Create
    
    Change-Id: I345bfba23d6041a631664f5e1dbbe27cd8ba0290
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114271
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
index d48203840b76..c8fe3d851011 100644
--- a/vcl/inc/win/salbmp.h
+++ b/vcl/inc/win/salbmp.h
@@ -63,7 +63,7 @@ public:
 
 public:
 
-    bool                        Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle );
+    bool                        Create( HANDLE hBitmap );
     virtual bool                Create( const Size& rSize, vcl::PixelFormat ePixelFormat, const BitmapPalette& rPal ) override;
     virtual bool                Create( const SalBitmap& rSalBmpImpl ) override;
     virtual bool                Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics ) override;
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index d67e04be765f..2c418732561b 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -820,7 +820,7 @@ std::shared_ptr<SalBitmap> WinSalGraphicsImpl::getBitmap( tools::Long nX, tools:
     {
         pSalBitmap = std::make_shared<WinSalBitmap>();
 
-        if( !pSalBitmap->Create( hBmpBitmap, false, false ) )
+        if( !pSalBitmap->Create( hBmpBitmap ) )
         {
             pSalBitmap.reset();
         }
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index ed35d7b6d3da..0218ca408eec 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -459,14 +459,11 @@ std::shared_ptr<Gdiplus::Bitmap> WinSalBitmap::ImplCreateGdiPlusBitmap(const Win
     return pRetval;
 }
 
-bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle )
+bool WinSalBitmap::Create( HANDLE hBitmap )
 {
     bool bRet = true;
 
-    if( bDIB )
-        mhDIB = static_cast<HGLOBAL>( bCopyHandle ? ImplCopyDIBOrDDB( hBitmap, true ) : hBitmap );
-    else
-        mhDDB = static_cast<HBITMAP>( bCopyHandle ? ImplCopyDIBOrDDB( hBitmap, false ) : hBitmap );
+    mhDDB = static_cast<HBITMAP>( hBitmap );
 
     if( mhDIB )
     {
@@ -656,7 +653,7 @@ bool WinSalBitmap::Create( const css::uno::Reference< css::rendering::XBitmapCan
             sal_Int64 aHBmp64;
 
             if( args[0] >>= aHBmp64 ) {
-                return Create( reinterpret_cast<HANDLE>(aHBmp64), false, false );
+                return Create( reinterpret_cast<HANDLE>(aHBmp64) );
             }
         }
     }


More information about the Libreoffice-commits mailing list