summaryrefslogtreecommitdiff
path: root/basebmp
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-10-08 15:37:32 +0100
committerMichael Meeks <michael.meeks@suse.com>2011-10-25 13:41:54 +0100
commit69e4dd120631b05e7abb2c65f36b71e9424a8a72 (patch)
tree81c16a8e89041af8ce0a5f2645e0389c8494147b /basebmp
parenta53082c7c856eb5cf076ee8c14fd92939d6952b2 (diff)
basebmp: B2IRange::isEmpty is surprisingly, unhelpfully lame - workaround
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/source/bitmapdevice.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index a483197aa54d..f7f139b47a1d 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -1343,6 +1343,10 @@ namespace
if( aLocalSourceArea.isEmpty() )
return false;
+ // isEmpty is not what we want I think ...
+ if( aLocalSourceArea.getWidth() <= 0 || aLocalSourceArea.getHeight() <= 0 )
+ return false;
+
// calc relative new source area points (relative to orig
// source area)
const ::basegfx::B2IVector aUpperLeftOffset(
@@ -1359,6 +1363,10 @@ namespace
if( aLocalDestArea.isEmpty() )
return false;
+ // isEmpty is not what we want I think ...
+ if( aLocalDestArea.getWidth() <= 0 || aLocalDestArea.getHeight() <= 0 )
+ return false;
+
// calc relative new dest area points (relative to orig
// source area)
const ::basegfx::B2IVector aDestUpperLeftOffset(
@@ -1398,6 +1406,10 @@ namespace
if( aLocalSourceArea.isEmpty() )
return false;
+ // sadly isEmpty is not what we want I think ...
+ if( aLocalSourceArea.getWidth() <= 0 || aLocalSourceArea.getHeight() <= 0 )
+ return false;
+
// calc relative new source area points (relative to orig
// source area)
const ::basegfx::B2IVector aUpperLeftOffset(
@@ -1416,6 +1428,10 @@ namespace
if( aLocalDestArea.isEmpty() )
return false;
+ // isEmpty is not what we want I think ...
+ if( aLocalDestArea.getWidth() <= 0 || aLocalDestArea.getHeight() <= 0 )
+ return false;
+
// calc relative new dest area points (relative to orig
// source area)
const ::basegfx::B2IVector aDestUpperLeftOffset(