summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap/bitmap.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-14 09:33:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-17 16:49:38 +0200
commit988e2827319fa2fe04bb818880c1f381bd08a314 (patch)
treee69666af2902daa2fe46d946971e3bd48b547af1 /vcl/source/bitmap/bitmap.cxx
parent7852fdc1ae87434e06bbbfd05a349c4624fbfd50 (diff)
loplugin:constantparam
Change-Id: I1d518bef47c838d03d8526a6a8fffd36d2ee68d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/bitmap/bitmap.cxx')
-rw-r--r--vcl/source/bitmap/bitmap.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index 7bf272225d6c..99b8d10e9ef7 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -991,7 +991,7 @@ bool Bitmap::Convert( BmpConversion eConversion )
if( nBitCount < 8 )
bRet = ImplConvertUp(vcl::PixelFormat::N8_BPP);
else if( nBitCount > 8 )
- bRet = ImplConvertDown(vcl::PixelFormat::N8_BPP);
+ bRet = ImplConvertDown8BPP();
else
bRet = true;
}
@@ -1004,7 +1004,7 @@ bool Bitmap::Convert( BmpConversion eConversion )
if( nBitCount < 8 )
bRet = ImplConvertUp(vcl::PixelFormat::N8_BPP, &aTrans );
else
- bRet = ImplConvertDown(vcl::PixelFormat::N8_BPP, &aTrans );
+ bRet = ImplConvertDown8BPP(&aTrans );
}
break;
@@ -1240,9 +1240,9 @@ bool Bitmap::ImplConvertUp(vcl::PixelFormat ePixelFormat, Color const * pExtColo
return bRet;
}
-bool Bitmap::ImplConvertDown(vcl::PixelFormat ePixelFormat, Color const * pExtColor)
+bool Bitmap::ImplConvertDown8BPP(Color const * pExtColor)
{
- SAL_WARN_IF(ePixelFormat > getPixelFormat(), "vcl", "New pixelformat must be lower ( or equal when pExtColor is set )!");
+ SAL_WARN_IF(vcl::PixelFormat::N8_BPP > getPixelFormat(), "vcl", "New pixelformat must be lower ( or equal when pExtColor is set )!");
Bitmap::ScopedReadAccess pReadAcc(*this);
bool bRet = false;
@@ -1250,12 +1250,12 @@ bool Bitmap::ImplConvertDown(vcl::PixelFormat ePixelFormat, Color const * pExtCo
if (pReadAcc)
{
BitmapPalette aPalette;
- Bitmap aNewBmp(GetSizePixel(), ePixelFormat, &aPalette);
+ Bitmap aNewBmp(GetSizePixel(), vcl::PixelFormat::N8_BPP, &aPalette);
BitmapScopedWriteAccess pWriteAcc(aNewBmp);
if (pWriteAcc)
{
- sal_Int16 nNewBitCount = sal_Int16(ePixelFormat);
+ sal_Int16 nNewBitCount = sal_Int16(vcl::PixelFormat::N8_BPP);
const sal_uInt16 nCount = 1 << nNewBitCount;
const tools::Long nWidth = pWriteAcc->Width();
const tools::Long nWidth1 = nWidth - 1;