[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - writerfilter/source

Justin Luth justin_luth at sil.org
Thu Jul 28 14:32:41 UTC 2016


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

New commits:
commit 6dfc4eb0163d501992d2f9726e4eec0565dd4eb0
Author: Justin Luth <justin_luth at 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 <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit d40ed9d0cd3c4a66d4ebf65d3a530f0fc5a8da17)
    Reviewed-on: https://gerrit.libreoffice.org/27625

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


More information about the Libreoffice-commits mailing list