diff options
author | Eike Rathke <erack@redhat.com> | 2016-07-01 11:27:24 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-07-01 11:47:31 +0200 |
commit | f45a78ac585b847c64c4bb78436f895b243ca2f6 (patch) | |
tree | edc9270b6296534b5a108a3049261f143c59a44d /sc | |
parent | 415cd81d90aa5dd4f9a5d914fabd4c2371f53e4c (diff) |
use GetInt32() for integer Add-In parameters
Change-Id: Id62acb1800b3a302d62900699a01d1a5cdf1ab56
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index dd05982ff5f3..f57a9705743d 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -2639,13 +2639,9 @@ void ScInterpreter::ScExternal() { case SC_ADDINARG_INTEGER: { - double fVal = GetDouble(); - double fInt = (fVal >= 0.0) ? ::rtl::math::approxFloor( fVal ) : - ::rtl::math::approxCeil( fVal ); - if ( fInt >= LONG_MIN && fInt <= LONG_MAX ) - aParam <<= (sal_Int32)fInt; - else - SetError(errIllegalArgument); + sal_Int32 nVal = GetInt32(); + if (!nGlobalError) + aParam <<= nVal; } break; @@ -2664,18 +2660,13 @@ void ScInterpreter::ScExternal() case svString: case svSingleRef: { - double fVal = GetDouble(); - double fInt = (fVal >= 0.0) ? ::rtl::math::approxFloor( fVal ) : - ::rtl::math::approxCeil( fVal ); - if ( fInt >= LONG_MIN && fInt <= LONG_MAX ) + sal_Int32 nVal = GetInt32(); + if (!nGlobalError) { - sal_Int32 nIntVal = (long)fInt; - uno::Sequence<sal_Int32> aInner( &nIntVal, 1 ); + uno::Sequence<sal_Int32> aInner( &nVal, 1 ); uno::Sequence< uno::Sequence<sal_Int32> > aOuter( &aInner, 1 ); aParam <<= aOuter; } - else - SetError(errIllegalArgument); } break; case svDoubleRef: |