diff options
author | Justin Luth <justin_luth@sil.org> | 2016-07-23 14:56:55 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-28 14:32:00 +0000 |
commit | 6dfc4eb0163d501992d2f9726e4eec0565dd4eb0 (patch) | |
tree | bd6c0ff459d21ac257c2bc609ae95a0db0ceeff1 | |
parent | 15f7ad8774d51b376e40c0ee6061d02510d33e2c (diff) |
tdf#99434 docx enable docprotection only when enforced
Change-Id: I9454a34d7b386acffc50e74d5ef6eed1966d572a
Reviewed-on: https://gerrit.libreoffice.org/27456
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit d40ed9d0cd3c4a66d4ebf65d3a530f0fc5a8da17)
Reviewed-on: https://gerrit.libreoffice.org/27625
-rw-r--r-- | writerfilter/source/dmapper/SettingsTable.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index a8889e1ce401..10791f065f5e 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -147,8 +147,11 @@ void SettingsTable::lcl_attribute(Id nName, Value & val) m_pImpl->m_pCurrentCompatSetting[2].Value <<= sStringValue; break; case NS_ooxml::LN_CT_DocProtect_edit: - m_pImpl->m_bProtectForm = val.getInt() == NS_ooxml::LN_Value_doc_ST_DocProtect_forms; - break; + m_pImpl->m_bProtectForm = (nIntValue == NS_ooxml::LN_Value_doc_ST_DocProtect_forms); + break; + case NS_ooxml::LN_CT_DocProtect_enforcement: + m_pImpl->m_bProtectForm &= (bool)nIntValue; + break; default: { #ifdef DEBUG_WRITERFILTER |