From e246e6200e95de916c139a4b25d6a7e965ad610c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 13 Feb 2018 21:16:56 +0000 Subject: ofz#6300 Abrt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I814b0e4255894d909d29a9a301488a23acf418a0 Reviewed-on: https://gerrit.libreoffice.org/49688 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara Reviewed-by: Michael Stahl (cherry picked from commit 6be2c684effd6732c92df7ef75581772adb6dac3) --- filter/source/msfilter/msdffimp.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'filter') diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 725dc9ecf998..ef35059fcbfa 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1107,7 +1107,8 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream { Size aBitmapSizePixel( static_cast< sal_Int32 >( ( rObjData.aBoundRect.GetWidth() / 2540.0 ) * 90.0 ), // we will create a bitmap with 90 dpi static_cast< sal_Int32 >( ( rObjData.aBoundRect.GetHeight() / 2540.0 ) * 90.0 ) ); - if ( aBitmapSizePixel.Width() && aBitmapSizePixel.Height() && ( aBitmapSizePixel.Width() <= 1024 ) && ( aBitmapSizePixel.Height() <= 1024 ) ) + if (aBitmapSizePixel.Width() > 0 && aBitmapSizePixel.Height() > 0 && + aBitmapSizePixel.Width() <= 1024 && aBitmapSizePixel.Height() <= 1024) { double fFocusX = rManager.GetPropertyValue( DFF_Prop_fillToRight, 0 ) / 65536.0; double fFocusY = rManager.GetPropertyValue( DFF_Prop_fillToBottom, 0 ) / 65536.0; -- cgit v1.2.3