summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-07-28 20:41:27 +0400
committerCaolán McNamara <caolanm@redhat.com>2013-07-28 17:45:13 +0000
commitc30fad2fcee46d98a9a2da4cf0c0470f5cc7f34e (patch)
tree7112e9c10e07eade957cafae0f6e16792f920f3e /vcl/source
parent5038dba4783e69c94acbf61858b39ad7055cbc56 (diff)
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 (cherry picked from commit dd6518d42fce1416fa00f80a7b7dead113c37752) Reviewed-on: https://gerrit.libreoffice.org/5154 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 094b7c7bc198..f60c583f1dcd 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -982,7 +982,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);