summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-03-13 12:00:28 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-03-13 12:17:49 +0100
commit68bc6a5dd68006ab86e7ef26f9e5d241cb118879 (patch)
treedebd00d1a05228759974b2d09666dfcccb379ab3 /sw
parenta73f24f47aea2dfa57459424f48b11b2b835e334 (diff)
add PixelFormat enum that replaces bit count in Bitmap/BitmapEx
Bit count for the image is a numeric value (sal_uInt16) but only a handful of values make sense - namely 1,4,8,24 and 32. This replaces the numeric value with an enum, which only accepts those values and checks the correct values are used at compile time. Change-Id: I0fc137c62bce3b0d021f05019a1648da628521bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/paintfrm.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index e90ab0bad378..d73a58ea38c7 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5909,42 +5909,42 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
aShadowColor = SwViewOption::GetShadowColor();
AlphaMask aMask( shadowMask.getBottomRight().GetBitmap() );
- Bitmap aFilledSquare( aMask.GetSizePixel(), 24 );
+ Bitmap aFilledSquare(aMask.GetSizePixel(), vcl::PixelFormat::N24_BPP);
aFilledSquare.Erase( aShadowColor );
aPageBottomRightShadow = BitmapEx( aFilledSquare, aMask );
aMask = AlphaMask( shadowMask.getBottomLeft().GetBitmap() );
- aFilledSquare = Bitmap( aMask.GetSizePixel(), 24 );
+ aFilledSquare = Bitmap(aMask.GetSizePixel(), vcl::PixelFormat::N24_BPP);
aFilledSquare.Erase( aShadowColor );
aPageBottomLeftShadow = BitmapEx( aFilledSquare, aMask );
aMask = AlphaMask( shadowMask.getBottom().GetBitmap() );
- aFilledSquare = Bitmap( aMask.GetSizePixel(), 24 );
+ aFilledSquare = Bitmap(aMask.GetSizePixel(), vcl::PixelFormat::N24_BPP);
aFilledSquare.Erase( aShadowColor );
aPageBottomShadow = BitmapEx( aFilledSquare, aMask );
aMask = AlphaMask( shadowMask.getTop().GetBitmap() );
- aFilledSquare = Bitmap( aMask.GetSizePixel(), 24 );
+ aFilledSquare = Bitmap(aMask.GetSizePixel(), vcl::PixelFormat::N24_BPP);
aFilledSquare.Erase( aShadowColor );
aPageTopShadow = BitmapEx( aFilledSquare, aMask );
aMask = AlphaMask( shadowMask.getTopRight().GetBitmap() );
- aFilledSquare = Bitmap( aMask.GetSizePixel(), 24 );
+ aFilledSquare = Bitmap(aMask.GetSizePixel(), vcl::PixelFormat::N24_BPP);
aFilledSquare.Erase( aShadowColor );
aPageTopRightShadow = BitmapEx( aFilledSquare, aMask );
aMask = AlphaMask( shadowMask.getRight().GetBitmap() );
- aFilledSquare = Bitmap( aMask.GetSizePixel(), 24 );
+ aFilledSquare = Bitmap(aMask.GetSizePixel(), vcl::PixelFormat::N24_BPP);
aFilledSquare.Erase( aShadowColor );
aPageRightShadow = BitmapEx( aFilledSquare, aMask );
aMask = AlphaMask( shadowMask.getTopLeft().GetBitmap() );
- aFilledSquare = Bitmap( aMask.GetSizePixel(), 24 );
+ aFilledSquare = Bitmap(aMask.GetSizePixel(), vcl::PixelFormat::N24_BPP);
aFilledSquare.Erase( aShadowColor );
aPageTopLeftShadow = BitmapEx( aFilledSquare, aMask );
aMask = AlphaMask( shadowMask.getLeft().GetBitmap() );
- aFilledSquare = Bitmap( aMask.GetSizePixel(), 24 );
+ aFilledSquare = Bitmap(aMask.GetSizePixel(), vcl::PixelFormat::N24_BPP);
aFilledSquare.Erase( aShadowColor );
aPageLeftShadow = BitmapEx( aFilledSquare, aMask );
}