summaryrefslogtreecommitdiff
path: root/canvas
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 /canvas
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 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx2
-rw-r--r--canvas/source/directx/dx_vcltools.cxx2
-rw-r--r--canvas/source/vcl/impltools.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 7d4cdba478f4..9d9a8bdf9bb8 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -316,7 +316,7 @@ namespace cairocanvas
uno::Reference<rendering::XIntegerReadOnlyBitmap> xIntBmp(xBitmap,
uno::UNO_QUERY_THROW);
::BitmapEx aBmpEx = vcl::unotools::bitmapExFromXBitmap(xIntBmp);
- if( !!aBmpEx )
+ if( !aBmpEx.IsEmpty() )
return aBmpEx;
// TODO(F1): extract pixel from XBitmap interface
diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx
index 323022b9caa2..68a07ae79b4a 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -440,7 +440,7 @@ namespace dxcanvas::tools
return false;
::BitmapEx aBmpEx = vcl::unotools::bitmapExFromXBitmap( xIntBmp );
- if( !aBmpEx )
+ if( aBmpEx.IsEmpty() )
return false;
return drawVCLBitmapEx( rGraphics, aBmpEx );
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 800ad3128342..53faa65ffa71 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -73,7 +73,7 @@ namespace vclcanvas::tools
xBitmap, uno::UNO_QUERY_THROW );
::BitmapEx aBmpEx = vcl::unotools::bitmapExFromXBitmap( xIntBmp );
- if( !!aBmpEx )
+ if( !aBmpEx.IsEmpty() )
return aBmpEx;
// TODO(F1): extract pixel from XBitmap interface