summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-11-02 12:53:14 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-11-03 15:12:10 +0100
commitd0427dad578e3aa863b45325bc3729efdebb2562 (patch)
tree0af181c1ec256f461ab6cf5025d6685db30a2bba
parentfacb2780328619f348f035e17baa8b2984099ca4 (diff)
Resolves: tdf#111428 swap ScColumn::mnBlkCountFormula
This is a combination of 2 commits. (cherry picked from commit 423df1fa929784c14e3a133c06468589fe9269cd) (cherry picked from commit 911e2aff3cc37cb7410292728ffea05fffbfb0b3) CellStoreEvent remembered the original ScColumn::mnBlkCountFormula, hence after inserting a column to the left the quick check of ScColumn::HasFormulaCell() whether there are any formula cells worked on the swapped in count (originally the one to the right) that happens to be empty in the scenario. Things worked correctly by accident if the next column to the right already contained a formula cell. c44fed96c49bea7365bf1200e06788860966795c Change-Id: If993856ceee657736f516a81c293506041a6b7eb Reviewed-on: https://gerrit.libreoffice.org/44211 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit f80ec94e75a9257504135bc32793c5eb37914bbe)
-rw-r--r--sc/source/core/data/column.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 45f211cbedd1..5a817c2f747e 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1899,6 +1899,9 @@ void ScColumn::SwapCol(ScColumn& rCol)
maCellTextAttrs.swap(rCol.maCellTextAttrs);
maCellNotes.swap(rCol.maCellNotes);
+ // Swap all CellStoreEvent mdds event_func related.
+ std::swap( mnBlkCountFormula, rCol.mnBlkCountFormula);
+
// notes update caption
UpdateNoteCaptions(0, MAXROW);
rCol.UpdateNoteCaptions(0, MAXROW);