diff options
Diffstat (limited to 'uui/source')
-rw-r--r-- | uui/source/secmacrowarnings.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 6c6e343a08f0..0bc2e1d04d72 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -137,9 +137,14 @@ void MacroWarning::InitControls() { mxViewSignsBtn->connect_clicked(LINK(this, MacroWarning, ViewSignsBtnHdl)); mxViewSignsBtn->set_sensitive(false); - mxAlwaysTrustCB->connect_clicked(LINK(this, MacroWarning, AlwaysTrustCheckHdl)); - mnActSecLevel = SvtSecurityOptions().GetMacroSecurityLevel(); + const SvtSecurityOptions aSecOption; + if (!aSecOption.IsReadOnly(SvtSecurityOptions::EOption::MacroTrustedAuthors)) + mxAlwaysTrustCB->connect_clicked(LINK(this, MacroWarning, AlwaysTrustCheckHdl)); + else + mxAlwaysTrustCB->set_visible(false); + + mnActSecLevel = aSecOption.GetMacroSecurityLevel(); if ( mnActSecLevel >= 2 ) mxEnableBtn->set_sensitive(false); } |