Use less SdOptionsSnapItem->IsSnapFrame/SetSnapFrame
in favor of officecfg Change-Id: Ia9d36f3c2d0f85250da6f3483176c551226164a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167534 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
This commit is contained in:
parent
f4d15c1cf3
commit
d9d6997561
3 changed files with 10 additions and 4 deletions
|
@ -67,14 +67,15 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
|
|||
{
|
||||
officecfg::Office::Draw::Snap::Object::SnapLine::set( m_xCbxSnapHelplines->get_active(), batch );
|
||||
officecfg::Office::Draw::Snap::Object::PageMargin::set( m_xCbxSnapBorder->get_active(), batch );
|
||||
officecfg::Office::Draw::Snap::Object::ObjectFrame::set( m_xCbxSnapFrame->get_active(), batch );
|
||||
}
|
||||
else
|
||||
{
|
||||
officecfg::Office::Impress::Snap::Object::SnapLine::set( m_xCbxSnapHelplines->get_active(), batch );
|
||||
officecfg::Office::Impress::Snap::Object::PageMargin::set( m_xCbxSnapBorder->get_active(), batch );
|
||||
officecfg::Office::Impress::Snap::Object::ObjectFrame::set( m_xCbxSnapFrame->get_active(), batch );
|
||||
}
|
||||
|
||||
aOptsItem.GetOptionsSnap().SetSnapFrame( m_xCbxSnapFrame->get_active() );
|
||||
aOptsItem.GetOptionsSnap().SetSnapPoints( m_xCbxSnapPoints->get_active() );
|
||||
aOptsItem.GetOptionsSnap().SetOrtho( m_xCbxOrtho->get_active() );
|
||||
aOptsItem.GetOptionsSnap().SetBigOrtho( m_xCbxBigOrtho->get_active() );
|
||||
|
@ -102,11 +103,13 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
|
|||
{
|
||||
m_xCbxSnapHelplines->set_active( officecfg::Office::Draw::Snap::Object::SnapLine::get() );
|
||||
m_xCbxSnapBorder->set_active( officecfg::Office::Draw::Snap::Object::PageMargin::get() );
|
||||
m_xCbxSnapFrame->set_active( officecfg::Office::Draw::Snap::Object::ObjectFrame::get() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_xCbxSnapHelplines->set_active( officecfg::Office::Impress::Snap::Object::SnapLine::get() );
|
||||
m_xCbxSnapBorder->set_active( officecfg::Office::Impress::Snap::Object::PageMargin::get() );
|
||||
m_xCbxSnapFrame->set_active( officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
|
||||
}
|
||||
|
||||
bool bReadOnly = bDrawMode ? officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
|
||||
|
@ -121,7 +124,6 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
|
|||
|
||||
bReadOnly = bDrawMode ? officecfg::Office::Draw::Snap::Object::ObjectFrame::isReadOnly() :
|
||||
officecfg::Office::Impress::Snap::Object::ObjectFrame::isReadOnly();
|
||||
m_xCbxSnapFrame->set_active( aOptsItem.GetOptionsSnap().IsSnapFrame() );
|
||||
m_xCbxSnapFrame->set_sensitive(!bReadOnly);
|
||||
m_xCbxSnapFrameImg->set_visible(bReadOnly);
|
||||
|
||||
|
|
|
@ -165,7 +165,10 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
|
|||
|
||||
case SID_SNAP_FRAME:
|
||||
{
|
||||
pOptions->SetSnapFrame( !mpDrawView->IsOFrmSnap() );
|
||||
if ( GetDoc()->GetDocumentType() == DocumentType::Impress )
|
||||
officecfg::Office::Impress::Snap::Object::ObjectFrame::set(!mpDrawView->IsOFrmSnap(), batch);
|
||||
else
|
||||
officecfg::Office::Draw::Snap::Object::ObjectFrame::set(!mpDrawView->IsOFrmSnap(), batch);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -292,6 +292,7 @@ void FrameView::Update(SdOptions const * pOptions)
|
|||
SetHlplSnap( officecfg::Office::Impress::Snap::Object::SnapLine::get() );
|
||||
SetHlplVisible( officecfg::Office::Impress::Layout::Display::Helpline::get() );
|
||||
SetNoDragXorPolys ( !officecfg::Office::Impress::Layout::Display::Contour::get() );
|
||||
SetOFrmSnap( officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
|
||||
SetPlusHandlesAlwaysVisible( officecfg::Office::Impress::Layout::Display::Bezier::get() );
|
||||
}
|
||||
else
|
||||
|
@ -302,13 +303,13 @@ void FrameView::Update(SdOptions const * pOptions)
|
|||
SetHlplSnap( officecfg::Office::Draw::Snap::Object::SnapLine::get() );
|
||||
SetHlplVisible( officecfg::Office::Draw::Layout::Display::Helpline::get() );
|
||||
SetNoDragXorPolys ( !officecfg::Office::Draw::Layout::Display::Contour::get() );
|
||||
SetOFrmSnap( officecfg::Office::Draw::Snap::Object::ObjectFrame::get() );
|
||||
SetPlusHandlesAlwaysVisible( officecfg::Office::Draw::Layout::Display::Bezier::get() );
|
||||
}
|
||||
|
||||
SetGridVisible( pOptions->IsGridVisible() );
|
||||
SetSnapAngle( pOptions->GetAngle() );
|
||||
SetGridSnap( pOptions->IsUseGridSnap() );
|
||||
SetOFrmSnap( pOptions->IsSnapFrame() );
|
||||
SetOPntSnap( pOptions->IsSnapPoints() );
|
||||
SetSnapMagneticPixel( pOptions->GetSnapArea() );
|
||||
SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
|
||||
|
|
Loading…
Reference in a new issue