summaryrefslogtreecommitdiffstats
path: root/vbahelper
diff options
context:
space:
mode:
Diffstat (limited to 'vbahelper')
-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 );
}