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

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 5 14:36:45 UTC 2020


 loleaflet/src/layer/tile/CalcTileLayer.js |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 051803327a20fd176de29fb294f35860eaccf51a
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Wed May 27 20:19:14 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Sun Jul 5 16:36:25 2020 +0200

    Handle print-twips 'comment' msg correctly
    
    Change-Id: I36687aab705eef0e3dab3af7d39de7ac390129c0
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98112
    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 b067c9dcc..16b1005e0 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -243,7 +243,8 @@ L.CalcTileLayer = L.TileLayer.extend({
 			var obj = JSON.parse(textMsg.substring('comment:'.length + 1));
 			obj.comment.tab = parseInt(obj.comment.tab);
 			if (obj.comment.action === 'Add') {
-				obj.comment.cellPos = L.LOUtil.stringToBounds(obj.comment.cellPos);
+				var cellPos = L.LOUtil.stringToBounds(obj.comment.cellPos);
+				obj.comment.cellPos = this._convertToTileTwipsSheetArea(cellPos);
 				obj.comment.cellPos = L.latLngBounds(this._twipsToLatLng(obj.comment.cellPos.getBottomLeft()),
 					this._twipsToLatLng(obj.comment.cellPos.getTopRight()));
 				if (!this._annotations[obj.comment.tab]) {
@@ -261,7 +262,8 @@ L.CalcTileLayer = L.TileLayer.extend({
 				}
 			} else if (obj.comment.action === 'Modify') {
 				var modified = this._annotations[obj.comment.tab][obj.comment.id];
-				obj.comment.cellPos = L.LOUtil.stringToBounds(obj.comment.cellPos);
+				cellPos = L.LOUtil.stringToBounds(obj.comment.cellPos);
+				obj.comment.cellPos = this._convertToTileTwipsSheetArea(cellPos);
 				obj.comment.cellPos = L.latLngBounds(this._twipsToLatLng(obj.comment.cellPos.getBottomLeft()),
 					this._twipsToLatLng(obj.comment.cellPos.getTopRight()));
 				if (modified) {
@@ -751,7 +753,6 @@ L.SheetGeometry = L.Class.extend({
 
 	setTileGeometryData: function (tileWidthTwips, tileHeightTwips, tileSizeCSSPixels,
 		dpiScale, updatePositions) {
-
 		this._columns.setTileGeometryData(tileWidthTwips, tileSizeCSSPixels, dpiScale, updatePositions);
 		this._rows.setTileGeometryData(tileHeightTwips, tileSizeCSSPixels, dpiScale, updatePositions);
 	},
@@ -997,6 +998,7 @@ L.SheetDimension = L.Class.extend({
 	},
 
 	setTileGeometryData: function (tileSizeTwips, tileSizeCSSPixels, dpiScale, updatePositions) {
+
 		if (updatePositions === undefined) {
 			updatePositions = true;
 		}


More information about the Libreoffice-commits mailing list