summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-02-29 17:54:50 +0100
committerAndras Timar <andras.timar@collabora.com>2016-04-04 23:55:16 +0200
commit0d1e9f68b962ed3e86fc7b6e06abb29cca83196a (patch)
tree5fee53f5e7d081a40ef97cb2962de1caff980c48 /sc
parent0808f3c18f48446ed86397f2b75638011070e9c2 (diff)
fix the "group not recalculated after delete" second part of tdf#97897
If a formula cell group was split during deletion and the group also listened into the range where a cell was deleted, the group wasn't notified of the deletion. Change-Id: I858f5d4c0b647636611133fc32f3df7fbdaf7288 (cherry picked from commit 164419bfe6270015ccf94183c0b6273da7730391) Reviewed-on: https://gerrit.libreoffice.org/22784 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 1bfc042ea7af6f7b3b0410cb03cef41a358582d4)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/document.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index dd56015bc71f..88ffed8f8f86 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1833,6 +1833,24 @@ void ScDocument::DeleteArea(
// Re-start listeners on those top bottom groups that have been split.
SetNeedsListeningGroups(aGroupPos);
StartNeededListeners();
+
+ // If formula groups were split their listeners were destroyed and may
+ // need to be notified now that they're restored, ScTable::DeleteArea()
+ // couldn't do that.
+ if (!aGroupPos.empty())
+ {
+ ScRange aRange(nCol1, nRow1, 0, nCol2, nRow2, 0);
+ for (SCTAB i = 0; i < static_cast<SCTAB>(maTabs.size()); i++)
+ {
+ if (rMark.GetTableSelect(i))
+ {
+ aRange.aStart.SetTab(i);
+ aRange.aEnd.SetTab(i);
+
+ SetDirty( aRange, true);
+ }
+ }
+ }
}
}