basic/source/comp/exprtree.cxx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
New commits: commit 38968e2963302e650b718e5882ef85ff12f71e40 Author: Tor Lillqvist <t...@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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits