diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-03-13 12:00:28 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-03-13 12:17:49 +0100 |
commit | 68bc6a5dd68006ab86e7ef26f9e5d241cb118879 (patch) | |
tree | debd00d1a05228759974b2d09666dfcccb379ab3 /oox | |
parent | a73f24f47aea2dfa57459424f48b11b2b835e334 (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 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index a6316cee1278..67f26e71daea 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2503,7 +2503,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS BitmapEx aSourceBitmap(aGraphic.GetBitmapEx()); aSourceBitmap.Scale(aDestRect.GetSize()); tools::Rectangle aSourceRect(Point(0, 0), aDestRect.GetSize()); - BitmapEx aDestBitmap(Bitmap(aDestSize, 24), aMask); + BitmapEx aDestBitmap(Bitmap(aDestSize, vcl::PixelFormat::N24_BPP), aMask); aDestBitmap.CopyPixel(aDestRect, aSourceRect, &aSourceBitmap); Graphic aDestGraphic(aDestBitmap); sRelationId = WriteImage(aDestGraphic); |