[Libreoffice-commits] online.git: loleaflet/css loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 6 07:51:46 UTC 2020


 loleaflet/css/notebookbar.css                       |    8 
 loleaflet/src/control/Control.NotebookbarImpress.js |  394 +++++++++++++++++++-
 loleaflet/src/control/Control.NotebookbarWriter.js  |   16 
 loleaflet/src/unocommands.js                        |    2 
 4 files changed, 410 insertions(+), 10 deletions(-)

New commits:
commit fd8a1252709a765cb124ed6b5c3bdd33b9de110b
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Aug 6 09:05:09 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Aug 6 09:51:28 2020 +0200

    notebookbar: customize Insert tab in Impress
    
    Change-Id: I079148922effbef618fb337f82c35bfefa3d89b3
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100195
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/css/notebookbar.css b/loleaflet/css/notebookbar.css
index ef1aa46e1..aecffe463 100644
--- a/loleaflet/css/notebookbar.css
+++ b/loleaflet/css/notebookbar.css
@@ -664,6 +664,14 @@ div[id*='Row'].notebookbar, div[id*='Column'].notebookbar, #SendToBack.notebookb
 
 /* Insert Tab */
 
+.presentation-color-indicator + #toolbar-wrapper #table-Insert #InsertTable.notebookbar {
+	width: 80px;
+}
+
+#table-Insert #HeaderAndFooter.notebookbar {
+	width: 160px;
+}
+
 #table-Insert-Section-DrawText #Text.notebookbar img,
 #table-Insert-Section-Slide #InsertPage.notebookbar img
 {
diff --git a/loleaflet/src/control/Control.NotebookbarImpress.js b/loleaflet/src/control/Control.NotebookbarImpress.js
index a0f13cb56..6c4eb3ea5 100644
--- a/loleaflet/src/control/Control.NotebookbarImpress.js
+++ b/loleaflet/src/control/Control.NotebookbarImpress.js
@@ -95,8 +95,8 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
 			},
 			{
 				'text': _('~Insert'),
-				'id': '3',
-				'name': 'InsertLabel'
+				'id': '-4',
+				'name': 'Insert'
 			},
 			{
 				'text': _('~Review'),
@@ -141,6 +141,10 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
 		case 'Format':
 			this.loadTab(this.getFormatTab());
 			break;
+
+		case 'Insert':
+			this.loadTab(this.getInsertTab());
+			break;
 		}
 	},
 
@@ -1977,6 +1981,392 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
 				}
 			]
 		};
