[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 2 18:01:42 UTC 2018


 loleaflet/src/layer/tile/TileLayer.js |   22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

New commits:
commit c648be85f51654302b16fd345471c98421da2cb4
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Tue Oct 2 17:14:33 2018 +0200
Commit:     Aron Budea <aron.budea at collabora.com>
CommitDate: Tue Oct 2 20:01:23 2018 +0200

    calc: We currently cannot paste text/rtf or text/html via LOK...
    
    Change-Id: Ic699dddb2cbeaab4c13d030c2f8f3c71eeddac4f
    Reviewed-on: https://gerrit.libreoffice.org/61256
    Reviewed-by: Aron Budea <aron.budea at collabora.com>
    Tested-by: Aron Budea <aron.budea at collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 33b8632c9..b3f45581d 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2013,12 +2013,22 @@ L.TileLayer = L.GridLayer.extend({
 		}
 
 		// now try various mime types
-		var mimeTypes = [
-			['text/rtf', 'text/rtf'],
-			['text/html', 'text/html'],
-			['text/plain', 'text/plain;charset=utf-8'],
-			['Text', 'text/plain;charset=utf-8']
-		];
+		var mimeTypes;
+		if (this._docType === 'spreadsheet') {
+			// FIXME apparently we cannot paste the text/html or text/rtf as
+			// produced by LibreOffice in Calc from some reason
+			mimeTypes = [
+				['text/plain', 'text/plain;charset=utf-8'],
+				['Text', 'text/plain;charset=utf-8']
+			];
+		} else {
+			mimeTypes = [
+				['text/rtf', 'text/rtf'],
+				['text/html', 'text/html'],
+				['text/plain', 'text/plain;charset=utf-8'],
+				['Text', 'text/plain;charset=utf-8']
+			];
+		}
 
 		for (var i = 0; i < mimeTypes.length; ++i) {
 			for (t = 0; t < types.length; ++t) {


More information about the Libreoffice-commits mailing list