From 2aea9e37d697ce51efc5fb37ba50f1bf177e0445 Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Sun, 12 Jul 2015 21:11:17 +0300 Subject: Introduce generic sub toolbar controller Currently many toolbar controllers are basically doing the same thing - show some docked toolbar. So the idea here is to have one generic controller that will handle all these cases in a unified way. It will get the name of the toolbar that it's supposed to show from the configuration, based on the command it was registered for. Right now it can handle both simple (i.e. with DROPDOWNONLY bits) and split (i.e. with DROPDOWN bits) scenarios, where for split kind it replaces the function (and the image) of the main part of the button, with the last selected function, for easy reusing. A button is considered to be a split one, if the name of the initial default command was passed along with the sub toolbar name, otherwise it will be a simple button. The core change is in framework/. Other parts are a usage example, in form of converting the custom shapes buttons to this new controller. Change-Id: I087cc58c3db1889ca69a26546d4f00fe07e2a58d Reviewed-on: https://gerrit.libreoffice.org/16967 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky --- .../data/org/openoffice/Office/UI/Controller.xcu | 120 +++++++-------------- 1 file changed, 36 insertions(+), 84 deletions(-) (limited to 'officecfg') diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu index 74acecb4a710..165f8638d654 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -341,70 +341,88 @@ com.sun.star.comp.chart.ElementSelectorToolbarController - + .uno:BasicShapes - com.sun.star.chart2.ChartDocument + - com.sun.star.comp.chart2.ShapeToolbarController + com.sun.star.comp.framework.SubToolBarController + + + basicshapes;.uno:BasicShapes.diamond - + .uno:SymbolShapes - com.sun.star.chart2.ChartDocument + - com.sun.star.comp.chart2.ShapeToolbarController + com.sun.star.comp.framework.SubToolBarController + + + symbolshapes;.uno:SymbolShapes.smiley - + .uno:ArrowShapes - com.sun.star.chart2.ChartDocument + - com.sun.star.comp.chart2.ShapeToolbarController + com.sun.star.comp.framework.SubToolBarController + + + arrowshapes;.uno:ArrowShapes.left-right-arrow - + .uno:FlowChartShapes - com.sun.star.chart2.ChartDocument + - com.sun.star.comp.chart2.ShapeToolbarController + com.sun.star.comp.framework.SubToolBarController + + + flowchartshapes;.uno:FlowChartShapes.flowchart-internal-storage - + .uno:CalloutShapes - com.sun.star.chart2.ChartDocument + - com.sun.star.comp.chart2.ShapeToolbarController + com.sun.star.comp.framework.SubToolBarController + + + calloutshapes;.uno:CalloutShapes.round-rectangular-callout - + .uno:StarShapes - com.sun.star.chart2.ChartDocument + - com.sun.star.comp.chart2.ShapeToolbarController + com.sun.star.comp.framework.SubToolBarController + + + starshapes;.uno:StarShapes.star5 @@ -517,72 +535,6 @@ com.sun.star.report.ReportToolboxController - - - .uno:BasicShapes - - - com.sun.star.report.ReportDefinition - - - com.sun.star.report.ReportToolboxController - - - - - .uno:SymbolShapes - - - com.sun.star.report.ReportDefinition - - - com.sun.star.report.ReportToolboxController - - - - - .uno:ArrowShapes - - - com.sun.star.report.ReportDefinition - - - com.sun.star.report.ReportToolboxController - - - - - .uno:FlowChartShapes - - - com.sun.star.report.ReportDefinition - - - com.sun.star.report.ReportToolboxController - - - - - .uno:CalloutShapes - - - com.sun.star.report.ReportDefinition - - - com.sun.star.report.ReportToolboxController - - - - - .uno:StarShapes - - - com.sun.star.report.ReportDefinition - - - com.sun.star.report.ReportToolboxController - - .uno:CharFontName -- cgit