summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-12-11 11:42:46 +0500
committerMiklos Vajna <vmiklos@collabora.com>2024-12-11 09:56:14 +0100
commita7d567d25e3f13ce78b494a6f49bb0b24cbc0fb3 (patch)
tree553cfa30c383b1840d9dff28fff6edc8cbf21127 /framework
parent77814e2f61704e41753bb3a55a54467ab903509e (diff)
Use SvtSecurityOptions::IsMacroDisabled() instead of officecfg check
The change is most important for Viewer app mode, which also disables macros Change-Id: Ie305649dafbb3717e7986a4b437c38b09ffc1802 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178276 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 0cc8fba505c7..b38acf3038a8 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -28,6 +28,7 @@
#include <osl/mutex.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <unotools/securityoptions.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -70,8 +71,7 @@ MacrosMenuController::~MacrosMenuController()
// private function
void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
- bool bMacrosDisabled = officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get();
- if (bMacrosDisabled)
+ if (SvtSecurityOptions::IsMacroDisabled())
return;
SolarMutexGuard aSolarMutexGuard;