loleaflet/dist/toolbar/toolbar.js | 10 +++++++--- wsd/ClientSession.cpp | 1 + wsd/DocumentBroker.cpp | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit 256938351609d49fefa98118919f1eb048b9e215 Author: Ashod Nakashian <[email protected]> Date: Sun Jun 4 23:40:18 2017 -0400 Set EverModified on saving the document When saving while editing a cell, the document is saved with the new cell contents (as the cell editing is interrupted and applied), but the modified status is not published to the client (loleaflet). This has the unfortunate side-effect that the EverModified flag is not set in this scenario. To avoid this, this patch sets the EverModified upon successful saving. This is easier than forcing LO Core to emit ModifiedStatus=true in the scenario above. Though it suffers from the false-positive result when the user forces a save. Although this is probably defensible, since technically the document changes upon saving (though not the content if there was nothing new to save). On the other hand, it's less harmful to signal modification due to save than to ignore genuine modification to the document. Change-Id: I7ccba62731f534b69819f7924eeb9231d874c111 Reviewed-on: https://gerrit.libreoffice.org/38398 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> (cherry picked from commit 80b6e9782421223f7abf84f4eb7e4c824804f67f) Reviewed-on: https://gerrit.libreoffice.org/48671 Tested-by: Samuel Mehrbrodt <[email protected]> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 7c9c56a0..9e505e9a 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1413,10 +1413,14 @@ map.on('commandresult', function (e) { var commandName = e.commandName; if (commandName === '.uno:Save' && e.success === true) { + // Saved a new version; the document is modified. + map._everModified = true; + // owncloud integration - if (typeof window.parent.documentsMain !== 'undefined') { - window.parent.documentsMain.saveDocumentBack(); - } + //FIXME: CSP Violation. + //if (typeof window.parent.documentsMain !== 'undefined') { + // window.parent.documentsMain.saveDocumentBack(); + // } } else if ((commandName === '.uno:Undo' || commandName === '.uno:Redo') && e.success === true && e.result.value && !isNaN(e.result.value)) { /*UNDO_CONFLICT*/ diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp index 1f454a69..ed044b56 100644 --- a/wsd/ClientSession.cpp +++ b/wsd/ClientSession.cpp @@ -536,6 +536,7 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt // Save to Storage and log result. std::string id = getId(); docBroker->saveToStorage(id, success, result); + forwardToClient(payload); return true; } } commit 915465c5a2aba7a5f63b8b0d888f21c4bff85c83 Author: Ashod Nakashian <[email protected]> Date: Sun May 21 19:13:55 2017 -0400 Correctly send termination reason to clients Fixes the case when the client reconnects on idle disconnection (because it never got the 'close: idle' message). Also, show informative message to users in this case instead of grey screen. Change-Id: Ia2e1f2ffefe6d35dd1552e7cc44e490aab86c600 Reviewed-on: https://gerrit.libreoffice.org/37891 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> (cherry picked from commit 407c538f046f9245661a77e2452779c465b75087) Reviewed-on: https://gerrit.libreoffice.org/48623 Tested-by: Samuel Mehrbrodt <[email protected]> diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index c0067334..6dd12f1c 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -246,7 +246,7 @@ void DocumentBroker::pollThread() if (ShutdownRequestFlag) { closeReason = "recycling"; - _stop = true; + shutdownClients(closeReason); } else if (AutoSaveEnabled && !_stop && std::chrono::duration_cast<std::chrono::seconds>(now - last30SecCheckTime).count() >= 30) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
