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

mert (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 18 18:29:37 UTC 2019


 loleaflet/src/control/Control.JSDialogBuilder.js |    2 +-
 loleaflet/src/map/Clipboard.js                   |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit fc04ba5502d331bde58d796000a787f98b6c87aa
Author:     mert <mert.tumer at collabora.com>
AuthorDate: Wed Dec 18 19:51:48 2019 +0300
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Wed Dec 18 19:29:18 2019 +0100

    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 at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

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++;


More information about the Libreoffice-commits mailing list