summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx15
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx15
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.cxx17
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx15
4 files changed, 48 insertions, 14 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 2889bdb74f13..45caab6d94cc 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -291,7 +291,11 @@ void DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const
}
if (m_xLB_TextDirection->get_active() != -1)
- rOutAttrs->Put( SvxFrameDirectionItem( m_xLB_TextDirection->get_active_id(), EE_PARA_WRITINGDIR ) );
+ {
+ // I2TM
+ rOutAttrs->itemSet().setItem(Item::FrameDirection(m_xLB_TextDirection->get_active_id()));
+ // rOutAttrs->Put( SvxFrameDirectionItem( m_xLB_TextDirection->get_active_id(), EE_PARA_WRITINGDIR ) );
+ }
if( m_aDC_Dial.IsVisible() )
{
@@ -339,8 +343,13 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
else
m_xLB_LabelPlacement->set_active(-1);
- if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_xLB_TextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
+ // I2TM
+ if(const auto Item(rInAttrs.itemSet().getStateAndItem<Item::FrameDirection>()); Item.isSet())
+ {
+ m_xLB_TextDirection->set_active_id(Item.getItem().getValue());
+ }
+ // if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
+ // m_xLB_TextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, true, &pPoolItem ) == SfxItemState::SET )
{
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 36062526cdd4..ba999de9e63f 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -129,7 +129,11 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_xCbShowDescription->get_active() ) );
if (m_xLbTextDirection->get_active() != -1)
- rOutAttrs->Put( SvxFrameDirectionItem( m_xLbTextDirection->get_active_id(), EE_PARA_WRITINGDIR ) );
+ {
+ // I2TM
+ rOutAttrs->itemSet().setItem(Item::FrameDirection(m_xLbTextDirection->get_active_id()));
+ // rOutAttrs->Put( SvxFrameDirectionItem( m_xLbTextDirection->get_active_id(), EE_PARA_WRITINGDIR ) );
+ }
return true;
}
@@ -182,8 +186,13 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
m_xCbStacked->set_state(TRISTATE_INDET);
StackedToggleHdl(*m_xCbStacked);
- if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_xLbTextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
+ // I2TM
+ if(const auto Item(rInAttrs->itemSet().getStateAndItem<Item::FrameDirection>()); Item.isSet())
+ {
+ m_xLbTextDirection->set_active_id(Item.getItem().getValue());
+ }
+ // if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
+ // m_xLbTextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
// Text overlap ----------
aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem );
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index efd8a29c790e..22b7a6d44bc8 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -55,7 +55,11 @@ bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs)
m_aLegendPositionResources.writeToItemSet(*rOutAttrs);
if (m_xLbTextDirection->get_active() != -1)
- rOutAttrs->Put(SvxFrameDirectionItem(m_xLbTextDirection->get_active_id(), EE_PARA_WRITINGDIR));
+ {
+ // I2TM
+ rOutAttrs->itemSet().setItem(Item::FrameDirection(m_xLbTextDirection->get_active_id()));
+ // rOutAttrs->Put(SvxFrameDirectionItem(m_xLbTextDirection->get_active_id(), EE_PARA_WRITINGDIR));
+ }
return true;
}
@@ -64,9 +68,14 @@ void SchLegendPosTabPage::Reset(const SfxItemSet* rInAttrs)
{
m_aLegendPositionResources.initFromItemSet(*rInAttrs);
- const SfxPoolItem* pPoolItem = nullptr;
- if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_xLbTextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
+ // I2TM
+ if(const auto Item(rInAttrs->itemSet().getStateAndItem<Item::FrameDirection>()); Item.isSet())
+ {
+ m_xLbTextDirection->set_active_id(Item.getItem().getValue());
+ }
+ // const SfxPoolItem* pPoolItem = nullptr;
+ // if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
+ // m_xLbTextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
}
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index b9d73f337cc0..1bfd16b46c3b 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -100,8 +100,10 @@ bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs)
sal_Int32 nDegrees = bStacked ? 0 : m_aCtrlDial.GetRotation();
rOutAttrs->Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) );
- SvxFrameDirection aDirection( m_xLbTextDirection->get_active_id() );
- rOutAttrs->Put( SvxFrameDirectionItem( aDirection, EE_PARA_WRITINGDIR ) );
+ // I2TM
+ rOutAttrs->itemSet().setItem(Item::FrameDirection(m_xLbTextDirection->get_active_id()));
+ // SvxFrameDirection aDirection( m_xLbTextDirection->get_active_id() );
+ // rOutAttrs->Put( SvxFrameDirectionItem( aDirection, EE_PARA_WRITINGDIR ) );
return true;
}
@@ -118,8 +120,13 @@ void SchAlignmentTabPage::Reset(const SfxItemSet* rInAttrs)
m_xCbStacked->set_active(bStacked);
StackedToggleHdl(*m_xCbStacked);
- if( rInAttrs->GetItemState(EE_PARA_WRITINGDIR, true, &pItem) == SfxItemState::SET)
- m_xLbTextDirection->set_active_id(static_cast<const SvxFrameDirectionItem*>(pItem)->GetValue());
+ // I2TM
+ if(const auto Item(rInAttrs->itemSet().getStateAndItem<Item::FrameDirection>()); Item.isSet())
+ {
+ m_xLbTextDirection->set_active_id(Item.getItem().getValue());
+ }
+ // if( rInAttrs->GetItemState(EE_PARA_WRITINGDIR, true, &pItem) == SfxItemState::SET)
+ // m_xLbTextDirection->set_active_id(static_cast<const SvxFrameDirectionItem*>(pItem)->GetValue());
}
} //namespace chart