summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorSarper Akdemir <sarper.akdemir.extern@allotropia.de>2024-01-09 02:29:42 +0300
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-01-09 02:21:02 +0100
commita2ccc25ccb2e94f5990d6d413541dbcdd3a72338 (patch)
tree6541bb0bee1cdfb84558d8559a317c1b54994292 /unotools
parent8f4ff4c601c7480479c97b274e577cf074a9a2ef (diff)
tdf#158375: add UI option to disable active content
Adds a checkbox to disable active contents and OLE Automation at Options - LibreOffice - Security - Security Options and Warnings Change-Id: Idfac86e31c97f186eb6b6b2a7a7236b84aedbe83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161808 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/securityoptions.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 5c1c3dbe0a56..f75a21ad6c82 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -100,6 +100,10 @@ bool IsReadOnly( EOption eOption )
case SvtSecurityOptions::EOption::BlockUntrustedRefererLinks:
bReadonly = officecfg::Office::Common::Security::Scripting::BlockUntrustedRefererLinks::isReadOnly();
break;
+ case SvtSecurityOptions::EOption::DisableActiveContent:
+ bReadonly = officecfg::Office::Common::Security::Scripting::DisableActiveContent::isReadOnly() ||
+ officecfg::Office::Common::Security::Scripting::DisableOLEAutomation::isReadOnly();
+ break;
default:
assert(false);
@@ -334,6 +338,10 @@ bool IsOptionSet( EOption eOption )
case SvtSecurityOptions::EOption::BlockUntrustedRefererLinks:
bSet = officecfg::Office::Common::Security::Scripting::BlockUntrustedRefererLinks::get();
break;
+ case SvtSecurityOptions::EOption::DisableActiveContent:
+ bSet = officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() &&
+ officecfg::Office::Common::Security::Scripting::DisableOLEAutomation::get();
+ break;
default:
assert(false);
@@ -383,6 +391,10 @@ void SetOption( EOption eOption, bool bValue )
case SvtSecurityOptions::EOption::BlockUntrustedRefererLinks:
officecfg::Office::Common::Security::Scripting::BlockUntrustedRefererLinks::set(bValue, xChanges);
break;
+ case SvtSecurityOptions::EOption::DisableActiveContent:
+ officecfg::Office::Common::Security::Scripting::DisableActiveContent::set(bValue, xChanges);
+ officecfg::Office::Common::Security::Scripting::DisableOLEAutomation::set(bValue, xChanges);
+ break;
default:
assert(false);