+	},
+
+	getInsertTab: function() {
+		return {
+			'id': '',
+			'type': 'control',
+			'text': '',
+			'enabled': 'true',
+			'children': [
+				{
+					'id': '',
+					'type': 'container',
+					'text': '',
+					'enabled': 'true',
+					'children': [
+						{
+							'id': 'NotebookBar',
+							'type': 'grid',
+							'text': '',
+							'enabled': 'true',
+							'children': [
+								{
+									'id': 'box',
+									'type': 'container',
+									'text': '',
+									'enabled': 'true',
+									'children': [
+										{
+											'id': 'ContextContainer',
+											'type': 'tabcontrol',
+											'text': '',
+											'enabled': 'true',
+											'children': [
+												{
+													'id': '',
+													'type': 'tabpage',
+													'text': '',
+													'enabled': 'true',
+													'children': [
+														{
+															'id': 'Insert Tab',
+															'type': 'container',
+															'text': '',
+															'enabled': 'true',
+															'children': [
+																{
+																	'id': 'Insert',
+																	'type': 'container',
+																	'text': '',
+																	'enabled': 'true',
+																	'children': [
+																		{
+																			'id': 'Insert-Section-Page',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'GroupB29',
+																					'type': 'container',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'id': 'LineA15',
+																							'type': 'toolbox',
+																							'text': '',
+																							'enabled': 'true',
+																							'children': [
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:InsertPage', 'presentation'),
+																									'command': '.uno:InsertPage'
+																								}
+																							]
+																						},
+																						{
+																							'id': 'LineB16',
+																							'type': 'toolbox',
+																							'text': '',
+																							'enabled': 'true',
+																							'children': [
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:DuplicatePage', 'presentation'),
+																									'command': '.uno:DuplicatePage'
+																								}
+																							]
+																						}
+																					],
+																					'vertical': 'true'
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Section-Table',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'SectionBottom12',
+																					'type': 'toolbox',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'type': 'bigtoolitem',
+																							'text': _UNO('.uno:InsertTable', 'presentation'),
+																							'command': '.uno:InsertTable'
+																						}
+																					]
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Section-Image',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'SectionBottom65',
+																					'type': 'toolbox',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'type': 'bigtoolitem',
+																							'text': _UNO('.uno:InsertGraphic'),
+																							'command': '.uno:InsertGraphic'
+																						}
+																					]
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Section-Table1',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'LineA11',
+																					'type': 'toolbox',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'type': 'bigtoolitem',
+																							'text': _UNO('.uno:InsertObjectChart'),
+																							'command': '.uno:InsertObjectChart'
+																						}
+																					]
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Section-Bookmark',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'SectionBottom14',
+																					'type': 'toolbox',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'type': 'bigtoolitem',
+																							'text': _UNO('.uno:HyperlinkDialog'),
+																							'command': '.uno:HyperlinkDialog'
+																						}
+																					]
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Text',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'GroupB293',
+																					'type': 'container',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'id': 'LineA153',
+																							'type': 'toolbox',
+																							'text': '',
+																							'enabled': 'true',
+																							'children': [
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:Text', 'presentation'),
+																									'command': '.uno:Text'
+																								}
+																							]
+																						},
+																						{
+																							'id': 'LineB163',
+																							'type': 'toolbox',
+																							'text': '',
+																							'enabled': 'true',
+																							'children': [
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:VerticalText', 'presentation'),
+																									'command': '.uno:VerticalText'
+																								}
+																							]
+																						}
+																					],
+																					'vertical': 'true'
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Section-Draw2',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'shapes6',
+																					'type': 'toolbox',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'type': 'bigtoolitem',
+																							'text': _UNO('.uno:BasicShapes'),
+																							'command': '.uno:BasicShapes'
+																						}
+																					]
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Text',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'GroupB293',
+																					'type': 'container',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'id': 'LineA153',
+																							'type': 'toolbox',
+																							'text': '',
+																							'enabled': 'true',
+																							'children': [
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:InsertDateFieldFix', 'presentation'),
+																									'command': '.uno:InsertDateFieldFix'
+																								},
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:InsertDateFieldVar', 'presentation'),
+																									'command': '.uno:InsertDateFieldVar'
+																								},
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:InsertSlideField', 'presentation'),
+																									'command': '.uno:InsertSlideField'
+																								},
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:InsertSlidesField', 'presentation'),
+																									'command': '.uno:InsertSlidesField'
+																								}
+																							]
+																						},
+																						{
+																							'id': 'LineB163',
+																							'type': 'toolbox',
+																							'text': '',
+																							'enabled': 'true',
+																							'children': [
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:InsertTimeFieldFix', 'presentation'),
+																									'command': '.uno:InsertTimeFieldFix'
+																								},
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:InsertTimeFieldVar', 'presentation'),
+																									'command': '.uno:InsertTimeFieldVar'
+																								},
+																								{
+																									'type': 'toolitem',
+																									'text': _UNO('.uno:InsertSlideTitleField', 'presentation'),
+																									'command': '.uno:InsertSlideTitleField'
+																								}
+																							]
+																						}
+																					],
+																					'vertical': 'true'
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Section-Symbol',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'SectionBottom105',
+																					'type': 'toolbox',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'type': 'bigtoolitem',
+																							'text': _UNO('.uno:CharmapControl'),
+																							'command': '.uno:CharmapControl'
+																						}
+																					]
+																				}
+																			],
+																			'vertical': 'false'
+																		},
+																		{
+																			'id': 'Insert-Section-HeaderFooter',
+																			'type': 'container',
+																			'text': '',
+																			'enabled': 'true',
+																			'children': [
+																				{
+																					'id': 'SectionHeaderFooter',
+																					'type': 'toolbox',
+																					'text': '',
+																					'enabled': 'true',
+																					'children': [
+																						{
+																							'type': 'bigtoolitem',
+																							'text': _UNO('.uno:HeaderAndFooter', 'presentation'),
+																							'command': '.uno:HeaderAndFooter'
+																						}
+																					]
+																				}
+																			],
+																			'vertical': 'false'
+																		}
+																	],
+																	'vertical': 'false'
+																}
+															],
+															'vertical': 'false'
+														}
+													]
+												}
+											],
+											'tabs': [],
+											'selected': '-4'
+										}
+									],
+									'vertical': 'true',
+									'left': '0',
+									'top': '0'
+								}
+							]
+						}
+					],
+					'vertical': 'true'
+				}
+			]
+		};
 	}
 });
 
