[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/src loleaflet/unocommands.js
Andras Timar
andras.timar at collabora.com
Mon Jan 15 19:05:28 UTC 2018
loleaflet/src/control/Control.Menubar.js | 42 ++-----------------------------
loleaflet/unocommands.js | 1
2 files changed, 5 insertions(+), 38 deletions(-)
New commits:
commit d61ce94ebf0d1ed78f1f71423f6ba7d33290b983
Author: Andras Timar <andras.timar at collabora.com>
Date: Tue Jan 9 10:17:02 2018 +0100
Format - Page... dialog instead of custom Page menus
Change-Id: I7b91505a7f875fa67d4e5214bd697451c4b3c5e2
Reviewed-on: https://gerrit.libreoffice.org/47634
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 353672fd..68d6fb9c 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -157,18 +157,10 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:FontDialog'},
{uno: '.uno:ParagraphDialog'},
{uno: '.uno:OutlineBullet'},
+ {uno: '.uno:PageDialog'},
{type: 'separator'},
- {uno: '.uno:ResetAttributes'},
- {name: _('Page'), type: 'menu', menu: [
- {name: 'A4, ' + _('Portrait'), type: 'action', id: 'a4portrait'},
- {name: 'A4, ' + _('Landscape'), type: 'action', id: 'a4landscape'},
- {name: 'A5, ' + _('Portrait'), type: 'action', id: 'a5portrait'},
- {name: 'A5, ' + _('Landscape'), type: 'action', id: 'a5landscape'},
- {name: 'Letter, ' + _('Portrait'), type: 'action', id: 'letterportrait'},
- {name: 'Letter, ' + _('Landscape'), type: 'action', id: 'letterlandscape'},
- {name: 'Legal, ' + _('Portrait'), type: 'action', id: 'legalportrait'},
- {name: 'Legal, ' + _('Landscape'), type: 'action', id: 'legallandscape'}]}]
- },
+ {uno: '.uno:ResetAttributes'}
+ ]},
{name: _UNO('.uno:TableMenu', 'text'), type: 'menu', menu: [
{name: _UNO('.uno:TableInsertMenu', 'text'), type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
@@ -658,35 +650,9 @@ L.Control.Menubar = L.Control.extend({
map.fire('postMessage', {msgId: 'close', args: {EverModified: map._everModified, Deprecated: true}});
map.fire('postMessage', {msgId: 'UI_Close', args: {EverModified: map._everModified}});
map.remove();
- }
- else if (id === 'repair') {
+ } else if (id === 'repair') {
map._socket.sendMessage('commandvalues command=.uno:DocumentRepair');
- } else if (id === 'a4portrait') {
- map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "21000"},"AttributePageSize.Height":{"type":"long", "value": "29700"}}');
- map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "false"}}');
- } else if (id === 'a4landscape') {
- map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Height":{"type":"long", "value": "21000"},"AttributePageSize.Width":{"type":"long", "value": "29700"}}');
- map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "true"}}');
- } else if (id === 'a5portrait') {
- map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "14800"},"AttributePageSize.Height":{"type":"long", "value": "21000"}}');
- map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "false"}}');
- } else if (id === 'a5landscape') {
- map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Height":{"type":"long", "value": "14800"},"AttributePageSize.Width":{"type":"long", "value": "21000"}}');
- map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "true"}}');
- } else if (id === 'letterportrait') {
- map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "21950"},"AttributePageSize.Height":{"type":"long", "value": "27940"}}');
- map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "false"}}');
- } else if (id === 'letterlandscape') {
- map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Height":{"type":"long", "value": "21950"},"AttributePageSize.Width":{"type":"long", "value": "27940"}}');
- map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "true"}}');
- } else if (id === 'legalportrait') {
- map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "21590"},"AttributePageSize.Height":{"type":"long", "value": "35560"}}');
- map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "false"}}');
- } else if (id === 'legallandscape') {
- map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Height":{"type":"long", "value": "21590"},"AttributePageSize.Width":{"type":"long", "value": "35560"}}');
- map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "true"}}');
}
-
// Inform the host if asked
if ($(item).data('postmessage') === 'true') {
map.fire('postMessage', {msgId: 'Clicked_Button', args: {Id: id} });
diff --git a/loleaflet/unocommands.js b/loleaflet/unocommands.js
index 2178253e..14ec0ce6 100644
--- a/loleaflet/unocommands.js
+++ b/loleaflet/unocommands.js
@@ -139,6 +139,7 @@ var unoCommandsArray = {
OutlineBullet:{global:{menu:_('~Bullets and Numbering...'),},},
OutlineFont:{global:{menu:_('Outline'),},},
Overline:{global:{menu:_('Overline'),},},
+ PageDialog:{global:{menu:_('~Page...'),},text:{menu:_('~Page...'),},},
PageDown:{text:{menu:_('Next Page'),},},
PageUp:{text:{menu:_('Previous Page'),},},
ParaLeftToRight:{global:{menu:_('Left-To-Right'),},},
More information about the Libreoffice-commits
mailing list