diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-11 14:45:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-11 16:56:15 +0200 |
commit | 3ad8347f25935d60e55ff12fd1844001a50bedc4 (patch) | |
tree | 0892f023400d33c2656e60dc0afbf45e276fcdb3 | |
parent | 54c2de7e77dad1a1151c074f2ec5bfe1527d4d12 (diff) |
add some --disable-scripting fixes
Change-Id: I28c4d38a035201acc2b0e5acc5908c4e74ae80e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120327
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/core/data/documen2.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 1db11be0c777..28f19df43539 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -87,6 +87,7 @@ #include <listenercontext.hxx> #include <datamapper.hxx> #include <drwlayer.hxx> +#include <config_features.h> using namespace com::sun::star; @@ -1026,11 +1027,13 @@ sal_uLong ScDocument::TransferTab( ScDocument& rSrcDoc, SCTAB nSrcPos, if ( pSrcShell ) { OUString aLibName("Standard"); +#if HAVE_FEATURE_SCRIPTING const BasicManager *pBasicManager = pSrcShell->GetBasicManager(); if (pBasicManager && !pBasicManager->GetName().isEmpty()) { aLibName = pSrcShell->GetBasicManager()->GetName(); } +#endif OUString sSource; uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->GetBasicContainer(); uno::Reference< container::XNameContainer > xLib; diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index ac011281dd36..d0ad63f1ff95 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -94,6 +94,7 @@ #include <conditio.hxx> #include <columnspanset.hxx> #include <validat.hxx> +#include <config_features.h> #include <memory> #include <utility> @@ -3198,10 +3199,12 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const OUString& sSource ) if( xLibContainer.is() ) { OUString aLibName( "Standard" ); +#if HAVE_FEATURE_SCRIPTING if ( rDocSh.GetBasicManager() && !rDocSh.GetBasicManager()->GetName().isEmpty() ) { aLibName = rDocSh.GetBasicManager()->GetName(); } +#endif uno::Any aLibAny = xLibContainer->getByName( aLibName ); aLibAny >>= xLib; } @@ -3238,10 +3241,12 @@ void VBA_DeleteModule( ScDocShell& rDocSh, const OUString& sModuleName ) if( xLibContainer.is() ) { OUString aLibName( "Standard" ); +#if HAVE_FEATURE_SCRIPTING if ( rDocSh.GetBasicManager() && !rDocSh.GetBasicManager()->GetName().isEmpty() ) { aLibName = rDocSh.GetBasicManager()->GetName(); } +#endif uno::Any aLibAny = xLibContainer->getByName( aLibName ); aLibAny >>= xLib; } |