summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2025-01-20 21:08:44 +0200
committerNoel Grandin <noelgrandin@gmail.com>2025-01-21 06:20:18 +0100
commit5b4b4c0e691ede48f50725f4f174a0e1ac7b3668 (patch)
tree2678a57558ff4adaf12de97bf2ab3cfda798da29 /vcl
parentf1bdc5b77406fadb97c9a54f0a06d5cafbdf0371 (diff)
dont store wrong bitcount in WinSalBitmap
There is no point in lying to ourselves and saving a different bitcount from the one that is actually reported. This code dates back to "initial import" so no idea why it tries to do this. Change-Id: Ia5a88d28c85436b67b0225dbc81d83e74a1d3218 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/gdi/salbmp.cxx10
1 files changed, 0 insertions, 10 deletions
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 780f91ee8fdb..9110e02e2923 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -442,9 +442,6 @@ bool WinSalBitmap::Create( HANDLE hBitmap )
maSize = Size( pBIH->biWidth, pBIH->biHeight );
mnBitCount = pBIH->biBitCount;
- if( mnBitCount )
- mnBitCount = ( mnBitCount <= 1 ) ? 1 : ( mnBitCount <= 4 ) ? 4 : ( mnBitCount <= 8 ) ? 8 : 24;
-
GlobalUnlock( mhDIB );
}
else
@@ -458,13 +455,6 @@ bool WinSalBitmap::Create( HANDLE hBitmap )
{
maSize = Size( aDDBInfo.bmWidth, aDDBInfo.bmHeight );
mnBitCount = aDDBInfo.bmPlanes * aDDBInfo.bmBitsPixel;
-
- if( mnBitCount )
- {
- mnBitCount = ( mnBitCount <= 1 ) ? 1 :
- ( mnBitCount <= 4 ) ? 4 :
- ( mnBitCount <= 8 ) ? 8 : 24;
- }
}
else
{