[Libreoffice-commits] online.git: loleaflet/src

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 6 17:03:46 UTC 2020


 loleaflet/src/layer/tile/CalcTileLayer.js |    4 ++++
 loleaflet/src/layer/tile/TileLayer.js     |    7 +++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 3e3fbdd815b92f4c732d38abcfe23b682a672432
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Tue Jun 16 17:18:43 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Mon Jul 6 19:03:26 2020 +0200

    add more message types to replay
    
    own:  invalidatecursor, textselectionstart, textselectionend
    view: invalidateviewcursor
    
    See commit: "Replay print-twips messages for a couple of reasons..."
    for context on replay.
    
    Change-Id: I7d7cfd62202ac46b3410ad3e08bc04f0e2cdab00
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98156
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index e87ecbb3e..62d8b6072 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -254,11 +254,15 @@ L.CalcTileLayer = L.TileLayer.extend({
 				'referencemarks',
 				'cellselectionarea',
 				'textselection',
+				'invalidatecursor',
+				'textselectionstart',
+				'textselectionend',
 			];
 
 			var otherViewTypes = [
 				'cellviewcursor',
 				'textviewselection',
+				'invalidateviewcursor',
 			];
 
 			this._printTwipsMessagesForReplay = new L.MessageStore(ownViewTypes, otherViewTypes);
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index f374c40a6..92a3e6805 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1305,8 +1305,7 @@ L.TileLayer = L.GridLayer.extend({
 	},
 
 	_onInvalidateViewCursorMsg: function (textMsg) {
-		textMsg = textMsg.substring('invalidateviewcursor:'.length + 1);
-		var obj = JSON.parse(textMsg);
+		var obj = JSON.parse(textMsg.substring('invalidateviewcursor:'.length + 1));
 		var viewId = parseInt(obj.viewId);
 		var docLayer = this._map._docLayer;
 
@@ -1341,6 +1340,10 @@ L.TileLayer = L.GridLayer.extend({
 				this.goToCellViewCursor(viewId);
 			}
 		}
+
+		if (this.isCalc()) {
+			this._saveMessageForReplay(textMsg, viewId);
+		}
 	},
 
 	_onCellViewCursorMsg: function (textMsg) {


More information about the Libreoffice-commits mailing list