summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-09-17 12:01:46 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-09-19 10:18:33 +0200
commitae3150b1e1863e854224c2e41c7e50991f945dad (patch)
tree6bb9f6d6a5e48435c5051ccfc14bb08a3d6ef17a /sw/source/uibase
parent7e8b4756d95057f069467b34e7849f9354856578 (diff)
sw_redlinehide_2: replace SW_REDLINEHIDE with ExperimentalMode config
So we can get more testing & many bug reports. Change-Id: I34fe456a58670baecf4fdf1a87da77aceab43891
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/uiview/view2.cxx5
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx5
2 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index a5a4ec0d730e..4caf268458ab 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
+#include <officecfg/Office/Common.hxx>
#include <svl/aeitem.hxx>
#include <SwStyleNameMapper.hxx>
#include <docary.hxx>
@@ -637,7 +638,9 @@ void SwView::Execute(SfxRequest &rReq)
if( static_cast<const SfxBoolItem*>(pItem)->GetValue() )
nMode |= RedlineFlags::ShowDelete;
- if (getenv("SW_REDLINEHIDE")) // TODO...
+ uno::Reference<uno::XComponentContext> const xContext(
+ comphelper::getProcessComponentContext());
+ if (officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
{
m_pWrtShell->GetLayout()->SetHideRedlines(
!static_cast<const SfxBoolItem*>(pItem)->GetValue());
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 437fb12b11f0..49020bde88e1 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -22,6 +22,7 @@
#include <hintids.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
+#include <officecfg/Office/Common.hxx>
#include <svl/aeitem.hxx>
#include <svl/whiter.hxx>
#include <svl/cjkoptions.hxx>
@@ -281,7 +282,9 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case FN_REDLINE_SHOW:
{
- if (getenv("SW_REDLINEHIDE")) // TODO...
+ uno::Reference<uno::XComponentContext> const xContext(
+ comphelper::getProcessComponentContext());
+ if (officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
{
rSet.Put(SfxBoolItem(nWhich, !m_pWrtShell->GetLayout()->IsHideRedlines()));
}