diff options
Diffstat (limited to 'chart2/source/controller/sidebar/ChartSeriesPanel.cxx')
-rw-r--r-- | chart2/source/controller/sidebar/ChartSeriesPanel.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index 483ae91b4bbc..0cb9aeed2bf2 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -269,7 +269,9 @@ OUString getCID(css::uno::Reference<css::frame::XModel> xModel) return OUString(); uno::Any aAny = xSelectionSupplier->getSelection(); - assert(aAny.hasValue()); + if (!aAny.hasValue()) + return OUString(); + OUString aCID; aAny >>= aCID; #ifdef DBG_UTIL @@ -410,6 +412,18 @@ void ChartSeriesPanel::modelInvalid() } +void ChartSeriesPanel::updateModel( + css::uno::Reference<css::frame::XModel> xModel) +{ + css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW); + xBroadcaster->removeModifyListener(mxListener); + + mxModel = xModel; + + css::uno::Reference<css::util::XModifyBroadcaster> xBroadcasterNew(mxModel, css::uno::UNO_QUERY_THROW); + xBroadcasterNew->addModifyListener(mxListener); +} + IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox) { bool bChecked = pCheckBox->IsChecked(); |