summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/res_LegendPosition.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/dialogs/res_LegendPosition.cxx')
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx57
1 files changed, 0 insertions, 57 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