[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 5 19:08:55 UTC 2020
loleaflet/src/control/Control.Menubar.js | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
New commits:
commit d69350013c0960560a45a14a055081d2930fdf78
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Thu Jul 2 16:00:14 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Jul 5 21:08:36 2020 +0200
leaflet: Removed impress download options from drawing doc
Change-Id: Iaddc3f8330733ec89af0cb0ec6ed14d1f51999ff
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97740
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
(cherry picked from commit 32185682de346c9a729a2ef2efb0d66713a6a84d)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97799
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 63278bf62..3eea9a713 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -257,9 +257,11 @@ L.Control.Menubar = L.Control.extend({
{name: _('See revision history'), id: 'rev-history', type: 'action'},
{name: !window.ThisIsAMobileApp ? _('Download as') : _('Export as'), id: 'downloadas', type: 'menu', menu: [
{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'},
- {name: _('ODF presentation (.odp)'), id: 'downloadas-odp', type: 'action'},
- {name: _('PowerPoint 2003 Presentation (.ppt)'), id: 'downloadas-ppt', type: 'action'},
- {name: _('PowerPoint Presentation (.pptx)'), id: 'downloadas-pptx', type: 'action'}]},
+ {name: _('ODF presentation (.odp)'), id: 'downloadas-odp', type: 'action', drawing: false},
+ {name: _('PowerPoint 2003 Presentation (.ppt)'), id: 'downloadas-ppt', type: 'action', drawing: false},
+ {name: _('PowerPoint Presentation (.pptx)'), id: 'downloadas-pptx', type: 'action', drawing: false},
+ {name: _('ODF Drawing (.odg)'), id: 'downloadas-odg', type: 'action'}
+ ]},
{type: 'separator'},
{name: _('Close document'), id: 'closedocument', type: 'action'}
]},
@@ -538,9 +540,10 @@ L.Control.Menubar = L.Control.extend({
]},
{name: !window.ThisIsAMobileApp ? _('Download as') : _('Export as'), id:'downloadas', type: 'menu', menu: [
{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'},
- {name: _('ODF presentation (.odp)'), id: 'downloadas-odp', type: 'action'},
- {name: _('PowerPoint 2003 Presentation (.ppt)'), id: 'downloadas-ppt', type: 'action'},
- {name: _('PowerPoint Presentation (.pptx)'), id: 'downloadas-pptx', type: 'action'},
+ {name: _('ODF presentation (.odp)'), id: 'downloadas-odp', type: 'action', drawing: false},
+ {name: _('PowerPoint 2003 Presentation (.ppt)'), id: 'downloadas-ppt', type: 'action', drawing: false},
+ {name: _('PowerPoint Presentation (.pptx)'), id: 'downloadas-pptx', type: 'action', drawing: false},
+ {name: _('ODF Drawing (.odg)'), id: 'downloadas-odg', type: 'action'}
]},
{name: _UNO('.uno:EditMenu', 'presentation'), id: 'editmenu', type: 'menu', menu: [
{uno: '.uno:Undo'},
@@ -1384,6 +1387,12 @@ L.Control.Menubar = L.Control.extend({
if (menuItem.id === 'changesmenu' && this._map['wopi'].HideChangeTrackingControls)
return false;
+ if (menuItem.drawing === false && this._map.getDocType() === 'drawing')
+ return false;
+
+ if (menuItem.id === 'downloadas-odg' && !this._map['wopi'].BaseFileName.endsWith('.odg'))
+ return false;
+
// 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
More information about the Libreoffice-commits
mailing list