From 7988adf2bd250a32885d67306c73e07caa910778 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Mon, 26 Oct 2020 14:36:44 +0100 Subject: lok: Send form field events to the correct view. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I00b40052774602eccd8e4a7d460cedcb36bbd0d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104811 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- sw/source/core/crsr/bookmrk.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index fd339f583ee1..f1271c692c21 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -708,7 +708,7 @@ namespace sw::mark void DropDownFieldmark::SendLOKMessage(const OString& sAction) { const SfxViewShell* pViewShell = SfxViewShell::Current(); - if (pViewShell && pViewShell->isLOKMobilePhone()) + if (!pViewShell || pViewShell->isLOKMobilePhone()) { return; } @@ -766,7 +766,7 @@ namespace sw::mark } if (sPayload.toString() != m_sLastSentLOKMsg) { m_sLastSentLOKMsg = sPayload.toString(); - pEditWin->GetView().GetWrtShell().GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_FORM_FIELD_BUTTON, m_sLastSentLOKMsg.getStr()); + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_FORM_FIELD_BUTTON, m_sLastSentLOKMsg.getStr()); } } -- cgit v1.2.3