diff options
author | Eike Rathke <erack@redhat.com> | 2016-07-05 15:11:34 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-07-05 15:19:20 +0200 |
commit | dd7a2c95b86d158be8d0637bdff13b9a0ed9954b (patch) | |
tree | 76696c02610373e5d11647d89a44c4ede819e1c6 /sc | |
parent | 0c0f1dc146b74bd3ad58f9c5b7cfa8c4a6606283 (diff) |
Resolves: tdf#90285 do not reuse the same StartListeningContext
... that after UpdateInsertTab and related may point into broadcasters'
ColumnBlockPosition that have been shifted to the next sheet.
Change-Id: I6f657021b6102cec427734a8ff3105f0c4309a7a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen2.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 77be2ded3879..dddcde6aed63 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -826,7 +826,6 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM sc::AutoCalcSwitch aACSwitch(*this, false); sc::RefUpdateInsertTabContext aCxt( *this, nNewPos, 1); - sc::StartListeningContext aSLCxt(*this); if (bValid) { @@ -873,6 +872,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM if (*it && it != maTabs.begin()+nOldPos && it != maTabs.begin() + nNewPos) (*it)->UpdateCompile(); SetNoListening( false ); + sc::StartListeningContext aSLCxt(*this); for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it) if (*it && it != maTabs.begin()+nOldPos && it != maTabs.begin()+nNewPos) (*it)->StartListeners(aSLCxt, true); @@ -918,6 +918,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM maTabs[nOldPos]->UpdateCompile(); maTabs[nNewPos]->UpdateCompile( true ); // maybe already compiled in Clone, but used names need recompilation SetNoListening( false ); + sc::StartListeningContext aSLCxt(*this); maTabs[nOldPos]->StartListeners(aSLCxt, true); maTabs[nNewPos]->StartListeners(aSLCxt, true); |