[Libreoffice-commits] core.git: desktop/source sfx2/source

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 16 11:24:30 UTC 2019


 desktop/source/lib/init.cxx   |   10 +++++++++-
 sfx2/source/view/ipclient.cxx |    8 ++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 786f380394b23f5a804981a719d2b51ded1302c4
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri May 31 11:31:34 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Oct 16 13:23:50 2019 +0200

    Send 'INPLACE EXIT' on inplace deactivation
    
    Change-Id: Ieb44fb356966df0eb92141a5f22f1df13683f6fc
    Reviewed-on: https://gerrit.libreoffice.org/80694
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 1790bdbfa478..d2e9cfb7161e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1187,7 +1187,6 @@ void CallbackFlushHandler::queue(const int type, const char* data)
             case LOK_CALLBACK_TEXT_SELECTION_START:
             case LOK_CALLBACK_TEXT_SELECTION_END:
             case LOK_CALLBACK_TEXT_SELECTION:
-            case LOK_CALLBACK_GRAPHIC_SELECTION:
             case LOK_CALLBACK_MOUSE_POINTER:
             case LOK_CALLBACK_CELL_CURSOR:
             case LOK_CALLBACK_CELL_FORMULA:
@@ -1249,6 +1248,15 @@ void CallbackFlushHandler::queue(const int type, const char* data)
                 if (processWindowEvent(aCallbackData))
                     return;
             break;
+
+            case LOK_CALLBACK_GRAPHIC_SELECTION:
+            {
+                // remove only selection ranges and 'EMPTY' messages
+                // always send 'INPLACE' and 'INPLACE EXIT' messages
+                removeAll([type, payload] (const queue_type::value_type& elem)
+                    { return (elem.Type == type && elem.PayloadString[0] != 'I'); });
+            }
+            break;
         }
     }
 
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index f2d6d4e78bcd..00063e7b1ed6 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -72,6 +72,7 @@
 #include <cppuhelper/exc_hlp.hxx>
 
 #include <sfx2/lokhelper.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
 
 #define SFX_CLIENTACTIVATE_TIMEOUT 100
 
@@ -353,6 +354,13 @@ void SAL_CALL SfxInPlaceClient_Impl::deactivatedInplace()
 {
     if ( !m_pClient || !m_pClient->GetViewShell() )
         throw uno::RuntimeException();
+
+    if ( comphelper::LibreOfficeKit::isActive() )
+    {
+        if ( SfxViewShell* pViewShell = m_pClient->GetViewShell() ) {
+            pViewShell->libreOfficeKitViewCallback( LOK_CALLBACK_GRAPHIC_SELECTION, "INPLACE EXIT" );
+        }
+    }
 }
 
 


More information about the Libreoffice-commits mailing list