summaryrefslogtreecommitdiff
path: root/sw/inc/viewopt.hxx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2021-01-19 15:55:21 +0100
committerLászló Németh <nemeth@numbertext.org>2021-01-20 19:08:05 +0100
commit6aeeef8807fef36295b65d0a300a21466bfbeda0 (patch)
treeee0ee40bb146c641b8984def9a83188f29c8ba76 /sw/inc/viewopt.hxx
parentea610df36842305ef7e26d964ad0a1677be5f553 (diff)
tdf#116757 sw ChangesInMargin: add "Show Insertions in Margin"
layout mode to allow to show the original text inline, i.e. only deletions, while insertions are showed in margin (opposite of the Show Deletions in Margin mode). Add a menu to the Show Changes icon on the Changes toolbar with menu items for the 3 layout modes "All Changes Inline", "Deletions in Margin" and "Insertions in Margin" with the following behavior: – Selecting a menu item turns on also the Show Changes mode to show the result immediately; – Disabling Show Changes mode always show the final text, i.e. only insertions. Enabling Show Changes mode again shows the changes according to the last Show Changes mode selected in the menu. – The new "Insertions in Margin" mode is intended to be only a run-time option, i.e. it's not possible to set it as a default Show Changes mode in Options, unlike "Deletions in Margin". Change-Id: Ie4dc9fe3b4b201fa9976ef04877af649e242ab46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109649 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/inc/viewopt.hxx')
-rw-r--r--sw/inc/viewopt.hxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 996aec4848c2..006a3f9b3dd3 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -66,10 +66,11 @@ enum class ViewOptFlags1 : sal_uInt64 {
ViewMetachars = 0x20000000,
Pageback = 0x40000000,
ShowOutlineContentVisibilityButton = 0x80000000,
- ShowChangesInMargin = 0x100000000 //tracked deletions in margin
+ ShowChangesInMargin = 0x100000000, //tracked deletions in margin
+ ShowChangesInMargin2 = 0x200000000 //tracked insertions in margin
};
namespace o3tl {
- template<> struct typed_flags<ViewOptFlags1> : is_typed_flags<ViewOptFlags1, 0x1ffdfcfff> {};
+ template<> struct typed_flags<ViewOptFlags1> : is_typed_flags<ViewOptFlags1, 0x3ffdfcfff> {};
}
enum class ViewOptCoreFlags2 {
@@ -296,6 +297,12 @@ public:
void SetShowChangesInMargin( bool b )
{ SetCoreOption(b, ViewOptFlags1::ShowChangesInMargin); }
+ //show/hide tracked insertions in text
+ bool IsShowChangesInMargin2() const
+ { return bool(m_nCoreOptions & ViewOptFlags1::ShowChangesInMargin2); }
+ void SetShowChangesInMargin2( bool b )
+ { SetCoreOption(b, ViewOptFlags1::ShowChangesInMargin2); }
+
//show/hide interactive header/footer on top/bottom of pages
bool IsUseHeaderFooterMenu() const
{ return bool(m_nCoreOptions & ViewOptFlags1::UseHeaderFooterMenu ); }