summaryrefslogtreecommitdiffstats
path: root/filter
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 /filter
parentWork around assert() in circular reference within group calc, tdf#141146 (diff)
downloadcore-88a177f827eba204dea92b631032411de8213ee4.tar.gz
core-88a177f827eba204dea92b631032411de8213ee4.zip
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 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 5ed426de2ab6..9b81426f27db 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1395,7 +1395,9 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
if ( eMSO_FillType == mso_fillPattern )
{
Bitmap aBmp( aGraf.GetBitmapEx().GetBitmap() );
- if( aBmp.GetSizePixel().Width() == 8 && aBmp.GetSizePixel().Height() == 8 && aBmp.GetColorCount() == 2)
+ if (aBmp.GetSizePixel().Width() == 8 &&
+ aBmp.GetSizePixel().Height() == 8 &&
+ aBmp.getPixelFormat() == vcl::PixelFormat::N1_BPP)
{
Color aCol1( COL_WHITE ), aCol2( COL_WHITE );