diff options
author | Noel Power <noel.power@suse.com> | 2013-05-02 14:10:33 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-05-09 14:11:17 +0100 |
commit | 8fdd62c5876ef61f432e7d66e8fef4dd0d617193 (patch) | |
tree | d7a8b970440962955685003d521950c6c387f0c0 /vbahelper | |
parent | 8b94bfebf6e0d244182a19fc1743d7c67dc41857 (diff) |
fix contrast not increment to limit value between 0.0 & 1.0
Change-Id: I1a8c08fb8f704e69ae1ae75d77784f07a1d99a12
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/vbahelper/vbapictureformat.cxx | 10 |
1 files 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 ); } |