vcl/source/gdi/bitmap3.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 3f28fd9a4093de421ea92ddcf7e8cda65f65a3f0 Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Thu Dec 17 05:34:37 2020 +1100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Dec 18 11:48:13 2020 +0100 vcl: move nShift closer into scope where it is used Change-Id: If85e013269b39e1d8d34653a1348d080d34eba99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107851 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index a2c50583a2b4..e037c0c38c99 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -343,7 +343,6 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) if( pReadAcc ) { const BitmapPalette& rPal = GetGreyPalette( nGreys ); - sal_uLong nShift = ( ( nGreys == 16 ) ? 4UL : 0UL ); bool bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() ); if( !bPalDiffers ) @@ -359,6 +358,8 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) const tools::Long nWidth = pWriteAcc->Width(); const tools::Long nHeight = pWriteAcc->Height(); + sal_uLong nShift = ((nGreys == 16) ? 4UL : 0UL); + if( pReadAcc->HasPalette() ) { for( tools::Long nY = 0; nY < nHeight; nY++ ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits