sc/source/ui/docshell/macromgr.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit a8699f7cce501ddff999c3596e337e173a567ee7 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Aug 12 08:53:55 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Aug 12 11:52:12 2021 +0200 add some --disable-scripting fixes Change-Id: I94523d4323544fe6c475f0c5cf4113e6d783939e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120374 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx index 9ef4a6bf13f9..39080c67811b 100644 --- a/sc/source/ui/docshell/macromgr.cxx +++ b/sc/source/ui/docshell/macromgr.cxx @@ -24,6 +24,7 @@ #include <cppuhelper/implbase.hxx> #include <sfx2/objsh.hxx> #include <formulacell.hxx> +#include <config_features.h> #include <vector> #include <com/sun/star/container/XContainer.hpp> #include <com/sun/star/script/XLibraryContainer.hpp> @@ -136,10 +137,13 @@ void ScMacroManager::InitUserFuncData() SfxObjectShell* pShell = mrDoc.GetDocumentShell(); if (!pShell) return; - if (!pShell->GetBasicManager()->GetName().isEmpty()) +#if HAVE_FEATURE_SCRIPTING + const BasicManager *pBasicManager = pShell->GetBasicManager(); + if (!pBasicManager->GetName().isEmpty()) { - sProjectName = pShell->GetBasicManager()->GetName(); + sProjectName = pBasicManager->GetName(); } +#endif try { Reference< script::XLibraryContainer > xLibraries( pShell->GetBasicContainer(), uno::UNO_SET_THROW );