diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-02 14:45:32 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-06 16:44:21 +0100 |
commit | 40fe5b93bc0838e04b46bfc7942d1ee6a2482ce0 (patch) | |
tree | 151814d0863c9912d18722732beb13b1e22e0ff1 /chart2 | |
parent | d1133d71a6109d1999121fd6a91573d12dc4852b (diff) |
weld AreaPropertyPanel
Change-Id: I5f4c4b43067b99cd57f8ea941002481ef5977e09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86144
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/sidebar/ChartAreaPanel.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx index 61e72318043c..1260b36fe397 100644 --- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx @@ -17,6 +17,7 @@ #include <com/sun/star/util/XModifyBroadcaster.hpp> #include <com/sun/star/chart2/XDiagram.hpp> +#include <sfx2/weldutils.hxx> #include <svx/xfltrit.hxx> #include <svx/xflftrit.hxx> #include <svx/xbtmpit.hxx> @@ -29,9 +30,9 @@ namespace chart { namespace sidebar { namespace { -SvxColorToolBoxControl* getColorToolBoxControl(sfx2::sidebar::SidebarToolBox* pToolBoxColor) +SvxColorToolBoxControl* getColorToolBoxControl(ToolbarUnoDispatcher& rColorDispatch) { - css::uno::Reference<css::frame::XToolbarController> xController = pToolBoxColor->GetFirstController(); + css::uno::Reference<css::frame::XToolbarController> xController = rColorDispatch.GetControllerForCommand(".uno:FillColor"); SvxColorToolBoxControl* pToolBoxColorControl = dynamic_cast<SvxColorToolBoxControl*>(xController.get()); return pToolBoxColorControl; } @@ -261,7 +262,7 @@ ChartAreaPanel::ChartAreaPanel(vcl::Window* pParent, mxSelectionListener(new ChartSidebarSelectionListener(this)), mbUpdate(true), mbModelValid(true), - maFillColorWrapper(mxModel, getColorToolBoxControl(mpToolBoxColor.get()), "FillColor") + maFillColorWrapper(mxModel, getColorToolBoxControl(*mxColorDispatch), "FillColor") { std::vector<ObjectType> aAcceptedTypes { OBJECTTYPE_PAGE, OBJECTTYPE_DIAGRAM, OBJECTTYPE_DATA_SERIES, OBJECTTYPE_DATA_POINT, @@ -296,7 +297,7 @@ void ChartAreaPanel::Initialize() if (xSelectionSupplier.is()) xSelectionSupplier->addSelectionChangeListener(mxSelectionListener.get()); - SvxColorToolBoxControl* pToolBoxColor = getColorToolBoxControl(mpToolBoxColor.get()); + SvxColorToolBoxControl* pToolBoxColor = getColorToolBoxControl(*mxColorDispatch); pToolBoxColor->setColorSelectFunction(maFillColorWrapper); updateData(); |