vcl/win/gdi/salbmp.cxx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-)
New commits: commit e7befa23eacd46607afdf1363d9aaa93a589f547 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jan 24 11:36:51 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jan 24 12:20:59 2025 +0100 remove remnants of 1-bit bitmap support dead since commit 21734247d58a6e915b058d8fa55ece949d049613 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Jan 10 12:56:58 2023 +0200 drop internal support for 1-bit images Change-Id: I755423e339dac797abc726012cfb96d27b8f15fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index d2f6fdbd265e..e88a366d2d75 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -514,20 +514,10 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) WinSalGraphics* pGraphics = static_cast<WinSalGraphics*>(pSGraphics); HDC hDC = pGraphics->getHDC(); - HBITMAP hNewDDB; BITMAP aDDBInfo; PBYTE pBits = reinterpret_cast<PBYTE>(pBI) + pBI->bmiHeader.biSize + - ImplGetDIBColorCount( rSalBmp.mhDIB ) * sizeof( RGBQUAD ); - - if( pBI->bmiHeader.biBitCount == 1 ) - { - hNewDDB = CreateBitmap( pBI->bmiHeader.biWidth, pBI->bmiHeader.biHeight, 1, 1, nullptr ); - - if( hNewDDB ) - SetDIBits( hDC, hNewDDB, 0, pBI->bmiHeader.biHeight, pBits, pBI, DIB_RGB_COLORS ); - } - else - hNewDDB = CreateDIBitmap( hDC, &pBI->bmiHeader, CBM_INIT, pBits, pBI, DIB_RGB_COLORS ); + ImplGetDIBColorCount( rSalBmp.mhDIB ) * sizeof( RGBQUAD ); + HBITMAP hNewDDB = CreateDIBitmap( hDC, &pBI->bmiHeader, CBM_INIT, pBits, pBI, DIB_RGB_COLORS ); GlobalUnlock( rSalBmp.mhDIB ); @@ -773,11 +763,11 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ ) { pBuffer.reset(new BitmapBuffer); - pBuffer->meFormat = pBIH->biBitCount == 1 ? ScanlineFormat::N1BitMsbPal : - pBIH->biBitCount == 8 ? ScanlineFormat::N8BitPal : + pBuffer->meFormat = pBIH->biBitCount == 8 ? ScanlineFormat::N8BitPal : pBIH->biBitCount == 24 ? ScanlineFormat::N24BitTcBgr : pBIH->biBitCount == 32 ? ScanlineFormat::N32BitTcMask : ScanlineFormat::NONE; + assert (pBuffer->meFormat != ScanlineFormat::NONE); if (pBuffer->meFormat != ScanlineFormat::NONE) {