summaryrefslogtreecommitdiffstats
path: root/chart2/source/controller/dialogs/tp_TitleRotation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/dialogs/tp_TitleRotation.cxx')
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index ed99a9a39501..f3380042eb13 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -35,9 +35,8 @@ SchAlignmentTabPage::SchAlignmentTabPage(weld::Container* pPage, weld::DialogCon
, m_xFtRotate(m_xBuilder->weld_label("degreeL"))
, m_xNfRotate(m_xBuilder->weld_metric_spin_button("OrientDegree", FieldUnit::DEGREE))
, m_xCbStacked(m_xBuilder->weld_check_button("stackedCB"))
- , m_xFtTextDirection(m_xBuilder->weld_label("textdirL"))
, m_xFtABCD(m_xBuilder->weld_label("labelABCD"))
- , m_xLbTextDirection(new TextDirectionListBox(m_xBuilder->weld_combo_box("textdirLB")))
+ , m_aLbTextDirection(m_xBuilder->weld_combo_box("textdirLB"))
, m_xCtrlDial(new svx::DialControl)
, m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, "dialCtrl", *m_xCtrlDial))
{
@@ -72,7 +71,6 @@ SchAlignmentTabPage::~SchAlignmentTabPage()
{
m_xCtrlDialWin.reset();
m_xCtrlDial.reset();
- m_xLbTextDirection.reset();
}
std::unique_ptr<SfxTabPage> SchAlignmentTabPage::Create(weld::Container* pPage, weld::DialogController* pController,
@@ -96,7 +94,7 @@ bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs)
Degree100 nDegrees = bStacked ? 0_deg100 : m_xCtrlDial->GetRotation();
rOutAttrs->Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, nDegrees ) );
- SvxFrameDirection aDirection( m_xLbTextDirection->get_active_id() );
+ SvxFrameDirection aDirection( m_aLbTextDirection.get_active_id() );
rOutAttrs->Put( SvxFrameDirectionItem( aDirection, EE_PARA_WRITINGDIR ) );
return true;
@@ -114,8 +112,8 @@ 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());
+ if( const SvxFrameDirectionItem* pDirectionItem = rInAttrs->GetItemIfSet(EE_PARA_WRITINGDIR) )
+ m_aLbTextDirection.set_active_id(pDirectionItem->GetValue());
}
} //namespace chart