Use less SdOptionsSnapItem->IsBigOrtho/SetBigOrtho
in favor of officecfg
Change-Id: Id8b995bba0567108bb372ea9548e58c5f192f3ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167537
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 499b5e3..41dd254 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -70,6 +70,7 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
officecfg::Office::Draw::Snap::Object::ObjectFrame::set( m_xCbxSnapFrame->get_active(), batch );
officecfg::Office::Draw::Snap::Object::ObjectPoint::set( m_xCbxSnapPoints->get_active(), batch );
officecfg::Office::Draw::Snap::Position::CreatingMoving::set( m_xCbxOrtho->get_active(), batch );
officecfg::Office::Draw::Snap::Position::ExtendEdges::set( m_xCbxBigOrtho->get_active(), batch );
}
else
{
@@ -78,9 +79,9 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
officecfg::Office::Impress::Snap::Object::ObjectFrame::set( m_xCbxSnapFrame->get_active(), batch );
officecfg::Office::Impress::Snap::Object::ObjectPoint::set( m_xCbxSnapPoints->get_active(), batch );
officecfg::Office::Impress::Snap::Position::CreatingMoving::set( m_xCbxOrtho->get_active(), batch );
officecfg::Office::Impress::Snap::Position::ExtendEdges::set( m_xCbxBigOrtho->get_active(), batch );
}
aOptsItem.GetOptionsSnap().SetBigOrtho( m_xCbxBigOrtho->get_active() );
aOptsItem.GetOptionsSnap().SetRotate( m_xCbxRotate->get_active() );
aOptsItem.GetOptionsSnap().SetSnapArea(static_cast<sal_Int16>(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)));
aOptsItem.GetOptionsSnap().SetAngle(Degree100(m_xMtrFldAngle->get_value(FieldUnit::DEGREE)));
@@ -108,6 +109,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
m_xCbxSnapFrame->set_active( officecfg::Office::Draw::Snap::Object::ObjectFrame::get() );
m_xCbxSnapPoints->set_active( officecfg::Office::Draw::Snap::Object::ObjectPoint::get() );
m_xCbxOrtho->set_active( officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
m_xCbxBigOrtho->set_active( officecfg::Office::Draw::Snap::Position::ExtendEdges::get() );
}
else
{
@@ -116,6 +118,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
m_xCbxSnapFrame->set_active( officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
m_xCbxSnapPoints->set_active( officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
m_xCbxOrtho->set_active( officecfg::Office::Impress::Snap::Position::CreatingMoving::get() );
m_xCbxBigOrtho->set_active( officecfg::Office::Impress::Snap::Position::ExtendEdges::get() );
}
bool bReadOnly = bDrawMode ? officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
@@ -145,7 +148,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
bReadOnly = bDrawMode ? officecfg::Office::Draw::Snap::Position::ExtendEdges::isReadOnly() :
officecfg::Office::Impress::Snap::Position::ExtendEdges::isReadOnly();
m_xCbxBigOrtho->set_active( aOptsItem.GetOptionsSnap().IsBigOrtho() );
m_xCbxBigOrtho->set_sensitive(!bReadOnly);
m_xCbxBigOrthoImg->set_visible(bReadOnly);
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 6bd8d31d..8d7cff7 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -287,6 +287,7 @@ void FrameView::Update(SdOptions const * pOptions)
if (bImpress)
{
mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
SetBigOrtho( officecfg::Office::Impress::Snap::Position::ExtendEdges::get() );
SetBordSnap( officecfg::Office::Impress::Snap::Object::PageMargin::get() );
SetDragStripes( officecfg::Office::Impress::Layout::Display::Guide::get() );
SetHlplSnap( officecfg::Office::Impress::Snap::Object::SnapLine::get() );
@@ -300,6 +301,7 @@ void FrameView::Update(SdOptions const * pOptions)
else
{
mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
SetBigOrtho( officecfg::Office::Draw::Snap::Position::ExtendEdges::get() );
SetBordSnap( officecfg::Office::Draw::Snap::Object::PageMargin::get() );
SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() );
SetHlplSnap( officecfg::Office::Draw::Snap::Object::SnapLine::get() );
@@ -320,7 +322,6 @@ void FrameView::Update(SdOptions const * pOptions)
SetSlantButShear( pOptions->IsMoveOnlyDragging() );
SetCrookNoContortion( pOptions->IsCrookNoContortion() );
SetAngleSnapEnabled( pOptions->IsRotate() );
SetBigOrtho( pOptions->IsBigOrtho() );
SetEliminatePolyPointLimitAngle( pOptions->GetEliminatePolyPointLimitAngle() );
GetModel().SetPickThroughTransparentTextFrames( pOptions->IsPickThrough() );