summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-27 19:43:08 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-27 19:44:51 -0500
commit975a9e88d4ad9ebad23e377bb6fc4437186c92e8 (patch)
tree2eb091362565762cc681f67693a5f897927002e7 /sc/source/core
parent4ebd9eb897f17b07e29aaefd8fbfc79e182f2269 (diff)
Clear column data array cache when the document content changes.
Change-Id: I09ffa455e79199e37ca6168753ec9ef4d5aa33dc
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/column2.cxx14
-rw-r--r--sc/source/core/data/document.cxx5
2 files changed, 19 insertions, 0 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 8759c513210c..a39016abf8b2 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2862,6 +2862,13 @@ void ScColumn::SetFormulaResults( SCROW nRow, const double* pResults, size_t nLe
rCell.ResetDirty();
rCell.SetChanged(true);
}
+
+ std::vector<SCROW> aRows;
+ aRows.reserve(nLen);
+ for (size_t i = 0; i < nLen; ++i)
+ aRows.push_back(nRow+i);
+
+ BroadcastCells(aRows, SC_HINT_DATACHANGED);
}
void ScColumn::SetFormulaResults( SCROW nRow, const formula::FormulaTokenRef* pResults, size_t nLen )
@@ -2888,6 +2895,13 @@ void ScColumn::SetFormulaResults( SCROW nRow, const formula::FormulaTokenRef* pR
rCell.ResetDirty();
rCell.SetChanged(true);
}
+
+ std::vector<SCROW> aRows;
+ aRows.reserve(nLen);
+ for (size_t i = 0; i < nLen; ++i)
+ aRows.push_back(nRow+i);
+
+ BroadcastCells(aRows, SC_HINT_DATACHANGED);
}
void ScColumn::SetNumberFormat( SCROW nRow, sal_uInt32 nNumberFormat )
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 931994a0a3fd..2fa2b0e5b781 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2313,6 +2313,11 @@ ScDocument::NumFmtMergeHandler::~NumFmtMergeHandler()
mpDoc->pFormatExchangeList = NULL;
}
+void ScDocument::CellContentModified()
+{
+ mpFormulaGroupCxt.reset();
+}
+
SvtBroadcaster* ScDocument::GetBroadcaster( const ScAddress& rPos )
{
ScTable* pTab = FetchTable(rPos.Tab());