summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-06-30 12:51:01 +0200
committerEike Rathke <erack@redhat.com>2016-06-30 12:58:17 +0200
commit0ac0061b437310c8bfb9d8b3596dae579a264b46 (patch)
tree7ea1f86f0d62ed2ca75ce95dd446f95fcf5da41e /sc
parent2b376803a79c8eb74ebe2569badd271b63ccd4d6 (diff)
use GetInt*() in the most obvious places
found with /approxFloor.*GetDouble Change-Id: Ice058c9cb318d7b0b0cadb9a26b4eb9f3691752f
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr5.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 3da084fe3c3c..6e8d9a7ffcea 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -513,8 +513,15 @@ void ScInterpreter::ScMatValue()
if ( MustHaveParamCount( GetByte(), 3 ) )
{
// 0 to count-1
- SCSIZE nR = static_cast<SCSIZE>(::rtl::math::approxFloor(GetDouble()));
- SCSIZE nC = static_cast<SCSIZE>(::rtl::math::approxFloor(GetDouble()));
+ // Theoretically we could have GetSize() instead of GetUInt32(), but
+ // really, practically ...
+ SCSIZE nR = static_cast<SCSIZE>(GetUInt32());
+ SCSIZE nC = static_cast<SCSIZE>(GetUInt32());
+ if (nGlobalError)
+ {
+ PushError( nGlobalError);
+ return;
+ }
switch (GetStackType())
{
case svSingleRef :
@@ -606,8 +613,8 @@ void ScInterpreter::ScEMat()
{
if ( MustHaveParamCount( GetByte(), 1 ) )
{
- SCSIZE nDim = static_cast<SCSIZE>(::rtl::math::approxFloor(GetDouble()));
- if (nDim == 0)
+ SCSIZE nDim = static_cast<SCSIZE>(GetUInt32());
+ if (nGlobalError || nDim == 0)
PushIllegalArgument();
else if (!ScMatrix::IsSizeAllocatable( nDim, nDim))
PushError( errMatrixSize);