diff --git a/loleaflet/src/control/Control.NotebookbarWriter.js b/loleaflet/src/control/Control.NotebookbarWriter.js
index eb3002beb..b17e4be32 100644
--- a/loleaflet/src/control/Control.NotebookbarWriter.js
+++ b/loleaflet/src/control/Control.NotebookbarWriter.js
@@ -2299,21 +2299,21 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
 																			'vertical': 'false'
 																		},
 																		{
-																			'id': 'Insert-Section-Table1',
+																			'id': 'Insert-Section-Image',
 																			'type': 'container',
 																			'text': '',
 																			'enabled': 'true',
 																			'children': [
 																				{
-																					'id': 'LineA11',
+																					'id': 'SectionBottom65',
 																					'type': 'toolbox',
 																					'text': '',
 																					'enabled': 'true',
 																					'children': [
 																						{
 																							'type': 'bigtoolitem',
-																							'text': _UNO('.uno:InsertObjectChart'),
-																							'command': '.uno:InsertObjectChart'
+																							'text': _UNO('.uno:InsertGraphic'),
+																							'command': '.uno:InsertGraphic'
 																						}
 																					]
 																				}
@@ -2321,21 +2321,21 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
 																			'vertical': 'false'
 																		},
 																		{
-																			'id': 'Insert-Section-Image',
+																			'id': 'Insert-Section-Table1',
 																			'type': 'container',
 																			'text': '',
 																			'enabled': 'true',
 																			'children': [
 																				{
-																					'id': 'SectionBottom65',
+																					'id': 'LineA11',
 																					'type': 'toolbox',
 																					'text': '',
 																					'enabled': 'true',
 																					'children': [
 																						{
 																							'type': 'bigtoolitem',
-																							'text': _UNO('.uno:InsertGraphic'),
-																							'command': '.uno:InsertGraphic'
+																							'text': _UNO('.uno:InsertObjectChart'),
+																							'command': '.uno:InsertObjectChart'
 																						}
 																					]
 																				}
diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js
index 5f52158ca..be4f9f46e 100644
--- a/loleaflet/src/unocommands.js
+++ b/loleaflet/src/unocommands.js
@@ -79,6 +79,7 @@ var unoCommandsArray = {
 	DiagramType:{global:{menu:_('Chart T~ype...'),},},
 	DownSearch:{global:{menu:_('Find Next'),},},
 	DrawText:{global:{context:_('Insert Text Box'),menu:_('~Text Box'),},},
+	DuplicatePage:{presentation:{menu:_('Duplicate Page'),},},
 	DuplicateSlide:{presentation:{menu:_('Duplicate ~Slide'),},},
 	EditHeaderAndFooter:{spreadsheet:{menu:_('~Headers and Footers...'),},},
 	EditMenu:{global:{menu:_('~Edit'),},},
@@ -171,6 +172,7 @@ var unoCommandsArray = {
 	InsertNeutralParagraph:{text:{menu:_('Insert Unnumbered Entry'),},},
 	InsertNonBreakingSpace:{global:{menu:_('~Non-breaking space'),},},
 	InsertObjectChart:{global:{context:_('Insert Chart'),menu:_('~Chart...'),},},
+	InsertPage:{presentation:{menu:_('New Page'),},},
 	InsertPageCountField:{text:{menu:_('Page ~Count'),},},
 	InsertPageFooter:{text:{menu:_('Foote~r'),},},
 	InsertPageHeader:{text:{menu:_('He~ader'),},},


More information about the Libreoffice-commits mailing list