diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-07-16 22:00:26 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-07-16 22:19:53 +0200 |
commit | cdddbb70830d399de9bb388f45aeab34210338da (patch) | |
tree | 37c657dd4aab91ecec10293215fb6c163d8d90c9 /chart2 | |
parent | 0ae9523012269ee2d093f35ecbf58da1d7f13f53 (diff) |
let the series panel also listen to chart changes
Change-Id: I875398d1b020c821319c9c8d9f9b183d49a5004a
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/sidebar/ChartSeriesPanel.cxx | 8 | ||||
-rw-r--r-- | chart2/source/controller/sidebar/ChartSeriesPanel.hxx | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index 598c1d11eb88..e93fd0621bfb 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -120,7 +120,8 @@ ChartSeriesPanel::ChartSeriesPanel( mxFrame(rxFrame), maContext(), mpBindings(pBindings), - mxModel(pController->getModel()) + mxModel(pController->getModel()), + mxListener(new ChartSidebarModifyListener(this)) { get(mpCBLabel, "checkbutton_label"); get(mpCBTrendline, "checkbutton_trendline"); @@ -137,12 +138,17 @@ ChartSeriesPanel::~ChartSeriesPanel() void ChartSeriesPanel::dispose() { + css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW); + xBroadcaster->removeModifyListener(mxListener); PanelLayout::dispose(); } void ChartSeriesPanel::Initialize() { + css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW); + xBroadcaster->addModifyListener(mxListener); + updateData(); Link<> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl); diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx index f38aa9e53a4d..7594e28983d9 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx @@ -23,6 +23,8 @@ #include <sfx2/sidebar/IContextChangeReceiver.hxx> #include <svx/sidebar/PanelLayout.hxx> +#include "ChartSidebarModifyListener.hxx" + #include <com/sun/star/util/XModifyListener.hpp> class FixedText; @@ -37,7 +39,8 @@ namespace sidebar { class ChartSeriesPanel : public PanelLayout, public ::sfx2::sidebar::IContextChangeReceiver, - public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface + public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface, + public ChartSidebarModifyListenerParent { public: static VclPtr<vcl::Window> Create( @@ -67,8 +70,8 @@ public: virtual ~ChartSeriesPanel(); virtual void dispose() SAL_OVERRIDE; - void updateData(); - void modelInvalid(); + virtual void updateData() SAL_OVERRIDE; + virtual void modelInvalid() SAL_OVERRIDE; private: //ui controls |