summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashodnakashian@yahoo.com>2015-07-22 00:47:11 -0400
committerCaolán McNamara <caolanm@redhat.com>2015-08-17 12:38:42 +0000
commit2c346d669648bdecbe4be0e6013af14abef2526a (patch)
treedbcb88a713aefd8620fe87b514473cda39446eb4
parent17ac8354c97e107712d3ad59ab3140a8d0d3b78c (diff)
tdf#39080 Hide Whitespace UI option added to the View menu.
Change-Id: I1f9ba9ef489159ca54db802393d958d7fd6ac8ff Reviewed-on: https://gerrit.libreoffice.org/17280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--offapi/com/sun/star/text/ViewSettings.idl4
-rw-r--r--offapi/type_reference/offapi.idl1
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu5
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/unoprnms.hxx1
-rw-r--r--sw/sdi/_viewsh.sdi7
-rw-r--r--sw/sdi/swriter.sdi26
-rw-r--r--sw/source/uibase/utlui/unotools.cxx1
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml1
9 files changed, 47 insertions, 0 deletions
diff --git a/offapi/com/sun/star/text/ViewSettings.idl b/offapi/com/sun/star/text/ViewSettings.idl
index 770d0d1637ea..eae95f176860 100644
--- a/offapi/com/sun/star/text/ViewSettings.idl
+++ b/offapi/com/sun/star/text/ViewSettings.idl
@@ -111,6 +111,10 @@ published service ViewSettings
*/
[property] boolean ShowTabstops;
+ /** If this property is `TRUE`, whitespaces around pages are hidden.
+ */
+ [property] boolean HideWhitespace;
+
/** If this property is `TRUE`, text boundaries are displayed.
*/
[property] boolean ShowTextBoundaries;
diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl
index f95e6b7f1844..d2e617d89bc5 100644
--- a/offapi/type_reference/offapi.idl
+++ b/offapi/type_reference/offapi.idl
@@ -15287,6 +15287,7 @@ module com {
[property] boolean ShowTableBoundaries;
[property] boolean ShowTables;
[property] boolean ShowTabstops;
+ [property] boolean HideWhitespace;
[property] boolean ShowTextBoundaries;
[property] boolean ShowTextFieldBackground;
[property] boolean ShowVertRuler;
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index f9a866eb1971..8e66840ec23e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2239,6 +2239,11 @@
<value>9</value>
</prop>
</node>
+ <node oor:name=".uno:HideWhitespace" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Hide Whitespac~e</value>
+ </prop>
+ </node>
<node oor:name=".uno:SortDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">So~rt...</value>
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 4f7792319d8a..30cf71b6fb07 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -210,6 +210,7 @@
#define FN_NAVIGATION_POPUP (FN_VIEW + 56) /* Navigation Popup */
#define FN_SCROLL_PREV (FN_VIEW + 57) /* uno:ScrollToPrevious */
#define FN_SCROLL_NEXT (FN_VIEW + 58) /* uno:ScrollToNext */
+#define FN_VIEW_HIDE_WHITESPACE (FN_VIEW + 59) /* Hide header, footer, and pagebreak */
// Region: Insert
#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Bookmark */
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 0678dee38190..63589f273ce5 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -209,6 +209,7 @@
#define UNO_NAME_SHOW_FIELD_COMMANDS "ShowFieldCommands"
#define UNO_NAME_SHOW_PROTECTED_SPACES "ShowProtectedSpaces"
#define UNO_NAME_SHOW_HIDDEN_PARAGRAPHS "ShowHiddenParagraphs"
+#define UNO_NAME_HIDE_WHITESPACE "HideWhitespace"
#define UNO_NAME_IS_SYNC_WIDTH_TO_HEIGHT "IsSyncWidthToHeight"
#define UNO_NAME_IS_SYNC_HEIGHT_TO_WIDTH "IsSyncHeightToWidth"
#define UNO_NAME_SIZE_PROTECTED "SizeProtected"
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index 51d593748e33..78deb1fd17ab 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -685,6 +685,13 @@ interface BaseTextEditView
Export = FALSE;
]
+ FN_VIEW_HIDE_WHITESPACE
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ ]
+
FN_VIEW_NOTES
[
ExecMethod = ExecViewOptions ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 6fc3b750feac..1b6829e1be7f 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -7318,6 +7318,32 @@ SfxBoolItem ShowHiddenParagraphs FN_VIEW_HIDDEN_PARA
GroupId = GID_OPTIONS;
]
+SfxBoolItem HideWhitespace FN_VIEW_HIDE_WHITESPACE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
SfxBoolItem ShowTrackedChanges FN_REDLINE_SHOW
[
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 785eba8bdff4..ffec1024dbf4 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -236,6 +236,7 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void )
xViewProps->setPropertyValue(UNO_NAME_SHOW_DRAWINGS, aTrueSet);
xViewProps->setPropertyValue(UNO_NAME_SHOW_FIELD_COMMANDS, aFalseSet);
xViewProps->setPropertyValue(UNO_NAME_SHOW_GRAPHICS, aTrueSet);
+ xViewProps->setPropertyValue(UNO_NAME_HIDE_WHITESPACE, aFalseSet);
xViewProps->setPropertyValue(UNO_NAME_SHOW_HIDDEN_PARAGRAPHS, aFalseSet);
xViewProps->setPropertyValue(UNO_NAME_SHOW_HIDDEN_TEXT, aFalseSet);
xViewProps->setPropertyValue(UNO_NAME_SHOW_HORI_RULER, aFalseSet);
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index 972a1b00685f..0a98739b1e8b 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -162,6 +162,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HideWhitespace"/>
<menu:menuitem menu:id=".uno:ViewBounds"/>
<menu:menuitem menu:id=".uno:TableBoundaries"/>
<menu:menuitem menu:id=".uno:ShowGraphics"/>