From 2c346d669648bdecbe4be0e6013af14abef2526a Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Wed, 22 Jul 2015 00:47:11 -0400 Subject: tdf#39080 Hide Whitespace UI option added to the View menu. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1f9ba9ef489159ca54db802393d958d7fd6ac8ff Reviewed-on: https://gerrit.libreoffice.org/17280 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- offapi/com/sun/star/text/ViewSettings.idl | 4 ++++ offapi/type_reference/offapi.idl | 1 + .../org/openoffice/Office/UI/WriterCommands.xcu | 5 +++++ sw/inc/cmdid.h | 1 + sw/inc/unoprnms.hxx | 1 + sw/sdi/_viewsh.sdi | 7 ++++++ sw/sdi/swriter.sdi | 26 ++++++++++++++++++++++ sw/source/uibase/utlui/unotools.cxx | 1 + sw/uiconfig/swriter/menubar/menubar.xml | 1 + 9 files changed, 47 insertions(+) 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 @@ 9 + + + Hide Whitespac~e + + So~rt... 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 @@ + -- cgit