writerfilter: DocProtect_enforcement defaults to false
commitbc898e2c2784e36ad4d4cdf6d962e39069d2c82d
authorJustin Luth <justin.luth@collabora.com>
Tue, 10 Mar 2020 16:18:41 +0000 (10 19:18 +0300)
committerMiklos Vajna <vmiklos@collabora.com>
Thu, 19 Mar 2020 11:20:54 +0000 (19 12:20 +0100)
treeca53c5c2d4104f867423a9d13bcf434c6a087038
parent34ea5c21a752364caef9727850ef34943ad5c752
writerfilter: DocProtect_enforcement defaults to false

If enforcement is not specified, then it defaults to off.
"If this attribute is omitted, then document protection settings
shall not be enforced by applications."

Since we cannot guarantee that NS_ooxml::LN_CT_DocProtect_enforcement
will be called, handle checking the various protection statuses after
the import has finished.

The unit test previously had an explicit enforcement="0".
Removing that was the only change I made.

This patch was inspired by a code-review of LO 6.4's tdf#106843 and
preparation for tdf#120852.

Change-Id: I702f5173fd796eb8bda1ea610411f8297d8889b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90302
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
sw/qa/extras/ooxmlexport/data/TextFrameRotation.docx
sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
writerfilter/source/dmapper/SettingsTable.cxx