[Libreoffice-commits] core.git: vcl/source

Ivan Timofeev timofeev.i.s at gmail.com
Sun Jul 28 09:51:22 PDT 2013


 vcl/source/gdi/bitmapex.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dd6518d42fce1416fa00f80a7b7dead113c37752
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date:   Sun Jul 28 20:41:27 2013 +0400

    fdo#67397: don't bother to create BlendFrame for width == 1 or height == 1
    
    ... because:
    1) frame painted as a line doesn't make sense to me anyway;
    2) it leads to x = 1 or y = 1 in createBlendFrame, while the max value for that
       variable is "width (or height) - 1", i.e. 0.
    
    Change-Id: I7437bce6681e42cb57458c012927cf5d6bfc154f

diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index e123ac2..b7dbf75 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -1251,7 +1251,7 @@ BitmapEx VCL_DLLPUBLIC createBlendFrame(
     const long nW(rSize.Width());
     const long nH(rSize.Height());
 
-    if(nW && nH)
+    if(nW > 1 && nH > 1)
     {
         sal_uInt8 aEraseTrans(0xff);
         Bitmap aContent(rSize, 24);


More information about the Libreoffice-commits mailing list