diff options
author | Eike Rathke <erack@redhat.com> | 2016-07-05 15:11:34 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-06 09:55:17 +0000 |
commit | dff1d0abc3e66277da76c60943ec6bc92c29b14f (patch) | |
tree | 2e6c7c72f73c877a3f7be1a42db4c18e33cba873 | |
parent | aca8a92b6b78b9d6dbefbcf9784b09675ee8f187 (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
(cherry picked from commit dd7a2c95b86d158be8d0637bdff13b9a0ed9954b)
Reviewed-on: https://gerrit.libreoffice.org/26959
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 97607d4e4123..57ee5f4a242b 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -808,7 +808,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) { @@ -855,6 +854,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); @@ -891,6 +891,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); |