[Libreoffice-commits] core.git: editeng/source sw/source

Jan Holesovsky kendy at collabora.com
Fri Sep 22 10:25:01 UTC 2017


 editeng/source/editeng/editview.cxx  |    6 +++++-
 sw/source/uibase/uiview/viewling.cxx |   10 ++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 551e639f467813e52ff4301822b6a7f8778a2ef4
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Sep 21 22:08:46 2017 +0200

    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 <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/42627
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index b74f76e35001..76692f6ab18d 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1023,7 +1023,11 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
         EPaM aP = pImpEditView->pEditEngine->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 dbdeef511e3e..dc220a5bb684 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/linguistic2/ProofreadingResult.hpp>
 #include <com/sun/star/i18n/TextConversionOption.hpp>
 #include <linguistic/lngprops.hxx>
+#include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/propertyvalue.hxx>
 #include <comphelper/propertysequence.hxx>
@@ -712,9 +713,14 @@ bool SwView::ExecSpellPopup(const Point& rPt)
 
                 OUString sMenuName  = bUseGrammarContext ?
                     OUString("private:resource/GrammarContextMenu") : OUString("private:resource/SpellContextMenu");
-                if (TryContextMenuInterception(xPopup->GetMenu(), 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(xPopup->GetMenu(), sMenuName, pMenu, aEvent))
+                {
                     //! happy hacking for context menu modifying extensions of this
                     //! 'custom made' menu... *sigh* (code copied from sfx2 and framework)
                     if ( pMenu )


More information about the Libreoffice-commits mailing list