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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdpdf.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 698ce31b9821..bba90c16a1a0 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -636,7 +636,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void ) if( aGraphic.IsTransparent() ) aMask.CombineSimple( aGraphic.GetBitmapEx().GetMask(), BmpCombine::Or ); - if( !!aMask ) + if( !aMask.IsEmpty() ) { std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querynewcontourdialog.ui")); std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryNewContourDialog")); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 34a491211bf6..504f5990dab4 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -562,7 +562,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj, bool bScale) pObj->SetLayer(aOldLayer); pObj->SetMergedItemSet(aOldItemSet); - if(!!aBitmapEx) + if(!aBitmapEx.IsEmpty()) { // aNewRange is inside of aOldRange and defines which part of aBitmapEx is used const double fScaleX(aBitmapEx.GetSizePixel().Width() / (aOldRange.getWidth() ? aOldRange.getWidth() : 1.0)); diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index 466142b57223..125b26f0da01 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -513,7 +513,7 @@ void ImpSdrPdfImport::InsertObj(SdrObject* pObj, bool bScale) pObj->SetLayer(aOldLayer); pObj->SetMergedItemSet(aOldItemSet); - if (!!aBitmapEx) + if (!aBitmapEx.IsEmpty()) { // aNewRange is inside of aOldRange and defines which part of aBitmapEx is used const double fScaleX(aBitmapEx.GetSizePixel().Width() diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index d3c6b2fa3629..1cf15c720a31 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -454,7 +454,7 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked) const } } - if( !aBmp ) + if( aBmp.IsEmpty() ) { // choose conversion directly using primitives to bitmap to avoid // rendering errors with tiled bitmap fills (these will be tiled in a diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 6f9ee4992cde..4236215fe142 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -92,7 +92,7 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId) { BitmapEx aThumb; - if (GalleryExplorer::GetSdrObj(nThemeId, nModelPos, pModel, &aThumb) && !!aThumb) + if (GalleryExplorer::GetSdrObj(nThemeId, nModelPos, pModel, &aThumb) && !aThumb.IsEmpty()) { VclPtr< VirtualDevice > pVDev = VclPtr<VirtualDevice>::Create(); const Point aNull(0, 0); |