summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pdfwriter_impl.cxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-26 16:15:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-28 10:26:06 +0200
commitc7483d48df1b9ae70335346846d02a4fc53b4558 (patch)
tree6cca794ebcdd0b9a81733836fa154658d083f173 /vcl/source/gdi/pdfwriter_impl.cxx
parent2ac95bccba859b7dd117e135d7c4f7a35017d9f9 (diff)
drop operator bool and operator! from Bitmap and BitmapEx
IRC chat: <quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap has the same problem as Graphic and the reason why you dropped that commit 7334034ae93b49fc93b5859a3c047a319d138282 "drop Graphic::operator bool" <noelgrandin> quikee[m], hmmm, good point <noelgrandin> maybe I should just drop both operator bool and operator! in favor of IsEmpty <quikee[m]> noelgrandin: I don't remember what the problem is I just remembered we dropped it Graphic :) sure, dropping everything for IsEmpty is probably the best Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/pdfwriter_impl.cxx')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index b81843b459e4..365204314733 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8368,7 +8368,7 @@ void PDFWriterImpl::writeJPG( JPGEmit& rObject )
rObject.m_pStream->Seek( STREAM_SEEK_TO_BEGIN );
sal_Int32 nMaskObject = 0;
- if( !!rObject.m_aMask )
+ if( !rObject.m_aMask.IsEmpty() )
{
if( rObject.m_aMask.GetBitCount() == 1 ||
( rObject.m_aMask.GetBitCount() == 8 && m_aContext.Version >= PDFWriter::PDFVersion::PDF_1_4 && !m_bIsPDF_A1 )
@@ -9020,7 +9020,7 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
// load stream to bitmap and draw the bitmap instead
Graphic aGraphic;
GraphicConverter::Import( rDCTData, aGraphic, ConvertDataFormat::JPG );
- if( !!rMask && rMask.GetSizePixel() == aGraphic.GetSizePixel() )
+ if( !rMask.IsEmpty() && rMask.GetSizePixel() == aGraphic.GetSizePixel() )
{
Bitmap aBmp( aGraphic.GetBitmapEx().GetBitmap() );
BitmapEx aBmpEx( aBmp, rMask );
@@ -9054,7 +9054,7 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
rEmit.m_aID = aID;
rEmit.m_pStream = std::move( pStream );
rEmit.m_bTrueColor = bIsTrueColor;
- if( !! rMask && rMask.GetSizePixel() == rSizePixel )
+ if( !rMask.IsEmpty() && rMask.GetSizePixel() == rSizePixel )
rEmit.m_aMask = rMask;
createEmbeddedFile(rGraphic, rEmit.m_aReferenceXObject, rEmit.m_nObject);