summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2020-07-27 13:11:54 -0800
committerMike Kaganski <mike.kaganski@collabora.com>2020-07-30 12:03:36 +0200
commitb2686de46250d0c8d14365a2af8428387baa0c24 (patch)
tree2bb088360d254509ed01fe1d3e49ebc1245dc244 /sw/inc
parent63308aa3b109271ffb4fd47e9fea2e3281a1552d (diff)
tdf#38093 Writer outline folding - feature sensitivity
Patch 1/6 -Adds option 'Show outline visibility button' to options writer view tab in Display section. -Adds UNO command '.uno:ShowOutlineContentVisibilityButton' to toggle option on and off from menus, toolbars, and key bindings. -Makes feature experimental mode. Change-Id: If5a57defd8f568736ea08625ab6eb08e30b15c03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99652 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/viewopt.hxx11
2 files changed, 11 insertions, 1 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 5dacd22c53c7..d5332f02ca73 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -186,6 +186,7 @@
#define FN_USE_HEADERFOOTERMENU (FN_VIEW + 61) /* Show advanced header/footer menu */
#define FN_VIEW_SHOW_WHITESPACE (FN_VIEW + 62) /* Show header, footer, and pagebreak */
+#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON (FN_VIEW + 63) /* Show outline content visibility toggle button */
// Region: Insert
#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Bookmark */
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index f5add2b728d1..cf501a9d181f 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -28,6 +28,8 @@
#include <sfx2/zoomitem.hxx>
#include "swdllapi.h"
+#include <svtools/miscopt.hxx>
+
class SwRect;
namespace vcl { class Window; }
class OutputDevice;
@@ -63,9 +65,10 @@ enum class ViewOptFlags1 : sal_uInt32 {
ShowInlineTooltips = 0x10000000, //tooltips on tracked changes
ViewMetachars = 0x20000000,
Pageback = 0x40000000,
+ ShowOutlineContentVisibilityButton = 0x80000000
};
namespace o3tl {
- template<> struct typed_flags<ViewOptFlags1> : is_typed_flags<ViewOptFlags1, 0x77dfcfff> {};
+ template<> struct typed_flags<ViewOptFlags1> : is_typed_flags<ViewOptFlags1, 0xF7dfcfff> {};
}
enum class ViewOptCoreFlags2 {
@@ -291,6 +294,12 @@ public:
void SetUseHeaderFooterMenu( bool b )
{ SetCoreOption(b, ViewOptFlags1::UseHeaderFooterMenu); }
+ //show/hide outline content visibility button
+ bool IsShowOutlineContentVisibilityButton() const
+ { SvtMiscOptions aMiscOptions; return aMiscOptions.IsExperimentalMode() && (m_nCoreOptions & ViewOptFlags1::ShowOutlineContentVisibilityButton); }
+ void SetShowOutlineContentVisibilityButton(bool b)
+ { SetCoreOption(b, ViewOptFlags1::ShowOutlineContentVisibilityButton); }
+
bool IsShowHiddenChar(bool bHard = false) const
{ return !m_bReadonly && (m_nCoreOptions & ViewOptFlags1::CharHidden) &&
((m_nCoreOptions & ViewOptFlags1::ViewMetachars)||bHard); }