diff options
author | mert <mert.tumer@collabora.com> | 2019-12-18 19:51:48 +0300 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-12-18 19:29:18 +0100 |
commit | fc04ba5502d331bde58d796000a787f98b6c87aa (patch) | |
tree | 150d6dc985bd3330cfab7b65846352891fc0800a | |
parent | 9badeaf49d1336a8c8cc003087107086c38b13bc (diff) |
Clipboard improvements for online mobile
This patch allows me to copy content to clipboard
and paste it into another apps also it works
with images/shapes too. They are able to be copied into
clipboard.
Change-Id: If6660e1f0ee5821fccbb257d2baab45305b4c3fb
Reviewed-on: https://gerrit.libreoffice.org/85408
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | loleaflet/src/control/Control.JSDialogBuilder.js | 2 | ||||
-rw-r--r-- | loleaflet/src/map/Clipboard.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index f031a13d8..617a8d9d0 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1444,7 +1444,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ // before close the wizard then execute the action if (data.executionType === 'action') { builder.map.menubar._executeAction(undefined, data.id); - } else { + } else if (!builder.map._clip.filterExecCopyPaste(data.command)) { builder.map.sendUnoCommand(data.command) } }); diff --git a/loleaflet/src/map/Clipboard.js b/loleaflet/src/map/Clipboard.js index 2808f2690..65ab6d1ab 100644 --- a/loleaflet/src/map/Clipboard.js +++ b/loleaflet/src/map/Clipboard.js @@ -469,7 +469,8 @@ L.Clipboard = L.Class.extend({ var plainText = this.stripHTML(text); if (ev.clipboardData) { // Standard - ev.clipboardData.setData('text/plain', plainText); + // if copied content is graphical then plainText is null and it does not work on mobile. + ev.clipboardData.setData('text/plain', plainText ? plainText: ' '); ev.clipboardData.setData('text/html', text); console.log('Put "' + text + '" on the clipboard'); this._clipboardSerial++; |