Kaydet (Commit) 40f627c2 authored tarafından Serge Krot's avatar Serge Krot Kaydeden (comit) Thorsten Behrens

tdf#66398 Remove double initialization of the form protection

Change-Id: I639523b55aef1914ddec62aaae44b0dc87346d0b
Reviewed-on: https://gerrit.libreoffice.org/43157Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst ce057e66
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment