chart2/source/controller/dialogs/res_LegendPosition.cxx | 7 ++++++- chart2/source/controller/inc/res_LegendPosition.hxx | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)
New commits: commit ff215479a8b9296ae26bd3ffab365dfa883a878d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Feb 21 11:54:04 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Feb 21 18:45:12 2022 +0100 cid#1500515 Dereference after null check Change-Id: I6483c3a036c5c56c8c6515b5b8f08720c8bd1a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130269 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index 1a890a20f30c..0d16fba16df1 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -87,7 +87,7 @@ void LegendPositionResources::writeToResources( const rtl::Reference<::chart::Ch xProp->getPropertyValue( "Show" ) >>= bShowLegend; if (m_xCbxShow) m_xCbxShow->set_active( bShowLegend ); - PositionEnableHdl(*m_xCbxShow); + PositionEnable(); //position chart2::LegendPosition ePos; @@ -161,6 +161,11 @@ void LegendPositionResources::writeToModel( const rtl::Reference<::chart::ChartM } IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl, weld::Toggleable&, void) +{ + PositionEnable(); +} + +void LegendPositionResources::PositionEnable() { bool bEnable = !m_xCbxShow || m_xCbxShow->get_active(); diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx index d34c28cdd79c..ca0870dd499e 100644 --- a/chart2/source/controller/inc/res_LegendPosition.hxx +++ b/chart2/source/controller/inc/res_LegendPosition.hxx @@ -57,6 +57,7 @@ public: private: void impl_setRadioButtonToggleHdl(); + void PositionEnable(); private: css::uno::Reference< css::uno::XComponentContext> m_xCC;