summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap/BitmapInfoAccess.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-03-27 10:14:13 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-04-02 06:28:39 +0200
commit88a177f827eba204dea92b631032411de8213ee4 (patch)
tree3107896970ac35f9fd1cb3804634efdef78c2313 /vcl/source/bitmap/BitmapInfoAccess.cxx
parent465b8b0e9ad4b0c9c7701dee2820a99c5d00b5bf (diff)
vcl: remove GetBitCount and GetColorCount from Bitmap{Ex}
We can cast the PixelFormat enum to int for the same information and we can use the enum to reduce ambiguity when possible. Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/bitmap/BitmapInfoAccess.cxx')
-rw-r--r--vcl/source/bitmap/BitmapInfoAccess.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/bitmap/BitmapInfoAccess.cxx b/vcl/source/bitmap/BitmapInfoAccess.cxx
index 8c90e8fb8d25..1914755cc692 100644
--- a/vcl/source/bitmap/BitmapInfoAccess.cxx
+++ b/vcl/source/bitmap/BitmapInfoAccess.cxx
@@ -49,7 +49,7 @@ BitmapInfoAccess::BitmapInfoAccess(Bitmap& rBitmap, BitmapAccessMode nMode)
if (!mpBuffer)
{
std::shared_ptr<SalBitmap> xNewImpBmp(ImplGetSVData()->mpDefInst->CreateSalBitmap());
- if (xNewImpBmp->Create(*xImpBmp, rBitmap.GetBitCount()))
+ if (xNewImpBmp->Create(*xImpBmp, vcl::pixelFormatBitCount(rBitmap.getPixelFormat())))
{
xImpBmp = xNewImpBmp;
rBitmap.ImplSetSalBitmap(xImpBmp);