From c30fad2fcee46d98a9a2da4cf0c0470f5cc7f34e Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Sun, 28 Jul 2013 20:41:27 +0400 Subject: fdo#67397: don't bother to create BlendFrame for width == 1 or height == 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... 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 Tested-by: Caolán McNamara --- vcl/source/gdi/bitmapex.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl/source') 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); -- cgit v1.2.3