vcl/inc/win/salbmp.h   |    2 +-
 vcl/win/gdi/salbmp.cxx |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2da756e0a8877a1cfce5d7c0841ea609eae4e35e
Author:     Noel Grandin <noelgran...@collabora.co.uk>
AuthorDate: Tue Jan 21 07:58:34 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Jan 21 08:17:34 2025 +0100

    avoid some casting in WinSalBitmap
    
    Change-Id: I0f18baf52131f229edb5be4bab723e954ba36cab
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180532
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
index 2edf291342cc..89135570d661 100644
--- a/vcl/inc/win/salbmp.h
+++ b/vcl/inc/win/salbmp.h
@@ -67,7 +67,7 @@ public:
 
 public:
 
-    bool                        Create( HANDLE hBitmap );
+    bool                        Create( HBITMAP 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/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 9110e02e2923..b8982013db3e 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -429,11 +429,11 @@ std::shared_ptr<Gdiplus::Bitmap> 
WinSalBitmap::ImplCreateGdiPlusBitmap(const Win
     return pRetval;
 }
 
-bool WinSalBitmap::Create( HANDLE hBitmap )
+bool WinSalBitmap::Create( HBITMAP hBitmap )
 {
     bool bRet = true;
 
-    mhDDB = static_cast<HBITMAP>( hBitmap );
+    mhDDB = hBitmap;
 
     if( mhDIB )
     {
@@ -620,7 +620,7 @@ bool WinSalBitmap::Create( const css::uno::Reference< 
css::rendering::XBitmapCan
             sal_Int64 aHBmp64;
 
             if( args[0] >>= aHBmp64 ) {
-                return Create( reinterpret_cast<HANDLE>(aHBmp64) );
+                return Create( reinterpret_cast<HBITMAP>(aHBmp64) );
             }
         }
     }

Reply via email to