unotools/source/config/securityoptions.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 77814e2f61704e41753bb3a55a54467ab903509e
Author:     Mike Kaganski <[email protected]>
AuthorDate: Wed Dec 11 06:24:54 2024 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Wed Dec 11 09:54:17 2024 +0100

    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/+/178271
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/unotools/source/config/securityoptions.cxx 
b/unotools/source/config/securityoptions.cxx
index 1c2070ab95fc..63c5715a1e6e 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -200,7 +200,9 @@ void SetMacroSecurityLevel( sal_Int32 _nLevel )
 
 bool IsMacroDisabled()
 {
-    return utl::ConfigManager::IsFuzzing() || 
officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get();
+    return utl::ConfigManager::IsFuzzing()
+           || 
officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get()
+           || officecfg::Office::Common::Misc::ViewerAppMode::get();
 }
 
 std::vector< SvtSecurityOptions::Certificate > GetTrustedAuthors()

Reply via email to