forked from amazingfate/loongoffice
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>
55 lines
2.8 KiB
XML
55 lines
2.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* This file incorporates work covered by the following license notice:
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
* with this work for additional information regarding copyright
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
-->
|
|
|
|
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
|
xmlns="http://openoffice.org/2010/uno-components">
|
|
<implementation name="com.sun.star.comp.chart.ElementSelectorToolbarController"
|
|
constructor="com_sun_star_comp_chart_ElementSelectorToolbarController_get_implementation">
|
|
<service name="com.sun.star.frame.ToolbarController"/>
|
|
</implementation>
|
|
<implementation name="com.sun.star.comp.chart2.ChartController"
|
|
constructor="com_sun_star_comp_chart2_ChartController_get_implementation">
|
|
<service name="com.sun.star.chart2.ChartController"/>
|
|
<service name="com.sun.star.frame.Controller"/>
|
|
</implementation>
|
|
<implementation name="com.sun.star.comp.chart2.ChartDocumentWrapper"
|
|
constructor="com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation">
|
|
<service name="com.sun.star.beans.PropertySet"/>
|
|
<service name="com.sun.star.chart.ChartDocument"/>
|
|
<service name="com.sun.star.chart2.ChartDocumentWrapper"/>
|
|
<service name="com.sun.star.xml.UserDefinedAttributesSupplier"/>
|
|
</implementation>
|
|
<implementation name="com.sun.star.comp.chart2.ChartFrameLoader"
|
|
constructor="com_sun_star_comp_chart2_ChartFrameLoader_get_implementation">
|
|
<service name="com.sun.star.frame.SynchronousFrameLoader"/>
|
|
</implementation>
|
|
<implementation name="com.sun.star.comp.chart2.ChartTypeDialog"
|
|
constructor="com_sun_star_comp_chart2_ChartTypeDialog_get_implementation">
|
|
<service name="com.sun.star.chart2.ChartTypeDialog"/>
|
|
</implementation>
|
|
<implementation name="com.sun.star.comp.chart2.WizardDialog"
|
|
constructor="com_sun_star_comp_chart2_WizardDialog_get_implementation">
|
|
<service name="com.sun.star.chart2.WizardDialog"/>
|
|
</implementation>
|
|
<implementation name="org.libreoffice.comp.chart2.sidebar.ChartPanelFactory"
|
|
constructor="org_libreoffice_comp_chart2_sidebar_ChartPanelFactory">
|
|
<service name="com.sun.star.ui.UIElementFactory"/>
|
|
</implementation>
|
|
</component>
|