summaryrefslogtreecommitdiff
path: root/chart2/source/controller/sidebar/ChartAreaPanel.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-08-19 23:43:39 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-08-20 00:14:51 +0200
commitcf7db8226240ca7f425cf649e164767988c80001 (patch)
tree69b6b2c983ea7f417d58c862636c9d510ff8d9b1 /chart2/source/controller/sidebar/ChartAreaPanel.cxx
parent6038ba92be0a4c821ffa29ed0512905e4b3cd8f8 (diff)
handle new color picker correctly in chart sidebar
This implements the basics for that and implements it in the AreaPanel. Change-Id: I6d9e5012bbcc2c953d478a09a839f35f2ef64c5b
Diffstat (limited to 'chart2/source/controller/sidebar/ChartAreaPanel.cxx')
-rw-r--r--chart2/source/controller/sidebar/ChartAreaPanel.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index 3230e7c32534..dbf9a6837b6b 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -19,6 +19,8 @@
#include <svx/xflftrit.hxx>
#include <svx/unomid.hxx>
+#include <svx/tbcontrl.hxx>
+
namespace chart { namespace sidebar {
namespace {
@@ -237,7 +239,8 @@ ChartAreaPanel::ChartAreaPanel(vcl::Window* pParent,
mxListener(new ChartSidebarModifyListener(this)),
mxSelectionListener(new ChartSidebarSelectionListener(this)),
mbUpdate(true),
- mbModelValid(true)
+ mbModelValid(true),
+ maFillColorWrapper(mxModel)
{
std::vector<ObjectType> aAcceptedTypes { OBJECTTYPE_PAGE, OBJECTTYPE_DIAGRAM, OBJECTTYPE_DATA_SERIES, OBJECTTYPE_TITLE, OBJECTTYPE_LEGEND};
mxSelectionListener->setAcceptedTypes(aAcceptedTypes);
@@ -270,6 +273,10 @@ void ChartAreaPanel::Initialize()
if (xSelectionSupplier.is())
xSelectionSupplier->addSelectionChangeListener(mxSelectionListener.get());
+ css::uno::Reference<css::frame::XToolbarController> xController = mpToolBoxColor->GetFirstController();
+ SvxColorToolBoxControl* pToolBoxColor = dynamic_cast<SvxColorToolBoxControl*>(xController.get());
+ pToolBoxColor->setColorSelectFunction(maFillColorWrapper);
+
updateData();
}