loleaflet/dist/toolbar/toolbar.js | 18 ++++++++++++++++-- loleaflet/src/control/Control.Menubar.js | 5 ++++- loleaflet/src/layer/tile/TileLayer.js | 4 +++- 3 files changed, 23 insertions(+), 4 deletions(-)
New commits: commit b187fbd8df42d7d5c05dda33b58fafc039518189 Author: Marco Cecchetti <[email protected]> Date: Thu Sep 7 20:44:44 2017 +0200 Disable slideshow feature when DisableExport property is set. Change-Id: I424da9abf2bba737c2985c6dcbb2ab9dbee4770c diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index b49a88f6..d872908c 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -938,6 +938,9 @@ map.on('wopiprops', function(e) { w2ui['toolbar-up'].hide('save'); w2ui['toolbar-up'].hide('savebreak'); } + if (e.HideExportOption) { + w2ui['presentation-toolbar'].hide('presentation', 'presentationbreak'); + } if (e.DisableCopy) { $('input#formulaInput').bind('copy', function(evt) { evt.preventDefault(); @@ -1017,7 +1020,10 @@ map.on('doclayerinit', function () { break; case 'presentation': var presentationToolbar = w2ui['presentation-toolbar']; - presentationToolbar.show('presentation', 'presentationbreak', 'insertpage', 'duplicatepage', 'deletepage'); + presentationToolbar.show('insertpage', 'duplicatepage', 'deletepage'); + if (!map['wopi'].HideExportOption) { + presentationToolbar.show('presentation', 'presentationbreak'); + } toolbarUp.remove('insertannotation', 'wraptextseparator', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); toolbarUpMore.remove('insertannotation', 'wraptextseparator', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); statusbar.insert('left', [ diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 0bf811d3..63d29c62 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -222,7 +222,7 @@ L.Control.Menubar = L.Control.extend({ {name: _('New slide'), id: 'insertpage', type: 'action'}, {name: _('Duplicate slide'), id: 'duplicatepage', type: 'action'}, {name: _('Delete slide'), id: 'deletepage', type: 'action'}, - {type: 'separator'}, + {type: 'separator', id: 'fullscreen-presentation-separator'}, {name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'}] }, {name: _('Help'), id: 'help', type: 'menu', menu: [ @@ -711,6 +711,9 @@ L.Control.Menubar = L.Control.extend({ if (menu[i].id === 'save' && this._map['wopi'].HideSaveOption) continue; + if (menu[i].id && menu[i].id.startsWith('fullscreen-presentation') && this._map['wopi'].HideExportOption) + continue; + // Keep track of all 'downloadas-' options and register them as // export formats with docLayer which can then be publicly accessed unlike // this Menubar control for which there doesn't seem to be any easy way commit 6c5443f4a7005d1b826f29acf63d29989f2461c2 Author: Pranav Kant <[email protected]> Date: Wed Jun 21 12:12:25 2017 +0530 Disable Copy from calc cells and formula bar ... of course only when DisableCopy is mentioned. (cherry picked from commit 6e46c760ce6928e5c2120499a44d79529e263e07) (cherry picked from commit 202b9974d74469355203f9e38400c7b6a6a50a7d) Change-Id: I843b7cab2e3fe2dd691396e4702281a6bc953947 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index e227c074..b49a88f6 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -938,6 +938,14 @@ map.on('wopiprops', function(e) { w2ui['toolbar-up'].hide('save'); w2ui['toolbar-up'].hide('savebreak'); } + if (e.DisableCopy) { + $('input#formulaInput').bind('copy', function(evt) { + evt.preventDefault(); + }); + $('input#addressInput').bind('copy', function(evt) { + evt.preventDefault(); + }); + } }); map.on('doclayerinit', function () { @@ -1573,7 +1581,7 @@ function getUserItem(viewId, userName, extraInfo, color) { var html = '<tr class="' + className + '" id="user-' + viewId + '" onclick="onUseritemClicked(event)">' + '<td class=usercolor style="background-color: ' + color +';">'; if (extraInfo !== undefined && extraInfo.avatar !== undefined) { - html += '<img src="' + extraInfo.avatar + '" width="32" height="32" />' + html += '<img src="' + extraInfo.avatar + '" width="32" height="32" />'; } // TODO: Add mail and other links as sub-menu. diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 109569ce..187d26d1 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -509,7 +509,9 @@ L.TileLayer = L.GridLayer.extend({ _onCellFormulaMsg: function (textMsg) { var formula = textMsg.substring(13); - this._selectionTextContent = formula; + if (!this._map['wopi'].DisableCopy) { + this._selectionTextContent = formula; + } this._map.fire('cellformula', {formula: formula}); }, _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
