desktop/source/lib/init.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d41556fecb46a75436c83e6ac07e97ad679be3fa
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Fri Mar 5 16:28:57 2021 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Wed Apr 7 17:47:46 2021 +0200

    lok: add "EnableMacrosExecution" option
    
    Change-Id: I2ad31e2e7f66fdfca1eee07622a4a9fec8b62861
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112030
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113690
    Tested-by: Jenkins
    Reviewed-by: Henry Castro <hcas...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index cba9af2b947c..056a48caa68d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2265,7 +2265,9 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
         aFilterOptions[1].Name = "InteractionHandler";
         aFilterOptions[1].Value <<= xInteraction;
 
-        sal_Int16 nMacroExecMode = document::MacroExecMode::NEVER_EXECUTE;
+        const OUString aEnableMacrosExecution = extractParameter(aOptions, 
u"EnableMacrosExecution");
+        sal_Int16 nMacroExecMode = aEnableMacrosExecution == "true" ? 
document::MacroExecMode::USE_CONFIG :
+            document::MacroExecMode::NEVER_EXECUTE;
         aFilterOptions[2].Name = "MacroExecutionMode";
         aFilterOptions[2].Value <<= nMacroExecMode;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to