summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu8
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/sdi/_viewsh.sdi6
-rw-r--r--sw/sdi/swriter.sdi18
-rw-r--r--sw/source/core/layout/paintfrm.cxx11
-rw-r--r--sw/source/uibase/uiview/view0.cxx9
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml1
7 files changed, 53 insertions, 1 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index b6754f123ab4..a9fe3ad6ff69 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2825,6 +2825,14 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:SectionBoundaries" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Sec~tion Boundaries</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:ThesaurusDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~Thesaurus...</value>
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index ef1cdceec964..82616e3c2340 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -163,6 +163,7 @@ class SwUINumRuleItem;
#define FN_VLINEAL (FN_VIEW + 16) /* Vertical Liner */
#define FN_VSCROLLBAR (FN_VIEW + 17) /* Vertical Scrollbar */
#define FN_HSCROLLBAR (FN_VIEW + 18) /* Horizontal Scrollbar */
+#define FN_VIEW_SECTION_BOUNDARIES (FN_VIEW + 19) /* View section boundaries */
#define FN_VIEW_META_CHARS (FN_VIEW + 24) /* View meta chars */
#define FN_VIEW_MARKS (FN_VIEW + 25) /* View marks */
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index c3096bc57d3a..020383d31abc 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -883,6 +883,12 @@ interface BaseTextEditView
StateMethod = StateViewOptions ;
]
+ FN_VIEW_SECTION_BOUNDARIES // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ ]
+
FN_VIEW_GRAPHIC // status()
[
ExecMethod = ExecViewOptions ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 873cab508584..69e41da52ccc 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -6669,6 +6669,24 @@ SfxBoolItem ViewBounds FN_VIEW_BOUNDS
GroupId = SfxGroupId::View;
]
+SfxBoolItem SectionBoundaries FN_VIEW_SECTION_BOUNDARIES
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::View;
+]
+
SfxBoolItem VRuler FN_VLINEAL
[
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 5127624df73c..03deb9e7816d 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6681,7 +6681,7 @@ void SwPageFrame::RefreshSubsidiary( const SwRect &rRect ) const
void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage,
const SwRect &rRect ) const
{
- const bool bSubsOpt = isSubsidiaryLinesEnabled();
+ const bool bSubsOpt = isSubsidiaryLinesEnabled() || isSubsidiaryLinesForSectionsEnabled();
if ( bSubsOpt )
PaintSubsidiaryLines( pPage, rRect );
@@ -6918,6 +6918,9 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelim
void SwPageFrame::PaintSubsidiaryLines( const SwPageFrame *,
const SwRect & ) const
{
+ if (!SwViewOption::IsDocBoundaries())
+ return;
+
if ( gProp.pSGlobalShell->IsHeaderFooterEdit() )
return;
@@ -6989,6 +6992,9 @@ void SwColumnFrame::PaintSubsidiaryLines( const SwPageFrame *,
void SwSectionFrame::PaintSubsidiaryLines( const SwPageFrame * pPage,
const SwRect & rRect ) const
{
+ if (!SwViewOption::IsSectionBoundaries())
+ return;
+
const bool bNoLowerColumn = !Lower() || !Lower()->IsColumnFrame();
if ( bNoLowerColumn )
{
@@ -7007,6 +7013,9 @@ void SwBodyFrame::PaintSubsidiaryLines( const SwPageFrame *,
void SwHeadFootFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect & ) const
{
+ if (!SwViewOption::IsDocBoundaries())
+ return;
+
if ( gProp.pSGlobalShell->IsHeaderFooterEdit() )
{
SwRect aArea( getFramePrintArea() );
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();
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index 295dfe7280c6..99d34c5263a3 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -207,6 +207,7 @@
<menu:menuitem menu:id=".uno:ControlCodes"/>
<menu:menuitem menu:id=".uno:ViewBounds" menu:style="text"/>
<menu:menuitem menu:id=".uno:TableBoundaries" menu:style="text"/>
+ <menu:menuitem menu:id=".uno:SectionBoundaries" menu:style="text"/>
<menu:menuitem menu:id=".uno:ShowGraphics" menu:style="text"/>
<menu:menuitem menu:id=".uno:ShowWhitespace"/>
<menu:menuseparator/>