diff options
Diffstat (limited to 'sfx2/source/view/lokhelper.cxx')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index d28e5a835dd6..73e7a170412c 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -132,10 +132,13 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* pThisView, int nType, const OS } } -void SfxLokHelper::notifyWindow(vcl::LOKWindowId nLOKWindowId, +void SfxLokHelper::notifyWindow(const SfxViewShell* pThisView, + vcl::LOKWindowId nLOKWindowId, const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload) { + assert(pThisView); + if (SfxLokHelper::getViewsCount() <= 0 || nLOKWindowId == 0) return; @@ -152,8 +155,7 @@ void SfxLokHelper::notifyWindow(vcl::LOKWindowId nLOKWindowId, } aPayload += "}"; - if (SfxViewShell* pViewShell = SfxViewShell::Current()) - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_WINDOW, aPayload.getStr()); + pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_WINDOW, aPayload.getStr()); } void SfxLokHelper::notifyInvalidation(SfxViewShell* pThisView, const OString& rPayload) |