summaryrefslogtreecommitdiff
path: root/sw/inc
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
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')
-rw-r--r--sw/inc/cmdid.h4
-rw-r--r--sw/inc/viewopt.hxx11
2 files changed, 13 insertions, 2 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 56407a1adb50..4634a5697d61 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -187,6 +187,10 @@
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON (FN_VIEW + 63) /* Show outline content visibility toggle button */
#define FN_TOGGLE_OUTLINE_CONTENT_VISIBILITY (FN_VIEW + 64)
#define FN_SHOW_CHANGES_IN_MARGIN (FN_VIEW + 65) /* Show tracked deletions in margin */
+#define FN_SHOW_TRACKED_CHANGES_MENU (FN_VIEW + 66) /* Menu for the next layout modes */
+#define FN_SET_TRACKED_CHANGES_IN_TEXT (FN_VIEW + 67) /* Show tracked deletions and insertions in text */
+#define FN_SET_TRACKED_DELETIONS_IN_MARGIN (FN_VIEW + 68) /* Show final text (deletions in margin) */
+#define FN_SET_TRACKED_INSERTIONS_IN_MARGIN (FN_VIEW + 69) /* Show original text (insertions in margin) */
// Region: Insert
#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Bookmark */
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 ); }