[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-4' - loleaflet/src loolkitconfig.xcu

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 22 17:20:26 UTC 2019


 loleaflet/src/map/handler/Map.Keyboard.js |   16 +++++++++-------
 loolkitconfig.xcu                         |    3 +++
 2 files changed, 12 insertions(+), 7 deletions(-)

New commits:
commit b20fdcc33e077354f36247aa57b3e54c1ecbec5b
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Mon Jul 22 19:18:10 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Jul 22 19:18:10 2019 +0200

    [cd] Explicitly disable the possiblity to Save via the keyboard.
    
    The saving here must be possible only via the action from the toolbar or
    from the menu - so disable it in the core and from our explicit keyboard
    handling.
    
    Change-Id: Ib911b4cac4728f7eee6b84762a9d006f77eb41e0

diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js
index 4b71a7605..183d02928 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -538,13 +538,15 @@ L.Map.Keyboard = L.Handler.extend({
 		case 80: // p
 			this._map.print();
 			return true;
-		case 83: // s
-			this._map.fire('postMessage', {msgId: 'UI_Save'});
-			if (!this._map._disableDefaultAction['UI_Save']) {
-				this._map.save(false /* An explicit save should terminate cell edit */,
-				               false /* An explicit save should save it again */);
-			}
-			return true;
+		// Explicitly disable the possiblity to Save via the keyboard
+		// (needs to be coupled with the loolkitconfig.xcu S_MOD1 disabling)
+		//case 83: // s
+		//	this._map.fire('postMessage', {msgId: 'UI_Save'});
+		//	if (!this._map._disableDefaultAction['UI_Save']) {
+		//		this._map.save(false /* An explicit save should terminate cell edit */,
+		//		               false /* An explicit save should save it again */);
+		//	}
+		//	return true;
 		case 86: // v
 		case 118: // v (Safari)
 			return true;
diff --git a/loolkitconfig.xcu b/loolkitconfig.xcu
index 392ed42b4..ad7aebb9a 100644
--- a/loolkitconfig.xcu
+++ b/loolkitconfig.xcu
@@ -22,4 +22,7 @@
 <!-- Enable thumbnail generation by default (disabling saves CPU time) -->
 <item oor:path="/org.openoffice.Office.Common/Save/Document"><prop oor:name="GenerateThumbnail" oor:op="fuse"><value>true</value></prop></item>
 
+<!-- Disable the Ctrl+s shortcut, so that the user cannot trigger Save via the keyboard. -->
+<item oor:path="/org.openoffice.Office.Accelerators/PrimaryKeys/Global"><node oor:name="S_MOD1" oor:op="remove"/></item>
+
 </oor:items>


More information about the Libreoffice-commits mailing list