summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-30 17:54:41 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-12-01 08:43:01 +0100
commita67261d125ba3ca3c456936c54f9bed17ed7510e (patch)
tree0fe743f2f2510873392661ba25190698709fe6df /sw/source/filter
parent799cd4c200139b15f104e6f3250000b68d23619a (diff)
sw_redlinehide: make layout based Show/Hide mode the default
remove ExperimentalMode checks Change-Id: Ie098eda0840bbd3231696cae43cc572ad61379fc
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx19
-rw-r--r--sw/source/filter/xml/swxml.cxx13
-rw-r--r--sw/source/filter/xml/wrtxml.cxx22
3 files changed, 13 insertions, 41 deletions
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index ce3573b7b946..f956bbd85953 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -343,19 +343,12 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper()
aAny <<= bShowChanges;
if ( bHandleShowChanges )
{
- if (!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Misc::ExperimentalMode::get(comphelper::getProcessComponentContext()))
- {
- aAny <<= true;
- xModelPropertySet->setPropertyValue( g_sShowChanges, aAny );
- // TODO maybe we need some property for the view-setting?
- SwDoc *const pDoc(SwImport::GetDocFromXMLImport(m_rImport));
- assert(pDoc);
- pDoc->GetDocumentRedlineManager().SetHideRedlines(!bShowChanges);
- }
- else
- {
- xModelPropertySet->setPropertyValue( g_sShowChanges, aAny );
- }
+ aAny <<= true;
+ xModelPropertySet->setPropertyValue( g_sShowChanges, aAny );
+ // TODO maybe we need some property for the view-setting?
+ SwDoc *const pDoc(SwImport::GetDocFromXMLImport(m_rImport));
+ assert(pDoc);
+ pDoc->GetDocumentRedlineManager().SetHideRedlines(!bShowChanges);
}
else
xImportInfoPropertySet->setPropertyValue( g_sShowChanges, aAny );
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index f36ffb47a147..138dc19981c8 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -856,8 +856,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
if( !(IsOrganizerMode() || IsBlockMode() || m_bInsertMode ||
m_aOption.IsFormatsOnly() ||
// sw_redlinehide: disable layout cache for now
- (officecfg::Office::Common::Misc::ExperimentalMode::get(xContext) &&
- !*o3tl::doAccess<bool>(xInfoSet->getPropertyValue(sShowChanges)))))
+ !*o3tl::doAccess<bool>(xInfoSet->getPropertyValue(sShowChanges))))
{
try
{
@@ -905,14 +904,8 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
// tdf#83260 ensure that the first call of CompressRedlines after loading
// the document is a no-op by calling it now
rDoc.getIDocumentRedlineAccess().CompressRedlines();
- if (officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
- { // can't set it on the layout or view shell because it doesn't exist yet
- rDoc.GetDocumentRedlineManager().SetHideRedlines(!(nRedlineFlags & RedlineFlags::ShowDelete));
- }
- else
- {
- rDoc.getIDocumentRedlineAccess().SetRedlineFlags(nRedlineFlags);
- }
+ // can't set it on the layout or view shell because it doesn't exist yet
+ rDoc.GetDocumentRedlineManager().SetHideRedlines(!(nRedlineFlags & RedlineFlags::ShowDelete));
lcl_EnsureValidPam( rPaM ); // move Pam into valid content
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 0d5e53d4c319..ecdfd3fb3ba0 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -187,15 +187,9 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS
const OUString sShowChanges("ShowChanges");
RedlineFlags nRedlineFlags = m_pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
bool isShowChanges;
- if (officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
- { // TODO: ideally this would be stored per-view...
- SwRootFrame const*const pLayout(m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
- isShowChanges = pLayout == nullptr || !pLayout->IsHideRedlines();
- }
- else
- {
- isShowChanges = IDocumentRedlineAccess::IsShowChanges(nRedlineFlags);
- }
+ // TODO: ideally this would be stored per-view...
+ SwRootFrame const*const pLayout(m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
+ isShowChanges = pLayout == nullptr || !pLayout->IsHideRedlines();
xInfoSet->setPropertyValue(sShowChanges, makeAny(isShowChanges));
// ... and hide redlines for export
nRedlineFlags &= ~RedlineFlags::ShowMask;
@@ -418,15 +412,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS
nRedlineFlags = m_pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
nRedlineFlags &= ~RedlineFlags::ShowMask;
nRedlineFlags |= RedlineFlags::ShowInsert;
- if (officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
- {
- nRedlineFlags |= RedlineFlags::ShowDelete;
- }
- else
- {
- if (*o3tl::doAccess<bool>(aAny))
- nRedlineFlags |= RedlineFlags::ShowDelete;
- }
+ nRedlineFlags |= RedlineFlags::ShowDelete;
m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags );
if (xStatusIndicator.is())