summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-07 19:08:12 +0200
committerTor Lillqvist <tml@collabora.com>2015-02-08 09:27:26 +0200
commitf7c6089c0f5ac7976149d270f6d9694ef8ed7cfd (patch)
tree1785c69ec74e94a71656e60d79abb333a9c42bf1
parent96520ae764f0b47fa7f8c7ca42864cffef05bdb3 (diff)
Be prepared to handle error codes encoded in NaNs ("double error")
Change-Id: I84576139d271d05977ff8bfa4de4820ef523d69e
-rw-r--r--sc/source/core/data/column2.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 6afb0d51a364..53d7ccf57f22 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2671,7 +2671,11 @@ void ScColumn::SetFormulaResults( SCROW nRow, const double* pResults, size_t nLe
for (; pResults != pResEnd; ++pResults, ++itCell)
{
ScFormulaCell& rCell = **itCell;
- rCell.SetResultDouble(*pResults);
+ sal_uInt16 nErr = GetDoubleErrorValue(*pResults);
+ if (nErr != 0)
+ rCell.SetResultError(nErr);
+ else
+ rCell.SetResultDouble(*pResults);
rCell.ResetDirty();
rCell.SetChanged(true);
}