diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-21 11:54:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-21 18:45:12 +0100 |
commit | ff215479a8b9296ae26bd3ffab365dfa883a878d (patch) | |
tree | ff17132aab516ed7108df1c8cfe3e59fc62be5dc /chart2 | |
parent | 00866f35a9c912d8d566d3d42ae0af271c8ef6a3 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/res_LegendPosition.cxx | 7 | ||||
-rw-r--r-- | chart2/source/controller/inc/res_LegendPosition.hxx | 1 |
2 files changed, 7 insertions, 1 deletions
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; @@ -162,6 +162,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(); m_xRbtLeft->set_sensitive( bEnable ); 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; |