sc/source/ui/app/inputwin.cxx |    6 +++---
 sc/source/ui/inc/inputwin.hxx |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 53b2e17e4987445679d54fe32956fd4f889ecd2b
Author:     Rashesh <rashesh.pa...@collabora.com>
AuthorDate: Thu Oct 31 17:33:06 2024 +0530
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Oct 31 15:59:26 2024 +0100

    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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 64cf5860fd1c..393defc918b3 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();

Reply via email to