include/sfx2/lokhelper.hxx     |    2 +-
 sfx2/source/view/lokhelper.cxx |    6 +++---
 sw/source/core/crsr/viscrs.cxx |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit b23bca5c7361baec5b9bc342902a35bd812e8e42
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Jul 23 19:56:20 2025 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Jul 29 14:29:46 2025 +0200

    notifyUpdatePerViewId 3rd arg is never null
    
    Change-Id: I5892ae2a6812a6d821ba60e6eff666c68761d6e9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188323
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index d91c7f527cdf..7144ad8a29e3 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -205,7 +205,7 @@ public:
     /// Same as notifyUpdatePerViewId(), pTargetShell will be notified, 
relevant viewId in pViewShell,
     /// pSourceView->getLOKPayload() will be called to get the data.
     static void notifyUpdatePerViewId(SfxViewShell const& rTargetShell, 
SfxViewShell const* pViewShell,
-        SfxViewShell const* pSourceShell, int nType);
+        SfxViewShell const& rSourceShell, int nType);
     // Notify other views about the given type needing a per-viewid update.
     static void notifyOtherViewsUpdatePerViewId(SfxViewShell const* 
pViewShell, int nType);
 
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index ab4ce6b4a512..0c58b0778439 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -1103,17 +1103,17 @@ void SfxLokHelper::notifyUpdate(SfxViewShell const* 
pThisView, int nType)
 
 void SfxLokHelper::notifyUpdatePerViewId(SfxViewShell const& rThisView, int 
nType)
 {
-    notifyUpdatePerViewId(rThisView, &rThisView, &rThisView, nType);
+    notifyUpdatePerViewId(rThisView, &rThisView, rThisView, nType);
 }
 
 void SfxLokHelper::notifyUpdatePerViewId(SfxViewShell const& rTargetShell, 
SfxViewShell const* pViewShell,
-    SfxViewShell const* pSourceShell, int nType)
+    SfxViewShell const& rSourceShell, int nType)
 {
     if (DisableCallbacks::disabled())
         return;
 
     int viewId = SfxLokHelper::getView(pViewShell);
-    int sourceViewId = SfxLokHelper::getView(pSourceShell);
+    int sourceViewId = SfxLokHelper::getView(rSourceShell);
     rTargetShell.libreOfficeKitViewUpdatedCallbackPerViewId(nType, viewId, 
sourceViewId);
 }
 
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 80648ed530b3..eca9fd7374f8 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -236,14 +236,14 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * 
pViewShell)
             }
             else
             {
-                SfxLokHelper::notifyUpdatePerViewId(*pViewShell, 
pNotifyViewShell, pViewShell,
+                SfxLokHelper::notifyUpdatePerViewId(*pViewShell, 
pNotifyViewShell, *pViewShell,
                     LOK_CALLBACK_INVALIDATE_VIEW_CURSOR);
             }
         }
         else if ( bIsCursorPosChanged || m_pCursorShell->IsTableMode())
         {
             SfxLokHelper::notifyUpdatePerViewId(*pNotifyViewShell, 
SfxViewShell::Current(),
-                pNotifyViewShell, LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR);
+                *pNotifyViewShell, LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR);
             SfxLokHelper::notifyOtherViewsUpdatePerViewId(pNotifyViewShell, 
LOK_CALLBACK_INVALIDATE_VIEW_CURSOR);
         }
     }

Reply via email to