summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-03-05 16:28:57 -0400
committerSzymon Kłos <szymon.klos@collabora.com>2021-03-09 11:12:08 +0100
commitd7aa69d3b3418f388518a726a44b6433b0586de9 (patch)
tree268423fc734a3d7ace58da7991505cb6c5d0378c
parent206c5b374eb56ef1674bb0dbd0d199d2761ea469 (diff)
lok: add "EnableMacrosExecution" option
Change-Id: I2ad31e2e7f66fdfca1eee07622a4a9fec8b62861 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112030 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--desktop/source/lib/init.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index af9c9ed1c41b..81b15d4b4fa4 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2274,7 +2274,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, "EnableMacrosExecution");
+ sal_Int16 nMacroExecMode = aEnableMacrosExecution == "true" ? document::MacroExecMode::USE_CONFIG :
+ document::MacroExecMode::NEVER_EXECUTE;
aFilterOptions[2].Name = "MacroExecutionMode";
aFilterOptions[2].Value <<= nMacroExecMode;