mobile: Add orientation commands to Page Setup in hamburger menu
It checks for the state of the .uno:Orientation which comes from core commit 7285b040ccf619210207c555981beb6df64cfc5a Change-Id: Idc20f8b6f7c5ba10f5ce4726f4bc4408116dfe6f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86704 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com>distro/collabora/code-4.2.0-4
parent
4360aba862
commit
53e6b0d07e
|
@ -497,6 +497,10 @@ L.Control.Menubar = L.Control.extend({
|
|||
{uno: '.uno:PreviousTrackedChange'},
|
||||
{uno: '.uno:NextTrackedChange'}
|
||||
]},
|
||||
{name: _('Page Setup'), id: 'pagesetup', type: 'menu', menu: [
|
||||
{name: _('Portrait'), id: 'setportrait', uno: '.uno:ToggleOrientation'},
|
||||
{name: _('Landscape'), id: 'setlandscape', uno: '.uno:ToggleOrientation'}
|
||||
]},
|
||||
{name: _UNO('.uno:ViewMenu', 'text'), id: 'view', type: 'menu', menu: [
|
||||
{uno: '.uno:ControlCodes'},
|
||||
{uno: '.uno:SpellOnline'},
|
||||
|
@ -1294,6 +1298,12 @@ L.Control.Menubar = L.Control.extend({
|
|||
if (menuItem.id === 'signdocument' && (L.DomUtil.get('document-signing-bar') === null)) {
|
||||
return false;
|
||||
}
|
||||
if (menuItem.id === 'setportrait' && this._map['stateChangeHandler'].getItemValue('.uno:Orientation') === 'IsPortrait') {
|
||||
return false;
|
||||
}
|
||||
else if (menuItem.id === 'setlandscape' && this._map['stateChangeHandler'].getItemValue('.uno:Orientation') === 'IsLandscape') {
|
||||
return false;
|
||||
}
|
||||
if (this._map._permission === 'readonly' && menuItem.type === 'menu') {
|
||||
var found = false;
|
||||
for (var j in this.options.allowedReadonlyMenus) {
|
||||
|
|
Loading…
Reference in New Issue