[Libreoffice-commits] online.git: Branch 'distro/cib/libreoffice-6-2' - 2 commits - configure.ac loleaflet/html loleaflet/src wsd/ClientSession.cpp
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 4 14:10:39 UTC 2020
configure.ac | 2 +-
loleaflet/html/framed.doc.html | 2 ++
loleaflet/src/core/Socket.js | 19 +++++++++++++------
wsd/ClientSession.cpp | 14 +++++++++-----
4 files changed, 25 insertions(+), 12 deletions(-)
New commits:
commit 9d1de9131cdc4cd2ed5ad14cc98f2dc1d5459cd8
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Jun 4 16:10:02 2020 +0200
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Thu Jun 4 16:10:02 2020 +0200
Release 6.2.8.0
diff --git a/configure.ac b/configure.ac
index 9a8a64c96..b9d27534e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
AC_PREREQ([2.63])
-AC_INIT([loolwsd], [6.2.7.0], [libreoffice at lists.freedesktop.org])
+AC_INIT([loolwsd], [6.2.8.0], [libreoffice at lists.freedesktop.org])
LT_INIT([shared, disable-static, dlopen])
AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
commit 8059a8e5703f905d26398f6f84045a69c6cad95d
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue May 19 11:45:04 2020 +0200
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Thu Jun 4 16:09:33 2020 +0200
tdf#131123 Report back save result
Change-Id: Ie3dee5d344bc65c325b95f2746c9734bdd9e2f9d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94490
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 665b1629de30a4a402c6b10dd542de158db1f428)
diff --git a/loleaflet/html/framed.doc.html b/loleaflet/html/framed.doc.html
index 435c26e6d..872c8e155 100644
--- a/loleaflet/html/framed.doc.html
+++ b/loleaflet/html/framed.doc.html
@@ -109,6 +109,8 @@
if (msg.Values) {
if (msg.Values.success == true) {
document.getElementById("ModifiedStatus").innerHTML = "Saved";
+ } else {
+ document.getElementById("ModifiedStatus").innerHTML = "Error during save";
}
}
}
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 1d66ce854..4928dc881 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -307,13 +307,20 @@ L.Socket = L.Class.extend({
}
else if (textMsg.startsWith('commandresult: ')) {
var commandresult = JSON.parse(textMsg.substring(textMsg.indexOf('{')));
- if (commandresult['command'] === 'savetostorage' && commandresult['success']) {
- // Close any open confirmation dialogs
- if (vex.dialogID > 0) {
- var id = vex.dialogID;
- vex.dialogID = -1;
- vex.close(id);
+ if (commandresult['command'] === 'savetostorage' || commandresult['command'] === 'save') {
+ if (commandresult['success']) {
+ // Close any open confirmation dialogs
+ if (vex.dialogID > 0) {
+ var id = vex.dialogID;
+ vex.dialogID = -1;
+ vex.close(id);
+ }
}
+
+ var postMessageObj = {
+ success: commandresult['success']
+ };
+ this._map.fire('postMessage', {msgId: 'Action_Save_Resp', args: postMessageObj});
}
return;
}
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index e3cb678e5..03a439054 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -267,7 +267,11 @@ bool ClientSession::_handleInput(const char *buffer, int length)
if (!isReadOnly() && tokens.size() > 2)
getTokenInteger(tokens[2], "dontSaveIfUnmodified", dontSaveIfUnmodified);
- docBroker->sendUnoSave(getId(), dontTerminateEdit != 0, dontSaveIfUnmodified != 0);
+ bool result = docBroker->sendUnoSave(getId(), dontTerminateEdit != 0, dontSaveIfUnmodified != 0);
+
+ std::string resultstr = result ? "true" : "false";
+ std::string msg = "commandresult: { \"command\": \"save\", \"success\": " + resultstr + " }";
+ docBroker->broadcastMessage(msg);
}
else if (tokens[0] == "savetostorage")
{
@@ -275,10 +279,10 @@ bool ClientSession::_handleInput(const char *buffer, int length)
if (tokens.size() > 1)
getTokenInteger(tokens[1], "force", force);
- if (docBroker->saveToStorage(getId(), true, "" /* This is irrelevant when success is true*/, true))
- {
- docBroker->broadcastMessage("commandresult: { \"command\": \"savetostorage\", \"success\": true }");
- }
+ bool result = docBroker->saveToStorage(getId(), true, "" /* This is irrelevant when success is true*/, true);
+ std::string resultstr = result ? "true" : "false";
+ std::string msg = "commandresult: { \"command\": \"savetostorage\", \"success\": " + resultstr + " }";
+ docBroker->broadcastMessage(msg);
}
else if (tokens[0] == "clientvisiblearea")
{
More information about the Libreoffice-commits
mailing list