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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 2 15:44:20 UTC 2018


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

New commits:
commit 250ffe6f8332ced16382a8e796741ffd9946c2db
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Tue Oct 2 17:14:33 2018 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Oct 2 17:44:01 2018 +0200

    calc: We currently cannot paste text/rtf or text/html via LOK...
    
    Change-Id: Ic699dddb2cbeaab4c13d030c2f8f3c71eeddac4f
    Reviewed-on: https://gerrit.libreoffice.org/61258
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index d41a58f6d..0410bc935 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2106,12 +2106,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