diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-26 16:15:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-28 10:26:06 +0200 |
commit | c7483d48df1b9ae70335346846d02a4fc53b4558 (patch) | |
tree | 6cca794ebcdd0b9a81733836fa154658d083f173 /sd | |
parent | 2ac95bccba859b7dd117e135d7c4f7a35017d9f9 (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 'sd')
-rw-r--r-- | sd/source/ui/dlg/vectdlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel2.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews8.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index 066fe9d8a659..704a0f77862b 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -135,7 +135,7 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, GDIMetaFile& rMtf ) Fraction aScale; Bitmap aTmp( GetPreparedBitmap( rBmp, aScale ) ); - if( !!aTmp ) + if( !aTmp.IsEmpty() ) { const Link<::tools::Long,void> aPrgsHdl( LINK( this, SdVectorizeDlg, ProgressHdl ) ); aTmp.Vectorize( rMtf, static_cast<sal_uInt8>(m_xMtReduce->get_value(FieldUnit::NONE)), &aPrgsHdl ); diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index 68bdf0af1f7e..28f8ca7b91e9 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -262,7 +262,7 @@ BitmapEx DrawDocShell::GetPagePreviewBitmap(SdPage* pPage) BitmapEx aPreview( pVDev->GetBitmapEx( aNullPt, pVDev->GetOutputSizePixel() ) ); - DBG_ASSERT(aPreview, "Preview-Bitmap could not be generated"); + DBG_ASSERT(!aPreview.IsEmpty(), "Preview-Bitmap could not be generated"); return aPreview; } diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx index 12f3bbf58001..b6c043e91109 100644 --- a/sd/source/ui/view/drviews8.cxx +++ b/sd/source/ui/view/drviews8.cxx @@ -50,7 +50,7 @@ void DrawViewShell::ScannerEvent() { const BitmapEx aScanBmp( VCLUnoHelper::GetBitmap( xBitmap ) ); - if( !!aScanBmp ) + if( !aScanBmp.IsEmpty() ) { const SolarMutexGuard aGuard; SdrPage* pPage = mpDrawView->GetSdrPageView()->GetPage(); |