summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2018-02-16 10:23:01 -0400
committerMichael Meeks <michael.meeks@collabora.com>2018-02-16 18:29:49 +0100
commit785fb7e34a16e7d60f13256b306fd74598fea06b (patch)
treee629a73abe2045493b3d2cb0ed831b8b25d080d0
parent1f4860324a5e74b2e40830f9e618a1be9bec953e (diff)
loleaflet: add "Insert Fields" menu
Field Page Number Page Count Date Time Title Author Subject Change-Id: I4360372312abab04c34411bdca317b59c93141c4 Reviewed-on: https://gerrit.libreoffice.org/49866 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--loleaflet/src/control/Control.Menubar.js9
-rw-r--r--loleaflet/unocommands.js8
2 files changed, 17 insertions, 0 deletions
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 349b7b5f9..f2ba32ef7 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -64,6 +64,15 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:InsertGraphic', 'text'), id: 'insertgraphic', type: 'action'},
{name: _UNO('.uno:InsertAnnotation', 'text'), id: 'insertcomment', type: 'action'},
{type: 'separator'},
+ {name: _UNO('.uno:InsertField', 'text'), type: 'menu', menu: [
+ {uno: '.uno:InsertPageNumberField'},
+ {uno: '.uno:InsertPageCountField'},
+ {uno: '.uno:InsertDateField'},
+ {uno: '.uno:InsertTimeField'},
+ {uno: '.uno:InsertTitleField'},
+ {uno: '.uno:InsertAuthorField'},
+ {uno: '.uno:InsertTopicField'}
+ ]},
{name: _UNO('.uno:InsertHeaderFooterMenu', 'text'), type: 'menu', menu: [
{name: _UNO('.uno:InsertPageHeader', 'text'), type: 'menu', menu: [
{name: _('All'), disabled: true, id: 'insertheader', tag: '_ALL_', uno: '.uno:InsertPageHeader?'}]},
diff --git a/loleaflet/unocommands.js b/loleaflet/unocommands.js
index b11631ce1..d537e01ca 100644
--- a/loleaflet/unocommands.js
+++ b/loleaflet/unocommands.js
@@ -84,12 +84,15 @@ var unoCommandsArray = {
IncrementLevel:{text:{menu:_('Promote One Level'),},},
IncrementSubLevels:{text:{menu:_('Promote One Level With Subpoints'),},},
InsertAnnotation:{global:{context:_('Insert Comment'),menu:_('Comme~nt'),},presentation:{menu:_('Comme~nt'),},spreadsheet:{context:_('Insert Co~mment'),menu:_('Comm~ent'),},},
+ InsertAuthorField:{presentation:{menu:_('~Author'),},text:{menu:_('~Author'),},},
InsertBreakMenu:{spreadsheet:{menu:_('Insert Page ~Break'),},},
InsertColumnBreak:{spreadsheet:{menu:_('~Column Break'),},text:{menu:_('Insert Column Break'),},},
InsertColumnsAfter:{presentation:{menu:_('Insert Column Right'),},spreadsheet:{context:_('Insert Columns ~Right'),menu:_('Columns ~Right'),},text:{menu:_('Columns R~ight'),},},
InsertColumnsBefore:{presentation:{menu:_('Insert Column Left'),},spreadsheet:{context:_('Insert Columns ~Left'),menu:_('Columns ~Left'),},text:{menu:_('Columns ~Left'),},},
InsertColumnsMenu:{spreadsheet:{menu:_('Insert Co~lumns'),},},
+ InsertDateField:{text:{menu:_('~Date'),},},
InsertEndnote:{text:{menu:_('~Endnote'),},},
+ InsertField:{text:{menu:_('~Fields'),},},
InsertFootnote:{text:{menu:_('~Footnote'),},},
InsertGraphic:{global:{context:_('Insert Image'),menu:_('~Image...'),},},
InsertHardHyphen:{global:{menu:_('Non-br~eaking hyphen'),},},
@@ -101,6 +104,8 @@ var unoCommandsArray = {
InsertNonBreakingSpace:{global:{menu:_('~Non-breaking space'),},},
InsertPageFooter:{text:{menu:_('Foote~r'),},},
InsertPageHeader:{text:{menu:_('He~ader'),},},
+ InsertPageCountField:{text:{menu:_('Page ~Count'),},},
+ InsertPageNumberField:{global:{menu:_('~Page Numbers...'),},text:{menu:_('~Page Number'),},},
InsertPagebreak:{text:{menu:_('~Page Break'),},},
InsertRLM:{global:{menu:_('~Right-to-left mark'),},},
InsertRowBreak:{spreadsheet:{menu:_('~Row Break'),},},
@@ -110,6 +115,9 @@ var unoCommandsArray = {
InsertSlide:{presentation:{menu:_('New Slid~e'),},},
InsertSoftHyphen:{global:{menu:_('S~oft hyphen'),},},
InsertSymbol:{global:{context:_('Insert Special Character'),menu:_('S~pecial Character...'),},},
+ InsertTimeField:{global:{menu:_('Time Field'),},text:{menu:_('~Time'),},},
+ InsertTitleField:{text:{menu:_('T~itle'),},},
+ InsertTopicField:{text:{menu:_('~Subject'),},},
InsertZWNBSP:{global:{menu:_('No-width no ~break'),},},
InsertZWSP:{global:{menu:_('No-~width optional break'),},},
Italic:{global:{menu:_('Italic'),},},