From eb5e45782b0e805455d383e9d020aae5bb70d619 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Thu, 21 Sep 2017 22:08:46 +0200 Subject: lok: Don't freeze the LibreOfficeKit via the spell-checking popup menu. Change-Id: I045ed919daeefca612d7908dd7de50c36536c9a0 Reviewed-on: https://gerrit.libreoffice.org/42608 Reviewed-by: Andras Timar Tested-by: Andras Timar --- editeng/source/editeng/editview.cxx | 6 +++++- sw/source/uibase/uiview/viewling.cxx | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index a246587bac45..6ffc0730990a 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -983,7 +983,11 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, LinkpEditEngine->pImpEditEngine->CreateEPaM(aPaM); EPaM aP2 = pImpEditView->pEditEngine->pImpEditEngine->CreateEPaM(aPaM2); - sal_uInt16 nId = aPopupMenu->Execute( pImpEditView->GetWindow(), aTempRect, PopupMenuFlags::NoMouseUpClose ); + sal_uInt16 nId = 0; + // TODO for LOK, we'll need to convert the spelling popup menu to + // something much more sfx2-based & non-modal... + if (!comphelper::LibreOfficeKit::isActive()) + nId = aPopupMenu->Execute( pImpEditView->GetWindow(), aTempRect, PopupMenuFlags::NoMouseUpClose ); aPaM2 = pImpEditView->pEditEngine->pImpEditEngine->CreateEditPaM(aP2); aPaM = pImpEditView->pEditEngine->pImpEditEngine->CreateEditPaM(aP); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 56f3b7e9590e..a52a818024b2 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -722,9 +723,13 @@ bool SwView::ExecSpellPopup(const Point& rPt) OUString sMenuName = bUseGrammarContext ? OUString("private:resource/GrammarContextMenu") : OUString("private:resource/SpellContextMenu"); - if(TryContextMenuInterception( *pPopup, sMenuName, pMenu, aEvent )) + if (comphelper::LibreOfficeKit::isActive()) + { + // TODO for LOK, we'll need to convert the spelling popup menu to + // something much more sfx2-based & non-modal... + } + else if (TryContextMenuInterception( *pPopup, sMenuName, pMenu, aEvent )) { - //! happy hacking for context menu modifying extensions of this //! 'custom made' menu... *sigh* (code copied from sfx2 and framework) if ( pMenu ) -- cgit