summaryrefslogtreecommitdiff
path: root/officecfg
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-07-12 21:11:17 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2015-07-13 12:09:52 +0000
commit2aea9e37d697ce51efc5fb37ba50f1bf177e0445 (patch)
treec6564f6cc7a61c497be13b146ed00615652b85dc /officecfg
parent9c2a8065add0da1e649633efa0795beddfa68eed (diff)
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 <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'officecfg')
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu120
1 files changed, 36 insertions, 84 deletions
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 @@
<value>com.sun.star.comp.chart.ElementSelectorToolbarController</value>
</prop>
</node>
- <node oor:name="com.sun.star.chart2.BasicShapesToolbarController" oor:op="replace">
+ <node oor:name="BasicShapesToolbarController" oor:op="replace">
<prop oor:name="Command">
<value>.uno:BasicShapes</value>
</prop>
<prop oor:name="Module">
- <value>com.sun.star.chart2.ChartDocument</value>
+ <value/>
</prop>
<prop oor:name="Controller">
- <value>com.sun.star.comp.chart2.ShapeToolbarController</value>
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>basicshapes;.uno:BasicShapes.diamond</value>
</prop>
</node>
- <node oor:name="com.sun.star.chart2.SymbolShapesToolbarController" oor:op="replace">
+ <node oor:name="SymbolShapesToolbarController" oor:op="replace">
<prop oor:name="Command">
<value>.uno:SymbolShapes</value>
</prop>
<prop oor:name="Module">
- <value>com.sun.star.chart2.ChartDocument</value>
+ <value/>
</prop>
<prop oor:name="Controller">
- <value>com.sun.star.comp.chart2.ShapeToolbarController</value>
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>symbolshapes;.uno:SymbolShapes.smiley</value>
</prop>
</node>
- <node oor:name="com.sun.star.chart2.ArrowShapesToolbarController" oor:op="replace">
+ <node oor:name="ArrowShapesToolbarController" oor:op="replace">
<prop oor:name="Command">
<value>.uno:ArrowShapes</value>
</prop>
<prop oor:name="Module">
- <value>com.sun.star.chart2.ChartDocument</value>
+ <value/>
</prop>
<prop oor:name="Controller">
- <value>com.sun.star.comp.chart2.ShapeToolbarController</value>
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>arrowshapes;.uno:ArrowShapes.left-right-arrow</value>
</prop>
</node>
- <node oor:name="com.sun.star.chart2.FlowChartShapesToolbarController" oor:op="replace">
+ <node oor:name="FlowChartShapesToolbarController" oor:op="replace">
<prop oor:name="Command">
<value>.uno:FlowChartShapes</value>
</prop>
<prop oor:name="Module">
- <value>com.sun.star.chart2.ChartDocument</value>
+ <value/>
</prop>
<prop oor:name="Controller">
- <value>com.sun.star.comp.chart2.ShapeToolbarController</value>
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>flowchartshapes;.uno:FlowChartShapes.flowchart-internal-storage</value>
</prop>
</node>
- <node oor:name="com.sun.star.chart2.CalloutShapesToolbarController" oor:op="replace">
+ <node oor:name="CalloutShapesToolbarController" oor:op="replace">
<prop oor:name="Command">
<value>.uno:CalloutShapes</value>
</prop>
<prop oor:name="Module">
- <value>com.sun.star.chart2.ChartDocument</value>
+ <value/>
</prop>
<prop oor:name="Controller">
- <value>com.sun.star.comp.chart2.ShapeToolbarController</value>
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>calloutshapes;.uno:CalloutShapes.round-rectangular-callout</value>
</prop>
</node>
- <node oor:name="com.sun.star.chart2.StarShapesToolbarController" oor:op="replace">
+ <node oor:name="StarShapesToolbarController" oor:op="replace">
<prop oor:name="Command">
<value>.uno:StarShapes</value>
</prop>
<prop oor:name="Module">
- <value>com.sun.star.chart2.ChartDocument</value>
+ <value/>
</prop>
<prop oor:name="Controller">
- <value>com.sun.star.comp.chart2.ShapeToolbarController</value>
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>starshapes;.uno:StarShapes.star5</value>
</prop>
</node>
<node oor:name="com.sun.star.svx.FindTextToolboxController" oor:op="replace">
@@ -517,72 +535,6 @@
<value>com.sun.star.report.ReportToolboxController</value>
</prop>
</node>
- <node oor:name="c7" oor:op="replace" install:module="reportbuilder">
- <prop oor:name="Command">
- <value>.uno:BasicShapes</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.report.ReportDefinition</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.report.ReportToolboxController</value>
- </prop>
- </node>
- <node oor:name="c8" oor:op="replace" install:module="reportbuilder">
- <prop oor:name="Command">
- <value>.uno:SymbolShapes</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.report.ReportDefinition</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.report.ReportToolboxController</value>
- </prop>
- </node>
- <node oor:name="c9" oor:op="replace" install:module="reportbuilder">
- <prop oor:name="Command">
- <value>.uno:ArrowShapes</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.report.ReportDefinition</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.report.ReportToolboxController</value>
- </prop>
- </node>
- <node oor:name="c10" oor:op="replace" install:module="reportbuilder">
- <prop oor:name="Command">
- <value>.uno:FlowChartShapes</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.report.ReportDefinition</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.report.ReportToolboxController</value>
- </prop>
- </node>
- <node oor:name="c11" oor:op="replace" install:module="reportbuilder">
- <prop oor:name="Command">
- <value>.uno:CalloutShapes</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.report.ReportDefinition</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.report.ReportToolboxController</value>
- </prop>
- </node>
- <node oor:name="c12" oor:op="replace" install:module="reportbuilder">
- <prop oor:name="Command">
- <value>.uno:StarShapes</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.report.ReportDefinition</value>
- </prop>
- <prop oor:name="Controller">
- <value>com.sun.star.report.ReportToolboxController</value>
- </prop>
- </node>
<node oor:name="c14" oor:op="replace" install:module="reportbuilder">
<prop oor:name="Command">
<value>.uno:CharFontName</value>