diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-27 07:22:21 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-27 20:10:03 +0200 |
commit | 646a6307b9a31376d85fa3ed12a314118d41d7cc (patch) | |
tree | a43fb1d36df08f2f3f9c78cde361edce99b848c1 /chart2 | |
parent | 97ed3b93e1def081a535de14cc3c3644363cbd45 (diff) |
loplugin:unusedmethods
Change-Id: I66ef078794ed1eb44dbfa854c589545e5f9ba78e
Reviewed-on: https://gerrit.libreoffice.org/62407
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/res_LegendPosition.cxx | 57 | ||||
-rw-r--r-- | chart2/source/controller/inc/res_LegendPosition.hxx | 7 |
2 files changed, 0 insertions, 64 deletions
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index 5842b0e2206f..089bec1100fd 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -39,15 +39,6 @@ namespace chart using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; -LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder) - : m_xRbtLeft(rBuilder.weld_radio_button("left")) - , m_xRbtRight(rBuilder.weld_radio_button("right")) - , m_xRbtTop(rBuilder.weld_radio_button("top")) - , m_xRbtBottom(rBuilder.weld_radio_button("bottom")) -{ - impl_setRadioButtonToggleHdl(); -} - LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder, const uno::Reference< uno::XComponentContext >& xCC) : m_xCC(xCC) @@ -174,54 +165,6 @@ IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl, weld::ToggleButton&, m_aChangeLink.Call(nullptr); } -void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs ) -{ - const SfxPoolItem* pPoolItem = nullptr; - if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET ) - { - chart2::LegendPosition nLegendPosition = static_cast<chart2::LegendPosition>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue()); - switch( nLegendPosition ) - { - case chart2::LegendPosition_LINE_START: - m_xRbtLeft->set_active(true); - break; - case chart2::LegendPosition_PAGE_START: - m_xRbtTop->set_active(true); - break; - case chart2::LegendPosition_LINE_END: - m_xRbtRight->set_active(true); - break; - case chart2::LegendPosition_PAGE_END: - m_xRbtBottom->set_active(true); - break; - default: - break; - } - } - - if( m_xCbxShow && rInAttrs.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SfxItemState::SET ) - { - bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); - m_xCbxShow->set_active(bShow); - } -} - -void LegendPositionResources::writeToItemSet( SfxItemSet& rOutAttrs ) const -{ - chart2::LegendPosition nLegendPosition = chart2::LegendPosition_CUSTOM; - if( m_xRbtLeft->get_active() ) - nLegendPosition = chart2::LegendPosition_LINE_START; - else if( m_xRbtTop->get_active() ) - nLegendPosition = chart2::LegendPosition_PAGE_START; - else if( m_xRbtRight->get_active() ) - nLegendPosition = chart2::LegendPosition_LINE_END; - else if( m_xRbtBottom->get_active() ) - nLegendPosition = chart2::LegendPosition_PAGE_END; - rOutAttrs.Put( SfxInt32Item(SCHATTR_LEGEND_POS, static_cast<sal_Int32>(nLegendPosition) ) ); - - rOutAttrs.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, !m_xCbxShow || m_xCbxShow->get_active()) ); -} - IMPL_LINK (LegendPositionResources, PositionChangeHdl, weld::ToggleButton&, rRadio, void) { //for each radio click there are coming two change events diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx index 40c5c2ff8b70..c9105f7dd1af 100644 --- a/chart2/source/controller/inc/res_LegendPosition.hxx +++ b/chart2/source/controller/inc/res_LegendPosition.hxx @@ -32,8 +32,6 @@ class LegendPositionResources final { public: - //constructor without Display checkbox - LegendPositionResources(weld::Builder& rBuilder); //constructor inclusive Display checkbox LegendPositionResources(weld::Builder& rBuilder, const css::uno::Reference< css::uno::XComponentContext>& xCC ); @@ -42,9 +40,6 @@ public: void writeToResources( const css::uno::Reference< css::frame::XModel >& xChartModel ); void writeToModel( const css::uno::Reference< css::frame::XModel >& xChartModel ) const; - void initFromItemSet( const SfxItemSet& rInAttrs ); - void writeToItemSet( SfxItemSet& rOutAttrs ) const; - void SetChangeHdl( const Link<LinkParamNone*,void>& rLink ); DECL_LINK( PositionEnableHdl, weld::ToggleButton&, void ); @@ -82,8 +77,6 @@ public: void initFromItemSet( const SfxItemSet& rInAttrs ); void writeToItemSet( SfxItemSet& rOutAttrs ) const; - void SetChangeHdl( const Link<LinkParamNone*,void>& rLink ); - DECL_LINK(PositionEnableHdl, weld::ToggleButton&, void); private: |