[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri May 17 12:08:15 UTC 2019
loleaflet/src/layer/tile/TileLayer.js | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 2998ab914e057d5c9bae3e3b03c0cf5f13e531b9
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri May 17 13:42:00 2019 +0200
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 17 14:07:57 2019 +0200
Prefer HTML over RTF for pasting on the Mac.
Safari provides RTF clipboard content which doesn't contain the images.
We do not know where the content comes from, so let's always prefer HTML
over RTF on Mac.
Change-Id: I2f449ff4cf025e5f51dbe6e0683667f2d319ac21
Reviewed-on: https://gerrit.libreoffice.org/72461
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 9136da41c..15e8acdbb 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2503,6 +2503,16 @@ L.TileLayer = L.GridLayer.extend({
['text/plain', 'text/plain;charset=utf-8'],
['Text', 'text/plain;charset=utf-8']
];
+ } else if (navigator.platform.startsWith('Mac')) {
+ // Safari provides RTF clipboard content which doesn't contain the
+ // images. We do not know where the content comes from, so let's
+ // always prefer HTML over RTF on Mac.
+ mimeTypes = [
+ ['text/html', 'text/html'],
+ ['text/rtf', 'text/rtf'],
+ ['text/plain', 'text/plain;charset=utf-8'],
+ ['Text', 'text/plain;charset=utf-8']
+ ];
} else {
mimeTypes = [
['text/rtf', 'text/rtf'],
More information about the Libreoffice-commits
mailing list