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

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


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

New commits:
commit 831b13ada273b845edf52f63c6b6ad85fa6569dc
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Sun Jun 21 17:46:39 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Mon Jul 6 19:05:42 2020 +0200

    graphic(view)selection messages needs to be replayed
    
    See commit: "Replay print-twips messages for a couple of reasons..."
    for context on replay.
    
    Change-Id: I8a834fef08685d0ee713f64abed1696e56987241
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98158
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Tested-by: Jenkins
    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 f2bfcd4eb..379bb4683 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -257,12 +257,14 @@ L.CalcTileLayer = L.TileLayer.extend({
 				'invalidatecursor',
 				'textselectionstart',
 				'textselectionend',
+				'graphicselection',
 			];
 
 			var otherViewTypes = [
 				'cellviewcursor',
 				'textviewselection',
 				'invalidateviewcursor',
+				'graphicviewselection',
 			];
 
 			this._printTwipsMessagesForReplay = new L.MessageStore(ownViewTypes, otherViewTypes);
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index e48406405..15aee7303 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1095,8 +1095,7 @@ L.TileLayer = L.GridLayer.extend({
 	},
 
 	_onGraphicViewSelectionMsg: function (textMsg) {
-		textMsg = textMsg.substring('graphicviewselection:'.length + 1);
-		var obj = JSON.parse(textMsg);
+		var obj = JSON.parse(textMsg.substring('graphicviewselection:'.length + 1));
 		var viewId = parseInt(obj.viewId);
 
 		// Ignore if viewid is ours or not in our db
@@ -1122,6 +1121,10 @@ L.TileLayer = L.GridLayer.extend({
 		}
 
 		this._onUpdateGraphicViewSelection(viewId);
+
+		if (this.isCalc()) {
+			this._saveMessageForReplay(textMsg, viewId);
+		}
 	},
 
 	_onCellCursorMsg: function (textMsg) {


More information about the Libreoffice-commits mailing list