From cd35a35b403d6dfc91e07dffef6480f084760230 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 2 May 2013 14:10:33 +0100 Subject: fix contrast not increment to limit value between 0.0 & 1.0 Change-Id: I1a8c08fb8f704e69ae1ae75d77784f07a1d99a12 --- vbahelper/source/vbahelper/vbapictureformat.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vbahelper/source/vbahelper/vbapictureformat.cxx b/vbahelper/source/vbahelper/vbapictureformat.cxx index 96495e17a774..9b2aa114f6e0 100644 --- a/vbahelper/source/vbahelper/vbapictureformat.cxx +++ b/vbahelper/source/vbahelper/vbapictureformat.cxx @@ -103,15 +103,15 @@ void SAL_CALL ScVbaPictureFormat::IncrementContrast( double increment ) throw (uno::RuntimeException) { double nContrast = getContrast(); - if( increment < 0 ) + nContrast += increment; + if( nContrast < 0 ) { - increment = 0.0; + nContrast = 0.0; } - if( increment > 1 ) + if( nContrast > 1 ) { - increment = 1.0; + nContrast = 1.0; } - nContrast += increment; setContrast( nContrast ); } -- cgit