From 2c68dc443ad5ca6b2a83814208a996fc11b84f6e Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 11 Dec 2020 15:49:29 +0100 Subject: [PATCH 1/2] Fix scrambled data in spreadsheets: disable 'undo' --- www/common/onlyoffice/inner.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 881db3d06..7631d828a 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -775,6 +775,18 @@ define([ view: false }; }); + // Add an history keeper user to show that we're never alone + var hkId = Util.createRandomInteger(); + p.push({ + id: hkId, + idOriginal: String(hkId), + username: "History", + indexUser: i, + connectionId: Hash.createChannelId(), + isCloseCoAuthoring:false, + view: false + }); + i++; if (!myUniqueOOId) { myUniqueOOId = String(myOOId) + i; } p.push({ id: myUniqueOOId, From 3132b1816ec393d8c64b719929898e794d35eb9a Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 11 Dec 2020 16:07:18 +0100 Subject: [PATCH 2/2] Spreadsheets editors are marked as viewers before they make a change --- www/common/onlyoffice/inner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 7631d828a..dc304fbe3 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -1313,6 +1313,8 @@ define([ return; } + APP.onLocal(); // Add our data to the userlist + if (APP.history) { try { getEditor().asc_setRestriction(true);