[Libreoffice-commits] .: Branch 'feature/gtk3' - basebmp/source

Michael Meeks michael at kemper.freedesktop.org
Mon Oct 10 03:23:02 PDT 2011


 basebmp/source/bitmapdevice.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 055db78e0a93cb36096002770dc4700daeef56b9
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Sat Oct 8 15:37:32 2011 +0100

    basebmp: B2IRange::isEmpty is surprisingly, unhelpfully lame - workaround

diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index a483197..f7f139b 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(


More information about the Libreoffice-commits mailing list