[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-1' - kit/ChildSession.cpp loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Wed Feb 21 16:22:08 UTC 2018


 kit/ChildSession.cpp                  |    5 ++++-
 loleaflet/src/layer/tile/TileLayer.js |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 7714ed1ee217f54fe6eb79493b20d366774d4f0a
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Wed Feb 21 21:29:50 2018 +0530

    ime: Don't eat space
    
    Encode/decode so that ' ' as payload of compositionupdate event doesn't
    get lost.
    
    Change-Id: Ia31abe85f1cf19f8f286c9069097bdc72297e664
    (cherry picked from commit fc4d6aeeb9a14b6ff8c2b09cab8c2d358cd0e42d)
    Reviewed-on: https://gerrit.libreoffice.org/50117
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index c98bbe48..1613e2b3 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -785,9 +785,12 @@ bool ChildSession::extTextInputEvent(const char* /*buffer*/, int /*length*/,
         return false;
     }
 
+    std::string decodedText;
+    URI::decode(text, decodedText);
+
     std::unique_lock<std::mutex> lock(_docManager.getDocumentMutex());
     getLOKitDocument()->setView(_viewId);
-    getLOKitDocument()->postExtTextInputEvent(id, type, text.c_str());
+    getLOKitDocument()->postExtTextInputEvent(id, type, decodedText.c_str());
 
     return true;
 }
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index a6fe4cba..f32f737d 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1374,7 +1374,7 @@ L.TileLayer = L.GridLayer.extend({
 
 	// if winId=0, then event is posted on the document
 	_postCompositionEvent: function(winId, type, text) {
-		this._map._socket.sendMessage('textinput id=' + winId + ' type=' + type + ' text=' + text);
+		this._map._socket.sendMessage('textinput id=' + winId + ' type=' + type + ' text=' + encodeURIComponent(text));
 	},
 
 	_postSelectGraphicEvent: function(type, x, y) {


More information about the Libreoffice-commits mailing list