summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2016-07-06 12:48:08 +0200
committerEike Rathke <erack@redhat.com>2016-07-08 17:35:57 +0000
commitb9c9bf666b4eb7ee4568fe155a2c8b50a02c4ad5 (patch)
tree2788ea44bd5b596dc9f68a65caab6bfecd6b59d4
parentaae1018af692fec4b983cc68db7cc13c27512b1e (diff)
tdf#100753 propagate error with VAR and STDEV functions.
Change-Id: I1b3ece177f5586f5cd64a34d16193d01d4bd5bd9 Reviewed-on: https://gerrit.libreoffice.org/26979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/core/tool/interpr1.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 491b4c86d872..2b117cdcce60 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3632,6 +3632,8 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
case svDouble :
{
fVal = GetDouble();
+ if ( nGlobalError )
+ return;
values.push_back(fVal);
fSum += fVal;
rValCount++;
@@ -3644,6 +3646,8 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
if (aCell.hasNumeric())
{
fVal = GetCellValue(aAdr, aCell);
+ if ( nGlobalError )
+ return;
values.push_back(fVal);
fSum += fVal;
rValCount++;
@@ -3671,6 +3675,11 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
}
while ((nErr == 0) && aValIter.GetNext(fVal, nErr));
}
+ if ( nErr )
+ {
+ SetError(nErr);
+ return;
+ }
}
break;
case svMatrix :