diff options
author | Noel Grandin <noel@peralex.com> | 2021-04-19 14:59:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-19 18:39:00 +0200 |
commit | 4bb0afe359a92df09ad5b61b66bc4cb3562aca1e (patch) | |
tree | 8a2d73f600d1a6dac21b9a5c2deecd46aa6be10f /vcl/win | |
parent | da3d3fad1515348b6c4f2303db83ec03594f0597 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/gdiimpl.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salbmp.cxx | 9 |
2 files changed, 4 insertions, 7 deletions
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) ); } } } |