Kaydet (Commit) cdddbb70 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

let the series panel also listen to chart changes

Change-Id: I875398d1b020c821319c9c8d9f9b183d49a5004a
üst 0ae95230
...@@ -120,7 +120,8 @@ ChartSeriesPanel::ChartSeriesPanel( ...@@ -120,7 +120,8 @@ ChartSeriesPanel::ChartSeriesPanel(
mxFrame(rxFrame), mxFrame(rxFrame),
maContext(), maContext(),
mpBindings(pBindings), mpBindings(pBindings),
mxModel(pController->getModel()) mxModel(pController->getModel()),
mxListener(new ChartSidebarModifyListener(this))
{ {
get(mpCBLabel, "checkbutton_label"); get(mpCBLabel, "checkbutton_label");
get(mpCBTrendline, "checkbutton_trendline"); get(mpCBTrendline, "checkbutton_trendline");
...@@ -137,12 +138,17 @@ ChartSeriesPanel::~ChartSeriesPanel() ...@@ -137,12 +138,17 @@ ChartSeriesPanel::~ChartSeriesPanel()
void ChartSeriesPanel::dispose() void ChartSeriesPanel::dispose()
{ {
css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW);
xBroadcaster->removeModifyListener(mxListener);
PanelLayout::dispose(); PanelLayout::dispose();
} }
void ChartSeriesPanel::Initialize() void ChartSeriesPanel::Initialize()
{ {
css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW);
xBroadcaster->addModifyListener(mxListener);
updateData(); updateData();
Link<> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl); Link<> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl);
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <sfx2/sidebar/IContextChangeReceiver.hxx> #include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <svx/sidebar/PanelLayout.hxx> #include <svx/sidebar/PanelLayout.hxx>
#include "ChartSidebarModifyListener.hxx"
#include <com/sun/star/util/XModifyListener.hpp> #include <com/sun/star/util/XModifyListener.hpp>
class FixedText; class FixedText;
...@@ -37,7 +39,8 @@ namespace sidebar { ...@@ -37,7 +39,8 @@ namespace sidebar {
class ChartSeriesPanel : public PanelLayout, class ChartSeriesPanel : public PanelLayout,
public ::sfx2::sidebar::IContextChangeReceiver, public ::sfx2::sidebar::IContextChangeReceiver,
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
public ChartSidebarModifyListenerParent
{ {
public: public:
static VclPtr<vcl::Window> Create( static VclPtr<vcl::Window> Create(
...@@ -67,8 +70,8 @@ public: ...@@ -67,8 +70,8 @@ public:
virtual ~ChartSeriesPanel(); virtual ~ChartSeriesPanel();
virtual void dispose() SAL_OVERRIDE; virtual void dispose() SAL_OVERRIDE;
void updateData(); virtual void updateData() SAL_OVERRIDE;
void modelInvalid(); virtual void modelInvalid() SAL_OVERRIDE;
private: private:
//ui controls //ui controls
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment