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

New commits:
commit fc4d6aeeb9a14b6ff8c2b09cab8c2d358cd0e42d
Author: Pranav Kant <pran...@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

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index ef9bfd3d..4b9199f8 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 8cafab6b..72318ae1 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1470,7 +1470,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) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to