summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-03-05 16:28:57 -0400
committerAndras Timar <andras.timar@collabora.com>2021-04-10 22:20:05 +0200
commit14c16b9f8672451bbe37700371316b47d319d306 (patch)
tree3020332eb1bf80abc9994b5ad0a264bb6cfcacfc /desktop
parent0d2f9c4c7b1b277907df521340a905f150170802 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113690 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'desktop')
-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 058ff56be341..9d11c2619690 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;