diff options
Diffstat (limited to 'sw')
-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 ); } |