sd/source/ui/view/drviewsg.cxx |    5 ++++-
 sd/source/ui/view/frmview.cxx  |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 58a9c936bb065384d50e122ee2ac9037dd60cc32
Author:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
AuthorDate: Wed Apr 24 09:13:31 2024 +0200
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Fri May 10 09:33:49 2024 +0200

    Use less SdOptionsLayout->IsHelplines/SetHelplines in favor of officecfg
    
    Change-Id: Ic6d0c80a4f95a08d969b8400704f25fc50147ad5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166599
    Tested-by: Jenkins
    Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>

diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index 7dfd06e2177c..33cb87777391 100644
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -129,7 +129,10 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
 
         case SID_HELPLINES_VISIBLE: // not here yet!
         {
-            pOptions->SetHelplines( !mpDrawView->IsHlplVisible() );
+            if ( GetDoc()->GetDocumentType() == DocumentType::Impress )
+                
officecfg::Office::Impress::Layout::Display::Guide::set(!mpDrawView->IsHlplVisible(),
 batch);
+            else
+                
officecfg::Office::Draw::Layout::Display::Guide::set(!mpDrawView->IsHlplVisible(),
 batch);
         }
         break;
 
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 250a088bffb1..1116f7d791f3 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -288,6 +288,7 @@ void FrameView::Update(SdOptions const * pOptions)
     {
         mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
         SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
+        SetHlplVisible( 
officecfg::Office::Impress::Layout::Display::Helpline::get() );
         SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
         SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
     }
@@ -295,6 +296,7 @@ void FrameView::Update(SdOptions const * pOptions)
     {
         mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
         SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() 
);
+        SetHlplVisible( 
officecfg::Office::Draw::Layout::Display::Helpline::get() );
         SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
         SetPlusHandlesAlwaysVisible( 
officecfg::Office::Draw::Layout::Display::Bezier::get() );
     }
@@ -306,7 +308,6 @@ void FrameView::Update(SdOptions const * pOptions)
     SetHlplSnap( pOptions->IsSnapHelplines() );
     SetOFrmSnap( pOptions->IsSnapFrame() );
     SetOPntSnap( pOptions->IsSnapPoints() );
-    SetHlplVisible( pOptions->IsHelplines() );
     SetSnapMagneticPixel( pOptions->GetSnapArea() );
     SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
     SetMoveOnlyDragging( pOptions->IsMoveOnlyDragging() );

Reply via email to