From c14614439bb006701dedda13505c2669c9cc1998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 30 Jan 2025 12:11:10 +0000 Subject: [PATCH] disable SbRtl_Shell by default in kit-mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I645c776bf59a718f4946c2c70edd9194f039e471 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181071 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- basic/source/runtime/methods.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index c5a36e7f24a5..0af3c82369cf 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -3336,6 +3337,13 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool) } else { + // Just go straight to error in this case + if (comphelper::LibreOfficeKit::isActive()) + { + StarBASIC::Error(ERRCODE_BASIC_FILE_NOT_FOUND); + return; + } + oslProcessOption nOptions = osl_Process_SEARCHPATH | osl_Process_DETACHED; OUString aCmdLine = rPar.Get(1)->GetOUString();