diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-24 21:49:45 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-25 00:58:14 -0400 |
commit | 36e0d770928f71c932db5dea9f04645f65222ea6 (patch) | |
tree | 6b0b0afd4c69b56cef0f0e7c834575aa8eb8860c /sc | |
parent | 485dddac7048aa9a877d205b25bf0c98c4887160 (diff) |
fdo#77728: Don't forget to start listening after the named range update.
Change-Id: I7a4160db0dd2b9ac2c98402bb6110c548e879b3d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/column.hxx | 3 | ||||
-rw-r--r-- | sc/inc/table.hxx | 3 | ||||
-rw-r--r-- | sc/source/core/data/column4.cxx | 11 | ||||
-rw-r--r-- | sc/source/core/data/document10.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/data/table7.cxx | 5 |
5 files changed, 17 insertions, 8 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 80d91893693c..7f6f81c310bf 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -378,7 +378,8 @@ public: void PreprocessRangeNameUpdate( sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt ); - void PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt ); + void PostprocessRangeNameUpdate( + sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt ); const SfxPoolItem* GetAttr( SCROW nRow, sal_uInt16 nWhich ) const; const ScPatternAttr* GetPattern( SCROW nRow ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index b13e7d120eac..a8bef6ec7abf 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -854,7 +854,8 @@ public: void PreprocessRangeNameUpdate( sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt ); - void PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt ); + void PostprocessRangeNameUpdate( + sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt ); ScConditionalFormatList* GetCondFormList(); const ScConditionalFormatList* GetCondFormList() const; diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index cad94e524362..b9553448e669 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -645,11 +645,13 @@ public: class PostRangeNameUpdateHandler { ScDocument* mpDoc; + sc::StartListeningContext& mrStartListenCxt; sc::CompileFormulaContext& mrCompileFormulaCxt; public: - PostRangeNameUpdateHandler( ScDocument* pDoc, sc::CompileFormulaContext& rCompileCxt ) : + PostRangeNameUpdateHandler( ScDocument* pDoc, sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt ) : mpDoc(pDoc), + mrStartListenCxt(rStartListenCxt), mrCompileFormulaCxt(rCompileCxt) {} void operator() ( sc::FormulaGroupEntry& rEntry ) @@ -677,6 +679,7 @@ public: { ScFormulaCell* p = *pp; p->SyncSharedCode(); + p->StartListeningTo(mrStartListenCxt); p->SetDirty(); } } @@ -697,6 +700,7 @@ public: aComp2.CompileTokenArray(); pCell->SetCode(pNewCode); + pCell->StartListeningTo(mrStartListenCxt); pCell->SetDirty(); } } @@ -715,12 +719,13 @@ void ScColumn::PreprocessRangeNameUpdate( std::for_each(aGroups.begin(), aGroups.end(), aFunc); } -void ScColumn::PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt ) +void ScColumn::PostprocessRangeNameUpdate( + sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt ) { // Collect all formula groups. std::vector<sc::FormulaGroupEntry> aGroups = GetFormulaGroupEntries(); - PostRangeNameUpdateHandler aFunc(pDocument, rCompileCxt); + PostRangeNameUpdateHandler aFunc(pDocument, rStartListenCxt, rCompileCxt); std::for_each(aGroups.begin(), aGroups.end(), aFunc); } diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index 9513dfb3b95e..2046b314e276 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -255,12 +255,13 @@ void ScDocument::PreprocessRangeNameUpdate() void ScDocument::PostprocessRangeNameUpdate() { + sc::StartListeningContext aStartListenCxt(*this); sc::CompileFormulaContext aCompileCxt(this); TableContainer::iterator it = maTabs.begin(), itEnd = maTabs.end(); for (; it != itEnd; ++it) { ScTable* p = *it; - p->PostprocessRangeNameUpdate(aCompileCxt); + p->PostprocessRangeNameUpdate(aStartListenCxt, aCompileCxt); } } diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx index 385bea1d3533..59d2b366550a 100644 --- a/sc/source/core/data/table7.cxx +++ b/sc/source/core/data/table7.cxx @@ -96,10 +96,11 @@ void ScTable::PreprocessRangeNameUpdate( aCol[i].PreprocessRangeNameUpdate(rEndListenCxt, rCompileCxt); } -void ScTable::PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt ) +void ScTable::PostprocessRangeNameUpdate( + sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt ) { for (SCCOL i = 0; i <= MAXCOL; ++i) - aCol[i].PostprocessRangeNameUpdate(rCompileCxt); + aCol[i].PostprocessRangeNameUpdate(rStartListenCxt, rCompileCxt); } void ScTable::UpdateScriptTypes( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) |