diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-05-17 13:00:33 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 21:51:37 +0200 |
commit | d865866ec5cf6966757c9f2abd24b18a39f2f924 (patch) | |
tree | 5414bf33af085ef16bdb146f7ae075cf8aae9679 /sw | |
parent | 6adea27650b58fff16e838260f53675c9b8a5c5b (diff) |
sw_redlinehide: let the Show menu item toggle new mode
Change-Id: I1201e84b231be17e6a5ec2294acfb1e3111c9ada
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index f2cbaa68c93f..e5a7fa8b95c7 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -139,6 +139,7 @@ #include <vcl/settings.hxx> #include <i18nutil/searchopt.hxx> #include <paratr.hxx> +#include <rootfrm.hxx> #include <memory> @@ -638,7 +639,15 @@ void SwView::Execute(SfxRequest &rReq) if( static_cast<const SfxBoolItem*>(pItem)->GetValue() ) nMode |= RedlineFlags::ShowDelete; - m_pWrtShell->SetRedlineFlagsAndCheckInsMode( nMode ); + if (getenv("SW_REDLINEHIDE")) // TODO... + { + m_pWrtShell->GetLayout()->SetHideRedlines( + !static_cast<const SfxBoolItem*>(pItem)->GetValue()); + if (m_pWrtShell->IsRedlineOn()) + m_pWrtShell->SetInsMode(); + } + else + m_pWrtShell->SetRedlineFlagsAndCheckInsMode( nMode ); } break; case FN_MAILMERGE_SENDMAIL_CHILDWINDOW: |