diff options
author | Serge Krot <Serge.Krot@cib.de> | 2017-10-02 17:40:59 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-10-06 19:13:23 +0200 |
commit | 40f627c28deb9c7eacd77c4a2c4e2eb919d5cf88 (patch) | |
tree | bd7a7e70e67a6492fd80221001452909325736e2 | |
parent | ce057e662b2e10e111353e9461c3c01434ddbb0f (diff) |
tdf#66398 Remove double initialization of the form protection
Change-Id: I639523b55aef1914ddec62aaae44b0dc87346d0b
Reviewed-on: https://gerrit.libreoffice.org/43157
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index b76c121bb0d2..8e6b8d5cce21 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -931,12 +931,6 @@ void DocxExport::WriteSettings() pFS->singleElementNS( XML_w, XML_defaultTabStop, FSNS( XML_w, XML_val ), OString::number( m_aSettings.defaultTabStop).getStr(), FSEND ); - // Protect form - if( m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::PROTECT_FORM )) - { - pFS->singleElementNS( XML_w, XML_documentProtection, FSNS(XML_w, XML_edit), "forms", FSNS(XML_w, XML_enforcement), "1", FSEND ); - } - // Do not justify lines with manual break if( m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK )) { @@ -1070,14 +1064,18 @@ void DocxExport::WriteSettings() } } + // Protect form // Section-specific write protection - if ( m_pSections->DocumentIsProtected() ) + if (m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM) || + m_pSections->DocumentIsProtected()) { - pFS->singleElementNS( XML_w, XML_documentProtection, - FSNS( XML_w, XML_enforcement ), "true", - FSNS( XML_w, XML_edit ), "forms", - FSEND ); + pFS->singleElementNS(XML_w, XML_documentProtection, + FSNS(XML_w, XML_edit), "forms", + FSNS(XML_w, XML_enforcement), "true", + FSEND); } + + // finish settings.xml pFS->endElementNS( XML_w, XML_settings ); } |