diff options
author | Rashesh <rashesh.padia@collabora.com> | 2024-10-31 17:33:06 +0530 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2024-12-20 21:30:09 +0100 |
commit | a8bffc1c6a9296294625e75e3ddfb42931d91586 (patch) | |
tree | 9e96bc3dff0b844a974f11d663e350438b0881b6 | |
parent | 767fc7cfe567c33e80f12cf19140dba8c586b377 (diff) |
sc: fix: unnecessary updates to ScPosWnd when named range are empty
- follow up 115776004c875b3a8a861d070129187c893b136a
Change-Id: I57072d1999e703975a43dc50077698d4b28df461
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175869
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177646
Tested-by: Jenkins
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/inputwin.hxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index feceafffbe2b..32dfb734e7e5 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2270,7 +2270,7 @@ ScPosWnd::ScPosWnd(vcl::Window* pParent, ScTabViewShell* pViewShell) m_xWidget->set_size_request(aSize.Width(), -1); SetSizePixel(m_xContainer->get_preferred_size()); - FillRangeNames(); + FillRangeNames(true); StartListening( *SfxGetpApp() ); // For Navigator rangename updates @@ -2332,7 +2332,7 @@ OUString ScPosWnd::createLocalRangeName(std::u16string_view rName, std::u16strin return OUString::Concat(rName) + " (" + rTableName + ")"; } -void ScPosWnd::FillRangeNames() +void ScPosWnd::FillRangeNames(bool initialize) { std::set<OUString> aSet; SfxObjectShell* pObjSh = SfxObjectShell::Current(); @@ -2363,7 +2363,7 @@ void ScPosWnd::FillRangeNames() } } - if (aSet == aRangeNames && !aSet.empty()) + if (aSet == aRangeNames && !initialize) return; aRangeNames = aSet; diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 1c5d5b73962f..93c0611cf384 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -194,7 +194,7 @@ private: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; private: - void FillRangeNames(); + void FillRangeNames(bool initialize = false); void FillFunctions(); void DoEnter(); void HideTip(); |