diff options
author | László Németh <nemeth@numbertext.org> | 2019-06-12 13:26:16 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-06-12 21:00:05 +0200 |
commit | 0e27158c4f6a6a7676a77afb6b37dd30b3f6d100 (patch) | |
tree | 92690805a62542b837e7b17f6ed336736a4bf4ee /writerfilter | |
parent | 6fd3eb533998c8f63430a43767b2a52aa5e71e3f (diff) |
tdf#89991 DOCX: import/export Show changes mode
handled by the optional w:revisionView OOXML setting.
Using disabled Show Changes mode, exported DOCX contains
<w:revisionView w:insDel="0" w:formatting="0"/>
as the documents exported from MSO with disabled Show Changes
and disabled Options -> Trust Center -> Trust Center Settings ->
Privacy Options -> Make hidden markup visible when opening or saving
(Note: this last setting needs also for opening the documents
really with disabled Show Changes in MSO).
Change-Id: I9f2c7df572f33838ae63185de21431102a7e139e
Reviewed-on: https://gerrit.libreoffice.org/73885
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/SettingsTable.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index 76601e49eae2..609173eefd0b 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -234,6 +234,8 @@ struct SettingsTable_Impl int m_nDefaultTabStop; bool m_bRecordChanges; + bool m_bShowInsDelChanges; + bool m_bShowFormattingChanges; bool m_bLinkStyles; sal_Int16 m_nZoomFactor; sal_Int16 m_nZoomType = 0; @@ -263,6 +265,8 @@ struct SettingsTable_Impl SettingsTable_Impl() : m_nDefaultTabStop( 720 ) //default is 1/2 in , m_bRecordChanges(false) + , m_bShowInsDelChanges(true) + , m_bShowFormattingChanges(true) , m_bLinkStyles(false) , m_nZoomFactor(0) , m_nView(0) @@ -373,6 +377,12 @@ void SettingsTable::lcl_attribute(Id nName, Value & val) case NS_ooxml::LN_AG_Password_salt: // 92036 m_pImpl->m_DocumentProtection.m_sSalt = sStringValue; break; + case NS_ooxml::LN_CT_TrackChangesView_insDel: + m_pImpl->m_bShowInsDelChanges = (nIntValue != 0); + break; + case NS_ooxml::LN_CT_TrackChangesView_formatting: + m_pImpl->m_bShowFormattingChanges = (nIntValue != 0); + break; default: { #ifdef DBG_UTIL @@ -440,6 +450,9 @@ void SettingsTable::lcl_sprm(Sprm& rSprm) m_pImpl->m_bRecordChanges = bool(rSprm.getValue( )->getInt( ) ); } break; + case NS_ooxml::LN_CT_Settings_revisionView: + resolveSprmProps(*this, rSprm); + break; case NS_ooxml::LN_CT_Settings_documentProtection: resolveSprmProps(*this, rSprm); break; @@ -633,6 +646,10 @@ void SettingsTable::ApplyProperties(uno::Reference<text::XTextDocument> const& x { uno::Reference< beans::XPropertySet> xDocProps( xDoc, uno::UNO_QUERY ); + // Show changes value + if (xDocProps.is()) + xDocProps->setPropertyValue("ShowChanges", uno::makeAny( m_pImpl->m_bShowInsDelChanges || m_pImpl->m_bShowFormattingChanges ) ); + // Record changes value if (xDocProps.is()) xDocProps->setPropertyValue("RecordChanges", uno::makeAny( m_pImpl->m_bRecordChanges ) ); |