diff options
author | Eike Rathke <erack@redhat.com> | 2017-11-03 14:43:21 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-11-03 14:45:59 +0100 |
commit | 911e2aff3cc37cb7410292728ffea05fffbfb0b3 (patch) | |
tree | d5472b3b5ee900403f6520403946075c71534a4c | |
parent | c263c25052ca7812ec8789b8825bca11da845054 (diff) |
Resolves: tdf#111428 swap (only) ScColumn::mnBlkCountFormula
commit 423df1fa929784c14e3a133c06468589fe9269cd
Date: Thu Nov 2 12:53:14 2017 +0100
Resolves: tdf#111428 implement CellStoreEvent::swap() in ScColumn::SwapCol()
erroneously swapped also the CellStoreEvent's ScColumn* but of
course the CellStoreEvent stays at its ScColumn and is not swapped
with the CellStoreType. So swap only the mnBlkCountFormula that
CellStoreEvent::mpCol accesses.
ASAN rightly complained about heap-use-after-free.
Change-Id: Ic44fed96c49bea7365bf1200e06788860966795c
-rw-r--r-- | sc/inc/mtvelements.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/column.cxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/mtvelements.cxx | 5 |
3 files changed, 0 insertions, 8 deletions
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx index 2809b7a621c5..f13562d47fbd 100644 --- a/sc/inc/mtvelements.hxx +++ b/sc/inc/mtvelements.hxx @@ -97,8 +97,6 @@ public: void element_block_acquired(const mdds::mtv::base_element_block* block); void element_block_released(const mdds::mtv::base_element_block* block); - - void swap(CellStoreEvent& r); }; /// Cell note container diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 3afcc2bce2ec..ea93b02156f1 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1896,7 +1896,6 @@ void ScColumn::SwapCol(ScColumn& rCol) maCellNotes.swap(rCol.maCellNotes); // Swap all CellStoreEvent mdds event_func related. - maCells.event_handler().swap( rCol.maCells.event_handler()); std::swap( mnBlkCountFormula, rCol.mnBlkCountFormula); // notes update caption diff --git a/sc/source/core/data/mtvelements.cxx b/sc/source/core/data/mtvelements.cxx index 199284cad878..e34010af54d8 100644 --- a/sc/source/core/data/mtvelements.cxx +++ b/sc/source/core/data/mtvelements.cxx @@ -54,11 +54,6 @@ void CellStoreEvent::element_block_released(const mdds::mtv::base_element_block* } } -void CellStoreEvent::swap(CellStoreEvent& r) -{ - std::swap( mpCol, r.mpCol); -} - ColumnBlockPositionSet::ColumnBlockPositionSet(ScDocument& rDoc) : mrDoc(rDoc) {} ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL nCol) |