[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-5' - loleaflet/src

2020-07-15 Thread Jan Holesovsky (via logerrit)
 loleaflet/src/map/Map.js |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 28816052af02e1fa61d06806bf366be33d4b4b6a
Author: Jan Holesovsky 
AuthorDate: Wed Jul 15 23:24:55 2020 +0200
Commit: Jan Holesovsky 
CommitDate: Wed Jul 15 23:41:37 2020 +0200

android: Hide sidebar on Chromebooks early.

This is a hack - but I fear the best we can do just now.  The problem is
that the sidebar is always initialized at the startup, just for mobile
phones and tablets, we don't show it thanks to an early exit in
_launchSidebar() when the app starts in read-only mode (which it does
for phones and tablets).

Now when we have switched the Chromebook UI to the desktop one, we need
to explicitly turn the sidebar off on start, because otherwise it
occupies too much screen.

Of course - much better would be not to initialize the sidebar at all
when it is not necessary - but there's no easy way to do that :-(

Change-Id: I0340d125181285dcebda4ff78971182a7072dddb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98862
Tested-by: Jan Holesovsky 
Reviewed-by: Jan Holesovsky 

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 5f9882a53..0368915e3 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -304,6 +304,16 @@ L.Map = L.Evented.extend({
if (window.mode.isDesktop() && 
!window.ThisIsAMobileApp) {
map._socket.sendMessage('uno 
.uno:SidebarShow');
}
+   else if (window.mode.isChromebook()) {
+   // HACK - currently the sidebar 
shows when loaded,
+   // with the exception of mobile 
phones & tablets - but
+   // there, it does not show only 
because they start
+   // with read/only mode which 
hits an early exit in
+   // _launchSidebar() in 
Control.LokDialog.js
+   // So for the moment, let's 
just hide it on
+   // Chromebooks early
+   map._socket.sendMessage('uno 
.uno:SidebarHide');
+   }
}, 200);
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-5' - loleaflet/src

2020-07-05 Thread Pranam Lashkari (via logerrit)
 loleaflet/src/control/Control.Menubar.js |   21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

New commits:
commit 9a6d3561e05480533c4b3d96c812d4e89b2048d2
Author: Pranam Lashkari 
AuthorDate: Thu Jul 2 16:00:14 2020 +0530
Commit: Andras Timar 
CommitDate: Sun Jul 5 10:42:56 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 
Reviewed-by: Andras Timar 
(cherry picked from commit 32185682de346c9a729a2ef2efb0d66713a6a84d)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97800
Tested-by: Andras Timar 

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
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-5' - loleaflet/src

2020-07-05 Thread Pranam Lashkari (via logerrit)
 loleaflet/src/control/Control.Menubar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d75c37783e450bc8cd514e22613c1f52949d368a
Author: Pranam Lashkari 
AuthorDate: Fri Jul 3 17:24:11 2020 +0530
Commit: Andras Timar 
CommitDate: Sun Jul 5 10:42:27 2020 +0200

leaflet: allow download as odg in readonly mode(view mdoe)

Change-Id: I5bb1f9288280ffc18beaa893402752291c7d8507
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97802
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 283318f2e..63278bf62 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -724,7 +724,7 @@ L.Control.Menubar = L.Control.extend({
allowedViewModeActions: [
'shareas', 'print', // file menu
'downloadas-pdf', 'downloadas-odt', 'downloadas-doc', 
'downloadas-docx', 'downloadas-rtf', 'downloadas-epub', // file menu
-   'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', 
'print', // file menu
+   'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', 
'downloadas-odg', 'print', // file menu
'downloadas-ods', 'downloadas-xls', 'downloadas-xlsx', 
'closedocument', // file menu
'fullscreen', 'zoomin', 'zoomout', 'zoomreset', 
'showresolved', // view menu
'about', 'keyboard-shortcuts', 'latest-updates', 
'online-help', 'report-an-issue' // help menu
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits