summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2016-07-06 12:48:08 +0200
committerTor Lillqvist <tml@collabora.com>2016-08-02 16:44:29 +0300
commit8fb1a8128d9dc3dec71f1b6702d51d20217d7247 (patch)
tree1fef4993aa3df2c4bde112356703330616933157
parentf24c7a8df570f94c9d6c044bd2195c78858b0795 (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> (cherry picked from commit b9c9bf666b4eb7ee4568fe155a2c8b50a02c4ad5) Reviewed-on: https://gerrit.libreoffice.org/27061 (cherry picked from commit 88065eebdf9bc557b2c5d982b0beacb19ef2ad36)
-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 fa9d70aeb762..143aec6f5e0e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3613,6 +3613,8 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
case svDouble :
{
fVal = GetDouble();
+ if ( nGlobalError )
+ return;
values.push_back(fVal);
fSum += fVal;
rValCount++;
@@ -3625,6 +3627,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++;
@@ -3652,6 +3656,11 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
}
while ((nErr == 0) && aValIter.GetNext(fVal, nErr));
}
+ if ( nErr )
+ {
+ SetError(nErr);
+ return;
+ }
}
break;
case svMatrix :