diff options
author | Eike Rathke <erack@redhat.com> | 2016-02-29 17:54:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-03-01 11:36:47 +0000 |
commit | 0a5d00507d08179d2511de0b5152e17a238f4a2d (patch) | |
tree | 5d90caf02b35364f6a897ac794392a28c4998c6c | |
parent | 9b7f72203f2b9f6b95d927c695f7f48b86b251ee (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/22783
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/document.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 5225443475b2..074f5b799c0f 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1817,6 +1817,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); + } + } + } } } |