summaryrefslogtreecommitdiff
path: root/framework/util
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 /framework/util
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 'framework/util')
-rw-r--r--framework/util/fwk.component4
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index 6541f1406f3f..477d524cac34 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -196,4 +196,8 @@
constructor="org_apache_openoffice_comp_framework_WizardsToolbarController_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
+ <implementation name="com.sun.star.comp.framework.SubToolBarController"
+ constructor="com_sun_star_comp_framework_SubToolBarController_get_implementation">
+ <service name="com.sun.star.frame.ToolbarController"/>
+ </implementation>
</component>