Resolves: tdf#150307 Broadcast missing ScAreasChanged hint on sheet deletion
... and Undo.
Change-Id: I59413d5470294c415c51e7d7ada9134f4173c872
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139450
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit d4411be66c199f379723dab5052b054f029ff3d0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139430
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 9c4d884..d187570 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3407,6 +3407,7 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord )
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index b898faf..0fab08e 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -366,6 +366,7 @@ void ScUndoDeleteTab::Undo()
}
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 7fe941e..dbee405 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2631,6 +2631,7 @@ bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord )
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}