sw/source/filter/ww8/docxattributeoutput.cxx | 3 ++- sw/source/filter/ww8/docxexport.cxx | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit bb96ad0f9a24f92c8553da566f0ebedc064a1318 Author: Eilidh McAdam <eilidh.mca...@itomig.de> Date: Wed Mar 18 02:00:28 2015 +0000 tdf#60060: DOCX export of section protection Initial implementation - no password protection is saved. Specific sections are protected in OOXML by using form protection; that is, only form elements may be edited in protected sections. Change-Id: I294064bbc4e3c307d17001ebd21f1bd6f07de42c Reviewed-on: https://gerrit.libreoffice.org/14895 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index c0dbda7..45b7bbf 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -5401,7 +5401,8 @@ void DocxAttributeOutput::EndSection() void DocxAttributeOutput::SectionFormProtection( bool bProtected ) { if ( bProtected ) - m_pSerializer->singleElementNS( XML_w, XML_formProt, FSEND ); + m_pSerializer->singleElementNS( XML_w, XML_formProt, + FSNS( XML_w, XML_val ), "true", FSEND ); else m_pSerializer->singleElementNS( XML_w, XML_formProt, FSNS( XML_w, XML_val ), "false", FSEND ); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 96c8c7c..30ea867 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -930,6 +930,15 @@ void DocxExport::WriteSettings() } } + // Section-specific write protection + if ( m_pSections->DocumentIsProtected() ) + { + pFS->singleElementNS( XML_w, XML_documentProtection, + FSNS( XML_w, XML_enforcement ), "true", + FSNS( XML_w, XML_edit ), "forms", + FSEND ); + } + pFS->endElementNS( XML_w, XML_settings ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits