Related: tdf#150307 Use SfxHintId::ScAreasChanged, tdf#137577 follow-up
... instead of ScTablesRenamed, as ScAreasChanged (confusingly
named) was meant exactly for this and also updates the Navigator.
Change-Id: I6d90b82e6d5121e69c1a40af369be36544ad1b3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139453
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 540a312af2f02108ea90f5d2a9f3bf573db622e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139433
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index ef1343a..a134fc1 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -73,7 +73,6 @@ enum class SfxHintId {
ScDbAreasChanged,
ScAreasChanged,
ScTablesChanged,
ScTablesRenamed,
ScDrawChanged,
ScDocNameChanged,
ScAreaLinksChanged,
@@ -166,7 +165,6 @@ inline std::basic_ostream<charT, traits> & operator <<(
case SfxHintId::ScDbAreasChanged: return stream << "ScDbAreasChanged";
case SfxHintId::ScAreasChanged: return stream << "ScAreasChanged";
case SfxHintId::ScTablesChanged: return stream << "ScTablesChanged";
case SfxHintId::ScTablesRenamed: return stream << "ScTablesRenamed";
case SfxHintId::ScDrawChanged: return stream << "ScDrawChanged";
case SfxHintId::ScDocNameChanged: return stream << "ScDocNameChanged";
case SfxHintId::ScAreaLinksChanged: return stream << "ScAreaLinksChanged";
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 2e31861..d44ee97 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2363,8 +2363,7 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint )
else
{
const SfxHintId nHintId = rHint.GetId();
if (nHintId == SfxHintId::ScAreasChanged || nHintId == SfxHintId::ScNavigatorUpdateAll
|| nHintId == SfxHintId::ScTablesRenamed)
if (nHintId == SfxHintId::ScAreasChanged || nHintId == SfxHintId::ScNavigatorUpdateAll)
FillRangeNames();
}
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 611f8c9..2e1a620 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3517,7 +3517,7 @@ bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
rDocShell.PostPaintExtras();
aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesRenamed ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
bSuccess = true;
}
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 8fc45c5..b3842eb 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -434,7 +434,7 @@ void ScUndoRenameTab::DoChange( SCTAB nTabP, const OUString& rName ) const
rDoc.RenameTab( nTabP, rName );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesRenamed ) ); // Name Box
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) ); // Also Name Box
pDocShell->PostPaintGridAll();
pDocShell->PostPaintExtras();