summaryrefslogtreecommitdiff
path: root/sc/source/core/data/document.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/document.cxx')
-rw-r--r--sc/source/core/data/document.cxx36
1 files changed, 35 insertions, 1 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 57d0ca521c8c..8e57020234ab 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1831,7 +1831,6 @@ void ScDocument::DeleteArea(
{
aRange.aStart.SetTab(i);
aRange.aEnd.SetTab(i);
-
SetDirty( aRange, true);
}
}
@@ -5722,6 +5721,21 @@ void ScDocument::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData&
// 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::DeleteSelection() couldn't do that.
+ if (!aGroupPos.empty())
+ {
+ ScRangeList aRangeList;
+ rMark.FillRangeListWithMarks( &aRangeList, false);
+ for (size_t i = 0; i < aRangeList.size(); ++i)
+ {
+ const ScRange* pRange = aRangeList[i];
+ if (pRange)
+ SetDirty( *pRange, true);
+ }
+ }
}
}
@@ -5763,6 +5777,26 @@ void ScDocument::DeleteSelectionTab(
// 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::DeleteSelection() couldn't do that.
+ if (!aGroupPos.empty())
+ {
+ ScRangeList aRangeList;
+ rMark.FillRangeListWithMarks( &aRangeList, false);
+ for (size_t i = 0; i < aRangeList.size(); ++i)
+ {
+ const ScRange* pRange = aRangeList[i];
+ if (pRange && pRange->aStart.Tab() <= nTab && nTab <= pRange->aEnd.Tab())
+ {
+ ScRange aRange( *pRange);
+ aRange.aStart.SetTab( nTab);
+ aRange.aEnd.SetTab( nTab);
+ SetDirty( aRange, true);
+ }
+ }
+ }
}
}
else