Disable macros in Viewer Mode

Prevents "This document contains macros" dialog on file open.

Change-Id: I92cbd6b5f919ccfa5812b4a90ec72ad4378d009a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178273
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski 2024-12-11 06:24:54 +01:00
parent c876e6c4a5
commit 1c32970c0d

View File

@ -205,7 +205,9 @@ void SetMacroSecurityLevel( sal_Int32 _nLevel )
bool IsMacroDisabled()
{
return comphelper::IsFuzzing() || officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get();
return comphelper::IsFuzzing()
|| officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get()
|| officecfg::Office::Common::Misc::ViewerAppMode::get();
}
std::vector< SvtSecurityOptions::Certificate > GetTrustedAuthors()