summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-05-02 14:10:33 +0100
committerNoel Power <noel.power@suse.com>2013-05-07 09:56:24 +0100
commitcd35a35b403d6dfc91e07dffef6480f084760230 (patch)
treeb98a70c48e2375cef20cfed007198ce2f72fde60
parent633403fb2cdb34918801c4547323e4487678db3f (diff)
fix contrast not increment to limit value between 0.0 & 1.0
Change-Id: I1a8c08fb8f704e69ae1ae75d77784f07a1d99a12
-rw-r--r--vbahelper/source/vbahelper/vbapictureformat.cxx10
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 );
}