[Libreoffice-commits] online.git: loleaflet/src
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 30 14:21:46 UTC 2019
loleaflet/src/control/Control.Toolbar.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 511ae81b21902f97950412b2c2df284d2e2138c8
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Sep 30 16:20:22 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Sep 30 16:21:28 2019 +0200
Don't use uninitialized tolbars on mobile Writer and Impress
- also correctly init position of document-container
Change-Id: Ibaf151247aaa39726828eaff2b13a2272bb89d38
Reviewed-on: https://gerrit.libreoffice.org/79868
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index ec76950bc..207702ba5 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1432,7 +1432,8 @@ function onDocLayerInit() {
break;
case 'text':
- toolbarUp.show('leftpara', 'centerpara', 'rightpara', 'justifypara', 'breakpara', 'linespacing',
+ if (toolbarUp)
+ toolbarUp.show('leftpara', 'centerpara', 'rightpara', 'justifypara', 'breakpara', 'linespacing',
'breakspacing', 'defaultbullet', 'defaultnumbering', 'breakbullet', 'incrementindent', 'decrementindent',
'breakindent', 'inserttable', 'insertannotation', 'backcolor', 'breaksidebar', 'sidebar');
@@ -1469,7 +1470,7 @@ function onDocLayerInit() {
break;
case 'presentation':
var presentationToolbar = w2ui['presentation-toolbar'];
- if (!map['wopi'].HideExportOption) {
+ if (!map['wopi'].HideExportOption && presentationToolbar) {
presentationToolbar.show('presentation', 'presentationbreak');
}
if (!_inMobileMode()) {
@@ -1489,9 +1490,11 @@ function onDocLayerInit() {
// FALLTHROUGH intended
case 'drawing':
- toolbarUp.show('leftpara', 'centerpara', 'rightpara', 'justifypara', 'breakpara', 'linespacing',
+ if (toolbarUp)
+ toolbarUp.show('leftpara', 'centerpara', 'rightpara', 'justifypara', 'breakpara', 'linespacing',
'breakspacing', 'defaultbullet', 'defaultnumbering', 'breakbullet', 'inserttextbox', 'inserttable', 'backcolor');
- statusbar.show('prev', 'next');
+ if (statusbar)
+ statusbar.show('prev', 'next');
$('#presentation-toolbar').show();
break;
@@ -2109,7 +2112,7 @@ function onUpdatePermission(e) {
$('#toolbar-down').hide();
switch (map._docLayer._docType) {
case 'text':
- $('#document-container').css('bottom', '35px');
+ $('#document-container').css('bottom', '0px');
break;
case 'spreadsheet':
$('#document-container').css('bottom', '35px');
@@ -2117,7 +2120,7 @@ function onUpdatePermission(e) {
$('#spreadsheet-toolbar').show();
break;
case 'presentation':
- $('#document-container').css('bottom', '35px');
+ $('#document-container').css('bottom', '0px');
break;
}
}
More information about the Libreoffice-commits
mailing list