diff options
author | Eilidh McAdam <eilidh.mcadam@itomig.de> | 2015-03-18 02:00:28 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-01 12:29:50 +0000 |
commit | bb96ad0f9a24f92c8553da566f0ebedc064a1318 (patch) | |
tree | 8756b667fa603597a65fa0dc65b8de48b1f55c2c /sw/source/filter/ww8/docxexport.cxx | |
parent | bd23cf009a7e3c63a066794d41ae0c97589c8891 (diff) |
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 <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/docxexport.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 96c8c7ca3ca3..30ea86731545 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 ); } |