[Libreoffice-commits] .: basic/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 10 05:00:15 PDT 2012
basic/source/comp/exprtree.cxx | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
New commits:
commit 38968e2963302e650b718e5882ef85ff12f71e40
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Oct 10 14:56:29 2012 +0300
WaE [loplugin]: statement alignment
Change-Id: Ia09c74e02d261de5946e6d7e0530a7913e0bcb8d
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 710965d..1a4b465 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -819,10 +819,22 @@ short SbiConstExpression::GetShortValue()
else
{
double n = nVal;
- if( n > 0 ) n += .5; else n -= .5;
- if( n > SbxMAXINT ) n = SbxMAXINT, pParser->Error( SbERR_OUT_OF_RANGE );
+ if( n > 0 )
+ n += .5;
else
- if( n < SbxMININT ) n = SbxMININT, pParser->Error( SbERR_OUT_OF_RANGE );
+ n -= .5;
+
+ if( n > SbxMAXINT )
+ {
+ n = SbxMAXINT;
+ pParser->Error( SbERR_OUT_OF_RANGE );
+ }
+ else if( n < SbxMININT )
+ {
+ n = SbxMININT;
+ pParser->Error( SbERR_OUT_OF_RANGE );
+ }
+
return (short) n;
}
}
More information about the Libreoffice-commits
mailing list