[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon May 27 14:13:07 UTC 2019


 loleaflet/src/core/Socket.js |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit f426e36f69759d8bded61a62f1fcc3e0f4c0bb8c
Author:     merttumer <mert.tumer at collabora.com>
AuthorDate: Mon May 27 17:11:34 2019 +0300
Commit:     merttumer <mert.tumer at collabora.com>
CommitDate: Mon May 27 17:11:34 2019 +0300

    Send postMessage after renaming the document
    
    Change-Id: Iee0854260fc0fab4de3e2a4fae54716009535b37
    Signed-off-by: merttumer <mert.tumer at collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 06fa5eb47..56402e4d5 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -742,6 +742,13 @@ L.Socket = L.Class.extend({
 				this._map.options.wopiSrc = encodeURIComponent(docUrl);
 				this._map.loadDocument();
 				this._map.sendInitUNOCommands();
+
+				this._map.fire('postMessage', {
+					msgId: 'File_Rename',
+					args: {
+						NewName: command.filename
+					}
+				});
 			}
 			// var name = command.name; - ignored, we get the new name via the wopi's BaseFileName
 		}
@@ -988,6 +995,9 @@ L.Socket = L.Class.extend({
 			else if (tokens[i].substring(0, 5) === 'name=') {
 				command.name = tokens[i].substring(5);
 			}
+			else if (tokens[i].substring(0, 9) === 'filename=') {
+				command.filename = tokens[i].substring(9);
+			}
 			else if (tokens[i].substring(0, 5) === 'port=') {
 				command.port = tokens[i].substring(5);
 			}


More information about the Libreoffice-commits mailing list