[Libreoffice-commits] core.git: include/svl sc/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 30 23:22:23 UTC 2021
include/svl/hint.hxx | 2 ++
sc/source/ui/app/inputwin.cxx | 3 ++-
sc/source/ui/docshell/docfunc.cxx | 1 +
sc/source/ui/undo/undotab.cxx | 1 +
4 files changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 6b3f0866e9eddd5553857741862ca0d7d5b2ec2b
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Wed Mar 31 00:00:31 2021 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Wed Mar 31 01:21:36 2021 +0200
Related: tdf#137577 Update Name Box range name list on sheet rename
... for sheet-local names that include the sheet name.
Introduce SfxHintId::ScTablesRenamed for this as the existing
ScTablesChanged is fired quite too often.
Change-Id: I94c3479bba4d4cc8b75905e3fa4f35d9a8737870
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113391
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 314b4f886f7d..284ebe7200c4 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -73,6 +73,7 @@ enum class SfxHintId {
ScDbAreasChanged,
ScAreasChanged,
ScTablesChanged,
+ ScTablesRenamed,
ScDrawChanged,
ScDocNameChanged,
ScAreaLinksChanged,
@@ -164,6 +165,7 @@ 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 2b5a48c09d38..d69aac2c9984 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2291,7 +2291,8 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint )
else
{
const SfxHintId nHintId = rHint.GetId();
- if ( nHintId == SfxHintId::ScAreasChanged || nHintId == SfxHintId::ScNavigatorUpdateAll)
+ if (nHintId == SfxHintId::ScAreasChanged || nHintId == SfxHintId::ScNavigatorUpdateAll
+ || nHintId == SfxHintId::ScTablesRenamed)
FillRangeNames();
}
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 951048e43869..e1498dd4424a 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3512,6 +3512,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 ) );
bSuccess = true;
}
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 85c2708367e4..0002fefa1ccb 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -432,6 +432,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
pDocShell->PostPaintGridAll();
pDocShell->PostPaintExtras();
More information about the Libreoffice-commits
mailing list