diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-05-10 14:55:49 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-05-11 01:16:39 +0200 |
commit | d7f734db2c078ced3ce08ad58cd816a79abe3bcf (patch) | |
tree | 014716c365afc999b6e15ff6c69af7290dbac5f4 /desktop | |
parent | 1bcad85a5d48cc38ced5883de364f2c66ada273e (diff) |
lok: enable macros by default for Android
This enables macros execution for Android, so the user will be
asked to execute macros (assuming the security level is set to 1,
which is the default) if the document contains any macros to
execute.
Change-Id: I34dbd123c5b4ea7386096fd3a21766da3479be6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115305
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a8c0f078c6a7..2ca561285d93 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2282,9 +2282,13 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, } SvtSecurityOptions().SetMacroSecurityLevel(nMacroSecurityLevel); +#if defined(ANDROID) && HAVE_FEATURE_ANDROID_LOK + sal_Int16 nMacroExecMode = document::MacroExecMode::USE_CONFIG; +#else const OUString aEnableMacrosExecution = extractParameter(aOptions, u"EnableMacrosExecution"); sal_Int16 nMacroExecMode = aEnableMacrosExecution == "true" ? document::MacroExecMode::USE_CONFIG : document::MacroExecMode::NEVER_EXECUTE; +#endif aFilterOptions[2].Name = "MacroExecutionMode"; aFilterOptions[2].Value <<= nMacroExecMode; |