summaryrefslogtreecommitdiff
path: root/sc/source/core/data/document.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-02-11 13:28:47 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-02-12 15:22:28 +0000
commit3f7a491c646a14fb03172d14b421a780e73508c9 (patch)
tree545a8eed919c35d0e19f889a6e907c7ea429a1a7 /sc/source/core/data/document.cxx
parent58df669ac734f4740cf1112867edb808789aae43 (diff)
Ensure that vector array has a numeric array of NaN's for empty range.
With this change, we ensure that mpNumArray is never NULL even when the range consists entirely of empty cells. For an empty range, mpNumArray will be non-NULL and filled with NaN's while mpStrArray will be NULL. P.S. We need to backport this because without this, the existing OpenCL code could lead to a crash during OpenCL enabled calculations. (cherry picked from commit 2ec3127da35933fc6d5ac47ecedd0267f67c1d62) Change-Id: If5cead26ebe917af150cf7e39e17afe3f310beb7 Reviewed-on: https://gerrit.libreoffice.org/8021 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/core/data/document.cxx')
-rw-r--r--sc/source/core/data/document.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 06ae53021e67..5f59e0f786ff 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2316,7 +2316,7 @@ ScDocument::NumFmtMergeHandler::~NumFmtMergeHandler()
mpDoc->pFormatExchangeList = NULL;
}
-void ScDocument::CellContentModified()
+void ScDocument::ClearFormulaContext()
{
mpFormulaGroupCxt.reset();
}
@@ -3629,6 +3629,7 @@ void ScDocument::AddTableOpFormulaCell( ScFormulaCell* pCell )
void ScDocument::CalcAll()
{
+ ClearFormulaContext();
ClearLookupCaches(); // Ensure we don't deliver zombie data.
sc::AutoCalcSwitch aSwitch(*this, true);
TableContainer::iterator it = maTabs.begin();
@@ -3639,7 +3640,6 @@ void ScDocument::CalcAll()
if (*it)
(*it)->CalcAll();
ClearFormulaTree();
- mpFormulaGroupCxt.reset();
}