writerfilter/source/dmapper/SettingsTable.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit d40ed9d0cd3c4a66d4ebf65d3a530f0fc5a8da17
Author: Justin Luth <justin_l...@sil.org>
Date:   Sat Jul 23 14:56:55 2016 +0300

    tdf#99434 docx enable docprotection only when enforced
    
    Change-Id: I9454a34d7b386acffc50e74d5ef6eed1966d572a
    Reviewed-on: https://gerrit.libreoffice.org/27456
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/writerfilter/source/dmapper/SettingsTable.cxx 
b/writerfilter/source/dmapper/SettingsTable.cxx
index a8889e1..10791f0 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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to