diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-05-17 13:00:33 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-06-12 18:55:50 +0200 |
commit | 3577fbcfc299604dfd11dba76888a7bcd83b8504 (patch) | |
tree | 58aa6bd4a3c18e431ec04c46515a93567dfcc6d7 | |
parent | 6279efd17bf5a7559bfd4ca22134f34ca944f530 (diff) |
sw_redlinehide: let the Show menu item toggle new mode
Change-Id: I1201e84b231be17e6a5ec2294acfb1e3111c9ada
-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 4ef8b57ab786..87e42fcb7131 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -140,6 +140,7 @@ #include <vcl/settings.hxx> #include <i18nutil/searchopt.hxx> #include <paratr.hxx> +#include <rootfrm.hxx> #include <memory> @@ -639,7 +640,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: |