diff options
author | Rafael Lima <rafael.palma.lima@gmail.com> | 2023-01-24 17:54:11 +0000 |
---|---|---|
committer | Rafael Lima <rafael.palma.lima@gmail.com> | 2023-01-25 13:38:28 +0000 |
commit | 79811c27f34d3e752de1bc3959605c5d58ac2365 (patch) | |
tree | c0e8884119df1115f8f6d275b3965df1de25be9c /sw/source/uibase/uiview/view0.cxx | |
parent | fd3d4d894d96f16a28d5b58c5bcf5a44fb83617f (diff) |
tdf#129905 Create toggle for Section boundaries
Currently in Writer it is not possible to enable/disable Section Boundaries independently from Text Boundaries (which are toggleable via View - Text Boundaries). Hence its only possible to enable/disable them together.
This patch creates a new command that allows to enable/disable Section Boundaries (now in View - Section Boundaries) indepentently from Text Boundaries.
Change-Id: I76981ed1a055ce8d1e0f83c3055fef75df37f019
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146077
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sw/source/uibase/uiview/view0.cxx')
-rw-r--r-- | sw/source/uibase/uiview/view0.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 3f05a607c984..75a0f7713f56 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -192,6 +192,7 @@ void SwView::RecheckBrowseMode() FN_VLINEAL, /*20216*/ FN_VSCROLLBAR, /*20217*/ FN_HSCROLLBAR, /*20218*/ + FN_VIEW_SECTION_BOUNDARIES, /*20219*/ FN_VIEW_META_CHARS, /**/ FN_VIEW_MARKS, /**/ //FN_VIEW_FIELDNAME, /**/ @@ -253,6 +254,8 @@ void SwView::StateViewOptions(SfxItemSet &rSet) break; case FN_VIEW_BOUNDS: aBool.SetValue( SwViewOption::IsDocBoundaries()); break; + case FN_VIEW_SECTION_BOUNDARIES: + aBool.SetValue(SwViewOption::IsSectionBoundaries()); break; case FN_VIEW_GRAPHIC: aBool.SetValue( pOpt->IsGraphic() ); break; case FN_VIEW_FIELDS: @@ -411,6 +414,12 @@ void SwView::ExecViewOptions(SfxRequest &rReq) SwViewOption::SetAppearanceFlag(ViewOptFlags::DocBoundaries, bFlag, true ); break; + case FN_VIEW_SECTION_BOUNDARIES: + if( STATE_TOGGLE == eState ) + bFlag = !SwViewOption::IsSectionBoundaries(); + SwViewOption::SetAppearanceFlag(ViewOptFlags::SectionBoundaries, bFlag, true ); + break; + case SID_GRID_VISIBLE: if( STATE_TOGGLE == eState ) bFlag = !pOpt->IsGridVisible(); |