sc/source/ui/inc/tabvwsh.hxx   |    2 +-
 sc/source/ui/view/tabvwsh4.cxx |   15 ++++++---------
 2 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit 198035a18f28095b868f9e8ecc01c6b139e21896
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Dec 9 12:52:55 2023 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Dec 9 14:10:28 2023 +0100

    Simplify a bit
    
    Change-Id: Ida8ab7b8e39f3847d58813ca93ae705bc19ac2e5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160508
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index dc05f235c990..1b80b0ab2f25 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -94,8 +94,8 @@ class ScFormEditData;
 class ScViewOptiChangesListener;
 class SC_DLLPUBLIC ScTabViewShell : public SfxViewShell, public ScDBFunc
 {
-    rtl::Reference<ScViewOptiChangesListener> mChangesListener;
 private:
+    rtl::Reference<ScViewOptiChangesListener> mChangesListener;
     struct SendFormulabarUpdate
     {
         OUString m_aText;
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 3948a7d07843..2989d63b5f99 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1705,7 +1705,7 @@ private:
 
 void ScViewOptiChangesListener::stopListening()
 {
-    if (m_xChangesNotifier.is())
+    if (m_xChangesNotifier)
         m_xChangesNotifier->removeChangesListener(this);
 }
 
@@ -1736,19 +1736,16 @@ 
ScViewOptiChangesListener::ScViewOptiChangesListener(ScTabViewShell& rViewShell)
     uno::Reference<lang::XMultiServiceFactory> xConfigurationProvider(
         
configuration::theDefaultProvider::get(comphelper::getProcessComponentContext()));
 
-    beans::NamedValue aProperty;
-    aProperty.Name = "nodepath";
-    aProperty.Value <<= 
OUString("/org.openoffice.Office.Calc/Content/Display");
-
-    uno::Sequence<uno::Any> aArgumentList{ uno::Any(aProperty) };
+    beans::NamedValue aProperty{ u"nodepath"_ustr,
+                                 
uno::Any(u"/org.openoffice.Office.Calc/Content/Display"_ustr) };
 
     uno::Reference<uno::XInterface> xConfigurationAccess
         = xConfigurationProvider->createInstanceWithArguments(
-            "com.sun.star.configuration.ConfigurationAccess", aArgumentList);
+            "com.sun.star.configuration.ConfigurationAccess", { 
uno::Any(aProperty) });
 
     m_xChangesNotifier.set(xConfigurationAccess, uno::UNO_QUERY);
 
-    if (m_xChangesNotifier.is())
+    if (m_xChangesNotifier)
         m_xChangesNotifier->addChangesListener(this);
 }
 
commit 6aa07b9e2bca206150de7d5d048833cef31b882a
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Dec 9 12:45:15 2023 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Dec 9 14:10:22 2023 +0100

    Listen to the needed subnode
    
    We don't need to know when other subnodes might change
    
    Change-Id: I9bd065a700e4d313acae1064af743a32a537c89c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160507
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index b7258e86e36e..3948a7d07843 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1715,7 +1715,7 @@ void SAL_CALL 
ScViewOptiChangesListener::changesOccurred(const util::ChangesEven
     for (const auto& change : rEvent.Changes)
     {
         if (OUString sChangedEntry;
-            (change.Accessor >>= sChangedEntry) && sChangedEntry == 
"Display/ColumnRowHighlighting")
+            (change.Accessor >>= sChangedEntry) && sChangedEntry == 
"ColumnRowHighlighting")
         {
             mrViewShell.GetViewData().GetView()->HighlightOverlay();
             break;
@@ -1738,7 +1738,7 @@ 
ScViewOptiChangesListener::ScViewOptiChangesListener(ScTabViewShell& rViewShell)
 
     beans::NamedValue aProperty;
     aProperty.Name = "nodepath";
-    aProperty.Value <<= OUString("/org.openoffice.Office.Calc/Content");
+    aProperty.Value <<= 
OUString("/org.openoffice.Office.Calc/Content/Display");
 
     uno::Sequence<uno::Any> aArgumentList{ uno::Any(aProperty) };
 

Reply via email to