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(
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);
......
......@@ -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
......
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