include/sfx2/lokhelper.hxx | 4 ++-- sfx2/source/view/lokhelper.cxx | 8 ++++---- sw/source/core/crsr/viscrs.cxx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit cbae26276c11fa60923f0b9b5758dfa1c5407329 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed Jul 23 19:53:53 2025 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Jul 29 14:29:13 2025 +0200 first arg to notifyUpdatePerViewId is never null Change-Id: I76d1404fb4276a247b1bc5b019f58c6cd0b2479b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188318 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 38160cb85db2..d91c7f527cdf 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -201,10 +201,10 @@ public: // Notify about the given type needing an update. static void notifyUpdate(SfxViewShell const* pViewShell, int nType); // Notify about the given type needing a per-viewid update. - static void notifyUpdatePerViewId(SfxViewShell const* pViewShell, int nType); + static void notifyUpdatePerViewId(SfxViewShell const& rViewShell, int nType); /// 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* pTargetShell, SfxViewShell const* pViewShell, + static void notifyUpdatePerViewId(SfxViewShell const& rTargetShell, SfxViewShell const* pViewShell, SfxViewShell const* pSourceShell, 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 a0c2beb5c57e..ab4ce6b4a512 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -1101,12 +1101,12 @@ void SfxLokHelper::notifyUpdate(SfxViewShell const* pThisView, int nType) pThisView->libreOfficeKitViewUpdatedCallback(nType); } -void SfxLokHelper::notifyUpdatePerViewId(SfxViewShell const* pThisView, int nType) +void SfxLokHelper::notifyUpdatePerViewId(SfxViewShell const& rThisView, int nType) { - notifyUpdatePerViewId(pThisView, pThisView, pThisView, nType); + notifyUpdatePerViewId(rThisView, &rThisView, &rThisView, nType); } -void SfxLokHelper::notifyUpdatePerViewId(SfxViewShell const* pTargetShell, SfxViewShell const* pViewShell, +void SfxLokHelper::notifyUpdatePerViewId(SfxViewShell const& rTargetShell, SfxViewShell const* pViewShell, SfxViewShell const* pSourceShell, int nType) { if (DisableCallbacks::disabled()) @@ -1114,7 +1114,7 @@ void SfxLokHelper::notifyUpdatePerViewId(SfxViewShell const* pTargetShell, SfxVi int viewId = SfxLokHelper::getView(pViewShell); int sourceViewId = SfxLokHelper::getView(pSourceShell); - pTargetShell->libreOfficeKitViewUpdatedCallbackPerViewId(nType, viewId, sourceViewId); + rTargetShell.libreOfficeKitViewUpdatedCallbackPerViewId(nType, viewId, sourceViewId); } void SfxLokHelper::notifyOtherViewsUpdatePerViewId(SfxViewShell const* pThisView, int nType) diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index d46ffc2aa218..80648ed530b3 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -232,17 +232,17 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * pViewShell) { if (pViewShell == pNotifyViewShell) { - SfxLokHelper::notifyUpdatePerViewId(pViewShell, LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR); + SfxLokHelper::notifyUpdatePerViewId(*pViewShell, LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR); } 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(), + SfxLokHelper::notifyUpdatePerViewId(*pNotifyViewShell, SfxViewShell::Current(), pNotifyViewShell, LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR); SfxLokHelper::notifyOtherViewsUpdatePerViewId(pNotifyViewShell, LOK_CALLBACK_INVALIDATE_VIEW_CURSOR); }