summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk26
-rw-r--r--basctl/Module_basctl.mk2
-rw-r--r--basic/Library_sb.mk2
-rw-r--r--basic/Module_basic.mk2
-rw-r--r--basic/source/runtime/methods.cxx14
-rw-r--r--basic/source/runtime/methods1.cxx8
-rw-r--r--basic/source/sbx/sbxarray.cxx4
-rw-r--r--basic/source/sbx/sbxdbl.cxx6
-rw-r--r--basic/source/sbx/sbxscan.cxx4
-rw-r--r--basic/source/sbx/sbxstr.cxx4
-rw-r--r--basic/source/sbx/sbxvalue.cxx11
-rw-r--r--basic/source/sbx/sbxvar.cxx10
-rw-r--r--chart2/CppunitTest_chart2_export.mk2
-rw-r--r--chart2/CppunitTest_chart2_import.mk2
-rw-r--r--chart2/CppunitTest_chart2_xshape.mk2
-rw-r--r--config_host.mk.in1
-rw-r--r--config_host/config_features.h.in10
-rw-r--r--configure.ac2
-rw-r--r--cui/Library_cui.mk2
-rw-r--r--cui/source/options/treeopt.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx8
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--filter/source/msfilter/msvbahelper.cxx10
-rw-r--r--filter/source/msfilter/svxmsbas2.cxx3
-rw-r--r--librelogo/Module_librelogo.mk2
-rw-r--r--postprocess/Rdb_services.mk2
-rw-r--r--sc/CppunitTest_sc_annotationobj.mk2
-rw-r--r--sc/CppunitTest_sc_annotationshapeobj.mk2
-rw-r--r--sc/CppunitTest_sc_annotationsobj.mk2
-rw-r--r--sc/CppunitTest_sc_cellrangeobj.mk2
-rw-r--r--sc/CppunitTest_sc_chart_regression_test.mk2
-rw-r--r--sc/CppunitTest_sc_datapilotfieldobj.mk2
-rw-r--r--sc/CppunitTest_sc_datapilottableobj.mk2
-rw-r--r--sc/CppunitTest_sc_editfieldobj_cell.mk2
-rw-r--r--sc/CppunitTest_sc_editfieldobj_header.mk2
-rw-r--r--sc/CppunitTest_sc_html_export_test.mk2
-rw-r--r--sc/CppunitTest_sc_macros_test.mk2
-rw-r--r--sc/CppunitTest_sc_modelobj.mk2
-rw-r--r--sc/CppunitTest_sc_namedrangeobj.mk2
-rw-r--r--sc/CppunitTest_sc_namedrangesobj.mk2
-rw-r--r--sc/CppunitTest_sc_outlineobj.mk2
-rw-r--r--sc/CppunitTest_sc_rangelst_test.mk2
-rw-r--r--sc/CppunitTest_sc_styleloaderobj.mk2
-rw-r--r--sc/CppunitTest_sc_tablesheetobj.mk2
-rw-r--r--sc/CppunitTest_sc_tablesheetsobj.mk2
-rw-r--r--sc/Library_sc.mk2
-rw-r--r--sc/Module_sc.mk2
-rw-r--r--sc/source/core/data/validat.cxx4
-rw-r--r--sc/source/core/tool/compiler.cxx4
-rw-r--r--sc/source/core/tool/interpr4.cxx8
-rw-r--r--sc/source/filter/excel/excimp8.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx6
-rw-r--r--sc/source/ui/unoobj/servuno.cxx4
-rw-r--r--sc/source/ui/view/cellsh1.cxx6
-rw-r--r--sc/source/ui/view/cellsh2.cxx4
-rw-r--r--sc/source/ui/view/tabvwshf.cxx6
-rw-r--r--sc/source/ui/view/tabvwshh.cxx4
-rw-r--r--scripting/Module_scripting.mk2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx6
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx6
-rw-r--r--sd/source/ui/view/drviews2.cxx14
-rw-r--r--sd/source/ui/view/drviews3.cxx8
-rw-r--r--sd/source/ui/view/drviews9.cxx38
-rw-r--r--sd/source/ui/view/viewshe3.cxx6
-rw-r--r--sfx2/source/appl/app.cxx18
-rw-r--r--sfx2/source/appl/appbas.cxx13
-rw-r--r--sfx2/source/appl/appbaslib.cxx11
-rw-r--r--sfx2/source/appl/appdata.cxx10
-rw-r--r--sfx2/source/appl/appdde.cxx2
-rw-r--r--sfx2/source/appl/appinit.cxx5
-rw-r--r--sfx2/source/appl/appquit.cxx10
-rw-r--r--sfx2/source/appl/appserv.cxx18
-rw-r--r--sfx2/source/appl/macroloader.cxx4
-rw-r--r--sfx2/source/doc/docmacromode.cxx3
-rw-r--r--sfx2/source/doc/objserv.cxx4
-rw-r--r--sfx2/source/doc/objstor.cxx6
-rw-r--r--sfx2/source/doc/objxtor.cxx24
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx10
-rw-r--r--sfx2/source/inc/appdata.hxx6
-rw-r--r--sfx2/source/view/viewfrm.cxx2
-rw-r--r--solenv/gbuild/extensions/pre_MergedLibsList.mk2
-rw-r--r--solenv/gbuild/gbuild.mk1
-rw-r--r--svx/source/form/fmscriptingenv.cxx4
-rw-r--r--sw/Library_sw.mk2
-rw-r--r--sw/Module_sw.mk2
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx12
-rw-r--r--sw/source/filter/html/htmlbas.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/uibase/app/docsh.cxx4
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/shells/frmsh.cxx4
-rw-r--r--vbahelper/Module_vbahelper.mk2
93 files changed, 303 insertions, 209 deletions
diff --git a/Repository.mk b/Repository.mk
index 729c1d32fca6..219db85d15d9 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -173,7 +173,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \
wpftcalc \
$(if $(ENABLE_OPENCL),scopencl) \
$(if $(ENABLE_COINMP)$(ENABLE_LPSOLVE),solver) \
- $(if $(DISABLE_SCRIPTING),,vbaobj) \
+ $(call gb_Helper_optional,SCRIPTING,vbaobj) \
))
$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,graphicfilter, \
@@ -244,8 +244,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
$(if $(filter-out 1050 1060,$(MACOSX_SDK_VERSION)),avmediaMacAVF) \
$(if $(ENABLE_MACOSX_SANDBOX),,avmediaQuickTime) \
) \
- $(if $(DISABLE_SCRIPTING),,basctl) \
- $(if $(DISABLE_SCRIPTING),,basprov) \
+ $(call gb_Helper_optional,SCRIPTING, \
+ basctl \
+ basprov \
+ ) \
$(if $(filter $(OS),ANDROID),, \
basebmp \
) \
@@ -271,7 +273,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
deploymentmisc \
$(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \
$(if $(filter unx,$(GUIBASE)),desktop_detector) \
- $(if $(DISABLE_SCRIPTING),,dlgprov) \
+ $(call gb_Helper_optional,SCRIPTING,dlgprov) \
$(if $(ENABLE_DIRECTX),directx9canvas) \
$(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
drawinglayer \
@@ -335,7 +337,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
migrationoo2 \
migrationoo3 \
msfilter \
- $(if $(DISABLE_SCRIPTING),,msforms) \
+ $(call gb_Helper_optional,SCRIPTING,msforms) \
mtfrenderer \
$(call gb_Helper_optional,DBCONNECTIVITY,mysql) \
odbc \
@@ -346,7 +348,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
pcr \
$(if $(ENABLE_NPAPI_FROM_BROWSER),pl) \
pdffilter \
- $(if $(DISABLE_SCRIPTING),,protocolhandler) \
+ $(call gb_Helper_optional,SCRIPTING,protocolhandler) \
res \
sax \
sb \
@@ -363,7 +365,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
spell \
$(if $(ENABLE_HEADLESS),,spl) \
storagefd \
- $(if $(DISABLE_SCRIPTING),,stringresource) \
+ $(call gb_Helper_optional,SCRIPTING,stringresource) \
svgio \
svl \
svt \
@@ -387,8 +389,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
updatefeed \
utl \
uui \
- $(if $(DISABLE_SCRIPTING),,vbaevents) \
- $(if $(DISABLE_SCRIPTING),,vbahelper) \
+ $(call gb_Helper_optional,SCRIPTING, \
+ vbaevents \
+ vbahelper \
+ ) \
vcl \
vclcanvas \
vclopengl \
@@ -461,7 +465,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,writer, \
swd \
swui \
t602filter \
- $(if $(DISABLE_SCRIPTING),,vbaswobj) \
+ $(call gb_Helper_optional,SCRIPTING,vbaswobj) \
wpftwriter \
writerfilter \
))
@@ -560,7 +564,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
$(if $(filter WNT-TRUE,$(OS)-$(DISABLE_ATL)),,emboleobj) \
package2 \
$(if $(and $(filter unx,$(GUIBASE)),$(filter-out MACOSX,$(OS))),recentfile) \
- $(if $(DISABLE_SCRIPTING),,scriptframe) \
+ $(call gb_Helper_optional,SCRIPTING,scriptframe) \
sdbc2 \
sofficeapp \
srtrs1 \
diff --git a/basctl/Module_basctl.mk b/basctl/Module_basctl.mk
index 92d35531cdb6..ae4ff50f5160 100644
--- a/basctl/Module_basctl.mk
+++ b/basctl/Module_basctl.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Module_Module,basctl))
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_targets,basctl,\
Library_basctl \
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 3fed0bccc901..314b999a5863 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -59,7 +59,7 @@ $(eval $(call gb_Library_use_libraries,sb,\
$(gb_UWINAPI) \
))
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/basmgr/basicmanagerrepository \
diff --git a/basic/Module_basic.mk b/basic/Module_basic.mk
index 0f74a2746431..98eb3447f97b 100644
--- a/basic/Module_basic.mk
+++ b/basic/Module_basic.mk
@@ -9,7 +9,7 @@
$(eval $(call gb_Module_Module,basic))
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_l10n_targets,basic,\
AllLangResTarget_sb \
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 3ccc46e994c7..194b06bb6444 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <tools/date.hxx>
#include <basic/sbxvar.hxx>
#include <basic/sbuno.hxx>
@@ -94,7 +96,7 @@ using namespace com::sun::star::uno;
#include <postwin.h>
#endif
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
static void FilterWhiteSpace( OUString& rStr )
{
@@ -4876,7 +4878,7 @@ sal_Int16 implGetDateYear( double aDate )
bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if ( nYear < 30 && SbiRuntime::isVBAEnabled() )
{
nYear += 2000;
@@ -4892,26 +4894,26 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double&
Date aCurDate( nDay, nMonth, nYear );
if ((nYear < 100 || nYear > 9999) )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::Error( SbERR_BAD_ARGUMENT );
#endif
return false;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if ( !SbiRuntime::isVBAEnabled() )
#endif
{
if ( (nMonth < 1 || nMonth > 12 )||
(nDay < 1 || nDay > 31 ) )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::Error( SbERR_BAD_ARGUMENT );
#endif
return false;
}
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else
{
// grab the year & month
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 29f25c504273..9b1ae18f87f3 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <sal/config.h>
#include <cstddef>
@@ -96,7 +98,7 @@ static Reference< XCalendar3 > getLocaleCalendar( void )
return xCalendar;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
RTLFUNC(CallByName)
{
@@ -3316,7 +3318,7 @@ sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam, sal_Int16 nFirstDay
{
if( nFirstDay < 0 || nFirstDay > 7 )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::Error( SbERR_BAD_ARGUMENT );
#endif
return 0;
@@ -3326,7 +3328,7 @@ sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam, sal_Int16 nFirstDay
Reference< XCalendar3 > xCalendar = getLocaleCalendar();
if( !xCalendar.is() )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::Error( SbERR_INTERNAL_ERROR );
#endif
return 0;
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index f6f04060c24b..420715b261c3 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <basic/sbx.hxx>
@@ -731,7 +733,7 @@ void SbxDimArray::Put32( SbxVariable* p, const sal_Int32* pIdx )
// Element-Number with the help of Parameter-Array
sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if (m_vDimensions.empty() || !pPar ||
((m_vDimensions.size() != sal::static_int_cast<size_t>(pPar->Count() - 1))
&& SbiRuntime::isVBAEnabled()))
diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx
index e349a946c337..e251336c62c8 100644
--- a/basic/source/sbx/sbxdbl.cxx
+++ b/basic/source/sbx/sbxdbl.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <tools/errcode.hxx>
#include <basic/sbx.hxx>
#include "sbxconv.hxx"
@@ -69,7 +71,7 @@ double ImpGetDouble( const SbxValues* p )
if( !p->pOUString )
{
nRes = 0;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour
SbxBase::SetError( SbxERR_CONVERSION );
#endif
@@ -81,7 +83,7 @@ double ImpGetDouble( const SbxValues* p )
if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
{
nRes = 0;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour
SbxBase::SetError( SbxERR_CONVERSION );
#endif
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index b31f0a56a2b9..0ec92eba6d44 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <tools/errcode.hxx>
#include <basic/sbx.hxx>
#include "sbxconv.hxx"
@@ -250,7 +252,7 @@ SbxError ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
if( l >= SbxMININT && l <= SbxMAXINT )
eScanType = SbxINTEGER;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else if ( SbiRuntime::isVBAEnabled() )
{
OSL_TRACE("Reporting error converting");
diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx
index 339080ecd352..ded077a6c4fd 100644
--- a/basic/source/sbx/sbxstr.cxx
+++ b/basic/source/sbx/sbxstr.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <tools/errcode.hxx>
#include <basic/sbx.hxx>
#include "sbxconv.hxx"
@@ -260,7 +262,7 @@ SbxArray* StringToByteArray(const OUString& rStr)
sal_Int32 nArraySize = rStr.getLength() * 2;
const sal_Unicode* pSrc = rStr.getStr();
SbxDimArray* pArray = new SbxDimArray(SbxBYTE);
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
bool bIncIndex = false;
#else
bool bIncIndex = ( IsBaseIndexOne() && SbiRuntime::isVBAEnabled() );
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 605cfe3b33e0..87bf0c0bbde1 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <math.h>
#include <tools/debug.hxx>
@@ -259,7 +260,7 @@ SbxValue* SbxValue::TheRealValue( bool bObjInObjError ) const
((SbxValue*) pObj)->aData.eType == SbxOBJECT &&
((SbxValue*) pObj)->aData.pObj == pObj )
{
-#ifdef DISABLE_SCRIPTING // No sbunoobj
+#if !HAVE_FEATURE_SCRIPTING
const bool bSuccess = false;
#else
bool bSuccess = handleToStringForCOMObjects( pObj, p );
@@ -871,8 +872,8 @@ bool SbxValue::Convert( SbxDataType eTo )
bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
{
-#ifdef DISABLE_SCRIPTING
- bool bVBAInterop = false;
+#if !HAVE_FEATURE_SCRIPTING
+ const bool bVBAInterop = false;
#else
bool bVBAInterop = SbiRuntime::isVBAEnabled();
#endif
@@ -1243,8 +1244,8 @@ Lbl_OpIsEmpty:
bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
{
-#ifdef DISABLE_SCRIPTING
- bool bVBAInterop = false;
+#if !HAVE_FEATURE_SCRIPTING
+ const bool bVBAInterop = false;
#else
bool bVBAInterop = SbiRuntime::isVBAEnabled();
#endif
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index ba32676f4335..5e7595041828 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <svl/SfxBroadcaster.hxx>
@@ -78,7 +80,7 @@ SbxVariable::SbxVariable( const SbxVariable& r )
if( r.mpSbxVariableImpl != NULL )
{
mpSbxVariableImpl = new SbxVariableImpl( *r.mpSbxVariableImpl );
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if( mpSbxVariableImpl->m_xComListener.is() )
{
registerComListenerVariableForBasic( this, mpSbxVariableImpl->m_pComListenerParentBasic );
@@ -112,7 +114,7 @@ SbxVariable::SbxVariable( SbxDataType t, void* p ) : SbxValue( t, p )
SbxVariable::~SbxVariable()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if( IsSet( SBX_DIM_AS_NEW ))
{
removeDimAsNewRecoverItem( this );
@@ -347,7 +349,7 @@ SbxVariable& SbxVariable::operator=( const SbxVariable& r )
if( r.mpSbxVariableImpl != NULL )
{
mpSbxVariableImpl = new SbxVariableImpl( *r.mpSbxVariableImpl );
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if( mpSbxVariableImpl->m_xComListener.is() )
{
registerComListenerVariableForBasic( this, mpSbxVariableImpl->m_pComListenerParentBasic );
@@ -450,7 +452,7 @@ void SbxVariable::SetComListener( ::com::sun::star::uno::Reference< ::com::sun::
SbxVariableImpl* pImpl = getImpl();
pImpl->m_xComListener = xComListener;
pImpl->m_pComListenerParentBasic = pParentBasic;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
registerComListenerVariableForBasic( this, pParentBasic );
#endif
}
diff --git a/chart2/CppunitTest_chart2_export.mk b/chart2/CppunitTest_chart2_export.mk
index 3b941a9b2034..a1a4bd6bac8c 100644
--- a/chart2/CppunitTest_chart2_export.mk
+++ b/chart2/CppunitTest_chart2_export.mk
@@ -105,7 +105,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_export,\
sd/util/sd \
sd/util/sdfilt \
sd/util/sdd \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
scaddins/source/analysis/analysis \
scaddins/source/datefunc/date \
diff --git a/chart2/CppunitTest_chart2_import.mk b/chart2/CppunitTest_chart2_import.mk
index f925e58acd70..742f7f68aea6 100644
--- a/chart2/CppunitTest_chart2_import.mk
+++ b/chart2/CppunitTest_chart2_import.mk
@@ -103,7 +103,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_import,\
sd/util/sd \
sd/util/sdfilt \
sd/util/sdd \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
scaddins/source/analysis/analysis \
scaddins/source/datefunc/date \
diff --git a/chart2/CppunitTest_chart2_xshape.mk b/chart2/CppunitTest_chart2_xshape.mk
index 9d5076b52e42..99149a6e0cb2 100644
--- a/chart2/CppunitTest_chart2_xshape.mk
+++ b/chart2/CppunitTest_chart2_xshape.mk
@@ -101,7 +101,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_xshape,\
sd/util/sd \
sd/util/sdfilt \
sd/util/sdd \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
scaddins/source/analysis/analysis \
scaddins/source/datefunc/date \
diff --git a/config_host.mk.in b/config_host.mk.in
index 32b5145da0c1..aaa0af6813e6 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -97,7 +97,6 @@ export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@
export DISABLE_EXPORT=@DISABLE_EXPORT@
export DISABLE_OPENSSL=@DISABLE_OPENSSL@
export DISABLE_PYTHON=@DISABLE_PYTHON@
-export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@
export DLLTOOL=@DLLTOOL@
export DOCDIR=@DOCDIR@
export DOXYGEN=@DOXYGEN@
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 04dc7ba520f8..74ce2347c6b1 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -64,6 +64,16 @@
#define HAVE_FEATURE_EXTENSIONS 0
+/* SCRIPTING - Whether we have any mechanism to execute user-provided scripts
+ *
+ * Primarily intended for the iOS App Store where the
+ * rules prohibit user-accessible scripting features.
+ * Sure, it would be nice to still be able to have internal features
+ * implemented in some scripting language. Later, if necessary.
+ */
+
+#define HAVE_FEATURE_SCRIPTING 0
+
/* MULTIUSER_ENVIRONMENT - Wheter running on a "normal" multi-user
* desktop (or server) OS
*
diff --git a/configure.ac b/configure.ac
index 8babb1d92237..93a343e1ff86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2512,11 +2512,11 @@ fi
DISABLE_SCRIPTING=''
if test "$enable_scripting" = yes; then
BUILD_TYPE="$BUILD_TYPE SCRIPTING"
+ AC_DEFINE(HAVE_FEATURE_SCRIPTING)
else
DISABLE_SCRIPTING='TRUE'
SCPDEFS="$SCPDEFS -DDISABLE_SCRIPTING"
fi
-AC_SUBST(DISABLE_SCRIPTING)
if test $_os = iOS -o $_os = Android; then
# Disable dynamic_loading always for iOS and Android
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 60808ef729a2..b821f2a6a45b 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -137,7 +137,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/options/optaboutconfig \
cui/source/options/optaccessibility \
cui/source/options/optasian \
- $(if $(DISABLE_SCRIPTING),, \
+ $(call gb_Helper_optional,SCRIPTING, \
cui/source/options/optbasic) \
cui/source/options/optchart \
cui/source/options/optcolor \
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 52fa7ed7388a..4647feecc576 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "cuires.hrc"
#include "helpid.hrc"
@@ -320,7 +322,7 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const Sf
case RID_SVXPAGE_OPTIONS_JAVA: fnCreate = &SvxJavaOptionsPage::Create ; break;
case RID_SVXPAGE_ONLINEUPDATE: fnCreate = &SvxOnlineUpdateTabPage::Create; break;
case RID_OPTPAGE_CHART_DEFCOLORS: fnCreate = &SvxDefaultColorOptPage::Create; break;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
case RID_SVXPAGE_BASICIDE_OPTIONS: fnCreate = &SvxBasicIDEOptionsPage::Create; break;
#endif
}
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index fd1dbc38d6f8..25fc583b2ec4 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "apitools.hxx"
#include "core_resource.hrc"
#include "core_resource.hxx"
@@ -172,7 +174,7 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
{
m_pDatabaseDocumentLoader = new DatabaseDocumentLoader( _rxContext );
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
::basic::BasicManagerRepository::registerCreationListener( *this );
#endif
@@ -188,7 +190,7 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
ODatabaseContext::~ODatabaseContext()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
::basic::BasicManagerRepository::revokeCreationListener( *this );
#endif
@@ -739,7 +741,7 @@ Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelImplementationId()
void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForDocument, BasicManager& _rBasicManager )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) _rxForDocument;
(void) _rBasicManager;
#else
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 537470442956..e45f2a99c22b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1723,7 +1723,7 @@ int Desktop::doShutdown()
// with the solar mutex unlocked, to avoid deadlock:
sal_uLong nAcquireCount = Application::ReleaseSolarMutex();
DeregisterServices();
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::DetachAllDocBasicItems();
#endif
Application::AcquireSolarMutex(nAcquireCount);
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 45101103cc11..e4ae3d86bd09 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <filter/msfilter/msvbahelper.hxx>
#include <basic/sbx.hxx>
#include <basic/sbstar.hxx>
@@ -172,7 +174,7 @@ bool hasMacro( SfxObjectShell* pShell, const OUString& sLibrary, OUString& sMod,
{
bool bFound = false;
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) pShell;
(void) sLibrary;
(void) sMod;
@@ -264,7 +266,7 @@ void parseMacro( const OUString& sMacro, OUString& sContainer, OUString& sModule
OUString resolveVBAMacro( SfxObjectShell* pShell, const OUString& rLibName, const OUString& rModuleName, const OUString& rMacroName )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) pShell;
(void) rLibName;
(void) rModuleName;
@@ -283,7 +285,7 @@ OUString resolveVBAMacro( SfxObjectShell* pShell, const OUString& rLibName, cons
MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& MacroName, bool bSearchGlobalTemplates )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) pShell;
(void) MacroName;
(void) bSearchGlobalTemplates;
@@ -458,7 +460,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& Macro
// Treat the args as possible inouts ( conversion at bottom of method )
bool executeMacro( SfxObjectShell* pShell, const OUString& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& aRet, const uno::Any& /*aCaller*/)
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) pShell;
(void) sMacroName;
(void) aArgs;
diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx
index c06f10bb31f0..ae531a89a557 100644
--- a/filter/source/msfilter/svxmsbas2.cxx
+++ b/filter/source/msfilter/svxmsbas2.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <basic/basmgr.hxx>
#include <sfx2/objsh.hxx>
@@ -38,7 +39,7 @@ sal_uLong SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto,
xVBAStg = 0;
if( bSaveInto )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
BasicManager *pBasicMan = rDocSh.GetBasicManager();
if( pBasicMan && pBasicMan->IsBasicModified() )
nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE;
diff --git a/librelogo/Module_librelogo.mk b/librelogo/Module_librelogo.mk
index 5d8996fc466f..2e83293cca08 100644
--- a/librelogo/Module_librelogo.mk
+++ b/librelogo/Module_librelogo.mk
@@ -9,7 +9,7 @@
$(eval $(call gb_Module_Module,librelogo))
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
ifneq ($(DISABLE_PYTHON),TRUE)
$(eval $(call gb_Module_add_targets,librelogo,\
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 1e84bd4159fd..220aeda406c3 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -161,7 +161,7 @@ $(eval $(call gb_Rdb_add_components,services,\
$(if $(WITH_WEBDAV), \
ucb/source/ucp/webdav-neon/ucpdav1 \
) \
- $(if $(DISABLE_SCRIPTING),, \
+ $(call gb_Helper_optional,SCRIPTING, \
basctl/util/basctl \
basic/util/sb \
sc/util/vbaobj \
diff --git a/sc/CppunitTest_sc_annotationobj.mk b/sc/CppunitTest_sc_annotationobj.mk
index 52cf7aba8e69..5ff4586abc52 100644
--- a/sc/CppunitTest_sc_annotationobj.mk
+++ b/sc/CppunitTest_sc_annotationobj.mk
@@ -87,7 +87,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_annotationobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_annotationshapeobj.mk b/sc/CppunitTest_sc_annotationshapeobj.mk
index d979d56ce2ff..d986101075cc 100644
--- a/sc/CppunitTest_sc_annotationshapeobj.mk
+++ b/sc/CppunitTest_sc_annotationshapeobj.mk
@@ -84,7 +84,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_annotationshapeobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_annotationsobj.mk b/sc/CppunitTest_sc_annotationsobj.mk
index b976a9c0043b..129646621044 100644
--- a/sc/CppunitTest_sc_annotationsobj.mk
+++ b/sc/CppunitTest_sc_annotationsobj.mk
@@ -87,7 +87,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_annotationsobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_cellrangeobj.mk b/sc/CppunitTest_sc_cellrangeobj.mk
index 2d755ad91371..72b768129fd3 100644
--- a/sc/CppunitTest_sc_cellrangeobj.mk
+++ b/sc/CppunitTest_sc_cellrangeobj.mk
@@ -87,7 +87,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_cellrangeobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_chart_regression_test.mk b/sc/CppunitTest_sc_chart_regression_test.mk
index 6b7897832c71..ce3a33d97586 100644
--- a/sc/CppunitTest_sc_chart_regression_test.mk
+++ b/sc/CppunitTest_sc_chart_regression_test.mk
@@ -88,7 +88,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_chart_regression_test,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_datapilotfieldobj.mk b/sc/CppunitTest_sc_datapilotfieldobj.mk
index eb604afa36bd..80743eba0f44 100644
--- a/sc/CppunitTest_sc_datapilotfieldobj.mk
+++ b/sc/CppunitTest_sc_datapilotfieldobj.mk
@@ -86,7 +86,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_datapilotfieldobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_datapilottableobj.mk b/sc/CppunitTest_sc_datapilottableobj.mk
index d55d3c71ded1..8403199008dc 100644
--- a/sc/CppunitTest_sc_datapilottableobj.mk
+++ b/sc/CppunitTest_sc_datapilottableobj.mk
@@ -86,7 +86,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_datapilottableobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_editfieldobj_cell.mk b/sc/CppunitTest_sc_editfieldobj_cell.mk
index 05f9aabd87df..5c9314310ace 100644
--- a/sc/CppunitTest_sc_editfieldobj_cell.mk
+++ b/sc/CppunitTest_sc_editfieldobj_cell.mk
@@ -85,7 +85,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_editfieldobj_cell,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_editfieldobj_header.mk b/sc/CppunitTest_sc_editfieldobj_header.mk
index 98dc86fa5f55..19c44a8311db 100644
--- a/sc/CppunitTest_sc_editfieldobj_header.mk
+++ b/sc/CppunitTest_sc_editfieldobj_header.mk
@@ -85,7 +85,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_editfieldobj_header,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_html_export_test.mk b/sc/CppunitTest_sc_html_export_test.mk
index 1a66cf6f7a56..21aa210caa5a 100644
--- a/sc/CppunitTest_sc_html_export_test.mk
+++ b/sc/CppunitTest_sc_html_export_test.mk
@@ -90,7 +90,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_html_export_test,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk
index c55be35922a3..4794387c88a7 100644
--- a/sc/CppunitTest_sc_macros_test.mk
+++ b/sc/CppunitTest_sc_macros_test.mk
@@ -93,7 +93,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_macros_test,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_modelobj.mk b/sc/CppunitTest_sc_modelobj.mk
index bcdd9db9e81e..c315209b9170 100644
--- a/sc/CppunitTest_sc_modelobj.mk
+++ b/sc/CppunitTest_sc_modelobj.mk
@@ -86,7 +86,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_modelobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_namedrangeobj.mk b/sc/CppunitTest_sc_namedrangeobj.mk
index 605bfb634d45..8a0e592e9c49 100644
--- a/sc/CppunitTest_sc_namedrangeobj.mk
+++ b/sc/CppunitTest_sc_namedrangeobj.mk
@@ -86,7 +86,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_namedrangeobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_namedrangesobj.mk b/sc/CppunitTest_sc_namedrangesobj.mk
index 70a0aa7ada45..dc001a18a8e5 100644
--- a/sc/CppunitTest_sc_namedrangesobj.mk
+++ b/sc/CppunitTest_sc_namedrangesobj.mk
@@ -86,7 +86,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_namedrangesobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_outlineobj.mk b/sc/CppunitTest_sc_outlineobj.mk
index 06c401a5a37e..3bf08697efeb 100644
--- a/sc/CppunitTest_sc_outlineobj.mk
+++ b/sc/CppunitTest_sc_outlineobj.mk
@@ -87,7 +87,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_outlineobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_rangelst_test.mk b/sc/CppunitTest_sc_rangelst_test.mk
index 08a3e531ea5e..24e885c5ec07 100644
--- a/sc/CppunitTest_sc_rangelst_test.mk
+++ b/sc/CppunitTest_sc_rangelst_test.mk
@@ -102,7 +102,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_rangelst_test,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_styleloaderobj.mk b/sc/CppunitTest_sc_styleloaderobj.mk
index 128a132c982b..1cff77ac23a2 100644
--- a/sc/CppunitTest_sc_styleloaderobj.mk
+++ b/sc/CppunitTest_sc_styleloaderobj.mk
@@ -87,7 +87,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_styleloaderobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_tablesheetobj.mk b/sc/CppunitTest_sc_tablesheetobj.mk
index 5df98b1870d2..6063d4869c11 100644
--- a/sc/CppunitTest_sc_tablesheetobj.mk
+++ b/sc/CppunitTest_sc_tablesheetobj.mk
@@ -87,7 +87,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_tablesheetobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/CppunitTest_sc_tablesheetsobj.mk b/sc/CppunitTest_sc_tablesheetsobj.mk
index 4ba558974173..08952044a34d 100644
--- a/sc/CppunitTest_sc_tablesheetsobj.mk
+++ b/sc/CppunitTest_sc_tablesheetsobj.mk
@@ -87,7 +87,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_tablesheetsobj,\
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
sfx2/util/sfx \
sot/util/sot \
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 20460ee5b146..cdd422822c66 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -85,7 +85,7 @@ $(eval $(call gb_Library_use_libraries,sc,\
tl \
ucbhelper \
utl \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
vbahelper) \
vcl \
vclopengl \
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 464764fa3871..0cb59e30ead6 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -42,7 +42,7 @@ $(eval $(call gb_Module_add_targets,sc,\
endif
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_targets,sc,\
Library_vbaobj \
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index f5a757151d22..b760be31fe0c 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "validat.hxx"
#include <sfx2/app.hxx>
@@ -280,7 +282,7 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput,
// the Sbx-Objekt may not be created (?)
// pDocSh->GetSbxObject();
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
// no security check ahead (only CheckMacroWarn), that happens in CallBasic
// Function search by their simple name,
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 857087f18361..7840c9ddbaf5 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "compiler.hxx"
#include <sfx2/app.hxx>
@@ -2807,7 +2809,7 @@ bool ScCompiler::IsReference( const OUString& rName )
bool ScCompiler::IsMacro( const OUString& rName )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) rName;
return false;
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 710b4a0686d0..2b1b92ad6f35 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "interpre.hxx"
#include <rangelst.hxx>
@@ -3030,7 +3032,7 @@ void ScInterpreter::ScMissing()
PushTempToken( new FormulaMissingToken );
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCellRange, ScDocument* pDok )
{
@@ -3096,7 +3098,7 @@ static bool lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPa
void ScInterpreter::ScMacro()
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
PushNoValue(); // ohne DocShell kein CallBasic
return;
#else
@@ -3396,7 +3398,7 @@ void ScInterpreter::ScMacro()
#endif
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
{
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 0f59432e1fed..38b7cf65052c 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "excimp8.hxx"
#include <boost/bind.hpp>
@@ -433,7 +435,7 @@ void ImportExcel8::EndSheet( void )
void ImportExcel8::PostDocLoad( void )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
// reading basic has been delayed until sheet objects (codenames etc.) are read
if( HasBasic() )
ReadBasic();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index a8f7883c51cc..a3dce4dbccec 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -157,14 +157,14 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
else // geschuetzte Zelle
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
SbxBase::SetError( SbxERR_BAD_PARAMETER ); //! welchen Fehler ?
#endif
break;
}
}
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
SbxBase::SetError( SbxERR_NO_OBJECT );
#endif
}
@@ -1095,7 +1095,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScTabViewShell* pSh = GetBestViewShell();
if ( pSh )
pSh->Execute( rReq );
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else
SbxBase::SetError( SbxERR_NO_ACTIVE_OBJECT );
#endif
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 946c3e1d3303..017e760fd944 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <sal/macros.h>
#include <svtools/unoimap.hxx>
#include <svx/unofill.hxx>
@@ -587,7 +589,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
xRet.set(static_cast<sheet::XFormulaOpCodeMapper*>(new ScFormulaOpCodeMapperObj(::std::unique_ptr<formula::FormulaCompiler> (pComp))));
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
case SC_SERVICE_VBAOBJECTPROVIDER:
if (pDocShell && pDocShell->GetDocument().IsInVBAMode())
{
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 5c63df47494e..4440f9cf919e 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/sheet/DataPilotFieldFilter.hpp>
@@ -1807,7 +1809,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
rReq.Done();
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else if (rReq.IsAPI())
SbxBase::SetError(SbxERR_BAD_PARAMETER);
#endif
@@ -1854,7 +1856,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
if (pTabViewShell->InsertName( aName, aSymbol, aAttrib ))
rReq.Done();
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else
SbxBase::SetError( SbxERR_BAD_PARAMETER ); // Basic-error
#endif
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 11e0166ef5dd..68c0bcbb5d91 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "scitems.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
@@ -667,7 +669,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
}
rReq.Done();
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else if (rReq.IsAPI())
SbxBase::SetError(SbxERR_BAD_PARAMETER);
#endif
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 75b221ecff45..4a28181e3d0a 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <boost/scoped_ptr.hpp>
#include "scitems.hxx"
@@ -404,7 +406,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
if( rReq.IsAPI() )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::Error( SbERR_SETPROP_FAILED ); // XXX Fehlerbehandlung???
#endif
}
@@ -736,7 +738,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
if( rReq.IsAPI() )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::Error( SbERR_SETPROP_FAILED );
#endif
}
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 641998930843..89a7bc9395b6 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <svx/svdmark.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdview.hxx>
@@ -131,7 +133,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
}
}
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if (!bDone)
SbxBase::SetError( SbxERR_BAD_PARAMETER ); // Basic-Fehler
#endif
diff --git a/scripting/Module_scripting.mk b/scripting/Module_scripting.mk
index de90fe773af1..ff509bc260c8 100644
--- a/scripting/Module_scripting.mk
+++ b/scripting/Module_scripting.mk
@@ -9,7 +9,7 @@
$(eval $(call gb_Module_Module,scripting))
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_targets,scripting,\
$(if $(ENABLE_JAVA),\
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 1281111ce1cc..1b9cdd43b2dd 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <com/sun/star/frame/theAutoRecovery.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -664,7 +666,7 @@ void SAL_CALL SlideshowImpl::disposing()
if( maPresSettings.mbFullScreen )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
// restore StarBASICErrorHdl
StarBASIC::SetGlobalErrorHdl(maStarBASICGlobalErrorHdl);
maStarBASICGlobalErrorHdl = Link();
@@ -995,7 +997,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if( maPresSettings.mbFullScreen )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
// disable basic ide error handling
maStarBASICGlobalErrorHdl = StarBASIC::GetGlobalErrorHdl();
StarBASIC::SetGlobalErrorHdl( Link() );
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index d859637bb0a6..6e01b5244a40 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "ViewShellImplementation.hxx"
#include "sdpage.hxx"
@@ -141,7 +143,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
}
else
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
rRequest.Ignore ();
@@ -155,7 +157,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
}
else
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
rRequest.Ignore ();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index f1a9454614ca..d172e9e5a8d5 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <avmedia/mediaplayer.hxx>
#include <basic/sberrors.hxx>
@@ -510,7 +512,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
rReq.Ignore ();
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
rReq.Ignore ();
@@ -538,7 +540,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
rReq.Ignore ();
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
rReq.Ignore ();
@@ -587,13 +589,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
rBindings.Invalidate( SID_ZOOM_OUT );
rBindings.Invalidate( SID_ATTR_ZOOMSLIDER );
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
rReq.Ignore ();
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
rReq.Ignore ();
@@ -1484,7 +1486,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else if (pArgs->Count () != 4)
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
Cancel();
@@ -1666,7 +1668,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
Cancel ();
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 7318d84bad9b..0c257dbdbe46 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "DrawViewShell.hxx"
#include <sfx2/viewfrm.hxx>
@@ -151,7 +153,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue ();
if (! CHECK_RANGE (PK_STANDARD, nWhatKind, PK_HANDOUT))
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
rReq.Ignore ();
@@ -161,7 +163,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
{
if (! CHECK_RANGE (0, nWhatPage, GetDoc()->GetSdPageCount((PageKind)nWhatKind)))
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
rReq.Ignore ();
@@ -174,7 +176,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
}
else
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
rReq.Ignore ();
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 603814a2182a..4319cdaa2912 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "DrawViewShell.hxx"
#include <vcl/wrkwin.hxx>
#include <svx/xgrad.hxx>
@@ -218,12 +220,12 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
pAttr->Put (XFillStyleItem ((drawing::FillStyle) pFillStyle->GetValue ()), XATTR_FILLSTYLE);
rBindings.Invalidate (SID_ATTR_FILL_STYLE);
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -240,12 +242,12 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
pAttr->Put (XLineStyleItem ((XLineStyle) pLineStyle->GetValue ()), XATTR_LINESTYLE);
rBindings.Invalidate (SID_ATTR_LINE_STYLE);
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -261,7 +263,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
rBindings.Invalidate (SID_ATTR_LINE_WIDTH);
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -285,7 +287,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
rBindings.Invalidate (SID_ATTR_FILL_STYLE);
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -306,7 +308,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
rBindings.Invalidate (SID_ATTR_LINE_COLOR);
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -368,7 +370,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
rBindings.Invalidate (SID_ATTR_FILL_GRADIENT);
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -422,7 +424,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
rBindings.Invalidate (SID_ATTR_FILL_STYLE);
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -467,12 +469,12 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
rBindings.Invalidate (SID_ATTR_LINE_DASH);
rBindings.Invalidate (SID_ATTR_FILL_STYLE);
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -544,12 +546,12 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
rBindings.Invalidate (SID_ATTR_FILL_GRADIENT);
rBindings.Invalidate (SID_ATTR_FILL_STYLE);
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -606,12 +608,12 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
rBindings.Invalidate (SID_ATTR_FILL_HATCH);
rBindings.Invalidate (SID_ATTR_FILL_STYLE);
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -646,7 +648,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -681,7 +683,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
@@ -696,7 +698,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
{
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
break;
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index ca6dbb148183..84916c7cae70 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "ViewShell.hxx"
#include "GraphicViewShell.hxx"
#include "GraphicViewShellBase.hxx"
@@ -279,7 +281,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
if(HasCurrentFunction( SID_BEZIER_EDIT ) )
GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
#endif
rRequest.Ignore ();
@@ -292,7 +294,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
if(HasCurrentFunction(SID_BEZIER_EDIT) )
GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (SbERR_WRONG_ARGS);
#endif
rRequest.Ignore ();
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 83794e8ef17f..0eeb327f7db5 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -122,7 +122,7 @@ using namespace ::com::sun::star;
// Static member
SfxApplication* SfxApplication::pApp = NULL;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
static BasicDLL* pBasic = NULL;
#endif
@@ -209,7 +209,7 @@ SfxApplication::SfxApplication()
pSfxHelp = new SfxHelp;
#endif
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
pBasic = new BasicDLL;
StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) );
#endif
@@ -232,7 +232,7 @@ SfxApplication::~SfxApplication()
// delete global options
SvtViewOptions::ReleaseOptions();
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
delete pBasic;
#endif
if ( !pAppData_Impl->bDowning )
@@ -461,7 +461,7 @@ void SfxApplication::Invalidate( sal_uInt16 nId )
Invalidate_Impl( pFrame->GetBindings(), nId );
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
#ifndef DISABLE_DYNLOADING
@@ -481,7 +481,7 @@ extern "C" void *basicide_macro_organizer(sal_Int16);
IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) pStarBasic;
return 0;
#else
@@ -514,7 +514,7 @@ bool SfxApplication::IsXScriptURL( const OUString& rScriptURL )
{
bool result = false;
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) rScriptURL;
#else
::com::sun::star::uno::Reference
@@ -550,7 +550,7 @@ SfxApplication::ChooseScript()
{
OUString aScriptURL;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -580,7 +580,7 @@ SfxApplication::ChooseScript()
void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) nTabId;
#else
@@ -610,7 +610,7 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
ErrCode SfxApplication::CallBasic( const OUString& rCode, BasicManager* pMgr, SbxArray* pArgs, SbxValue* pRet )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) rCode;
(void) pMgr;
(void) pArgs;
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 28f99280c3cc..85cbc66469d7 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -17,12 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+#include <config_options.h>
+
#include <sal/config.h>
#include <cassert>
-#include <config_options.h>
-
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/uno/Reference.h>
@@ -95,7 +96,7 @@ sal_uInt16 SfxApplication::SaveBasicAndDialogContainer() const
BasicManager* SfxApplication::GetBasicManager()
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
return 0;
#else
return BasicManagerRepository::getApplicationBasicManager( true );
@@ -106,7 +107,7 @@ BasicManager* SfxApplication::GetBasicManager()
XLibraryContainer * SfxApplication::GetDialogContainer()
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
return NULL;
#else
if ( !pAppData_Impl->pBasicManager->isValid() )
@@ -119,7 +120,7 @@ XLibraryContainer * SfxApplication::GetDialogContainer()
XLibraryContainer * SfxApplication::GetBasicContainer()
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
return NULL;
#else
if ( !pAppData_Impl->pBasicManager->isValid() )
@@ -132,7 +133,7 @@ XLibraryContainer * SfxApplication::GetBasicContainer()
StarBASIC* SfxApplication::GetBasic()
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
return 0;
#else
return GetBasicManager()->GetLib(0);
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index a6dcf9abd0f7..980f2db2bdc8 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include "appbaslib.hxx"
@@ -46,7 +47,7 @@ void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager )
{
impl_releaseContainers();
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) _pBasicManager;
#else
// Note: we do not delete the old BasicManager. BasicManager instances are
@@ -73,7 +74,7 @@ void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager )
void SfxBasicManagerHolder::storeAllLibraries()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
OSL_PRECOND( isValid(), "SfxBasicManagerHolder::storeAllLibraries: not initialized!" );
try
{
@@ -91,7 +92,7 @@ void SfxBasicManagerHolder::storeAllLibraries()
void SfxBasicManagerHolder::setStorage( const Reference< XStorage >& _rxStorage )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) _rxStorage;
#else
try
@@ -110,7 +111,7 @@ void SfxBasicManagerHolder::setStorage( const Reference< XStorage >& _rxStorage
void SfxBasicManagerHolder::storeLibrariesToStorage( const Reference< XStorage >& _rxStorage )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) _rxStorage;
#else
OSL_PRECOND( isValid(), "SfxBasicManagerHolder::storeLibrariesToStorage: not initialized!" );
@@ -143,7 +144,7 @@ void SfxBasicManagerHolder::impl_releaseContainers()
bool SfxBasicManagerHolder::LegacyPsswdBinaryLimitExceeded( Sequence< OUString >& sModules )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) sModules;
#else
if ( mpBasicManager )
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index a062e746a020..c07c94ccaf5c 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -84,13 +84,13 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* )
, pFactArr(0)
, pTopFrames( new SfxFrameArr_Impl )
, pMatcher( 0 )
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
, pBasicResMgr( 0 )
#endif
, pSvtResMgr( 0 )
, m_pToolsErrorHdl(0)
, m_pSoErrorHdl(0)
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
, m_pSbxErrorHdl(0)
#endif
, pAppDispatch(NULL)
@@ -127,7 +127,7 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* )
, bODFVersionWarningLater( false )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
BasicManagerRepository::registerCreationListener( *pBasMgrListener );
#endif
}
@@ -138,7 +138,7 @@ SfxAppData_Impl::~SfxAppData_Impl()
delete pTopFrames;
delete pBasicManager;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
BasicManagerRepository::revokeCreationListener( *pBasMgrListener );
delete pBasMgrListener;
#endif
@@ -155,7 +155,7 @@ SfxDocumentTemplates* SfxAppData_Impl::GetDocumentTemplates()
void SfxAppData_Impl::OnApplicationBasicManagerCreated( BasicManager& _rBasicManager )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) _rBasicManager;
#else
pBasicManager->reset( &_rBasicManager );
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index f0dc0e735f03..9b740da95135 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -349,7 +349,7 @@ long SfxApplication::DdeExecute( const OUString& rCmd ) // Expressed in our B
*/
long SfxObjectShell::DdeExecute( const OUString& rCmd ) // Expressed in our BASIC-Syntax
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) rCmd;
#else
StarBASIC* pBasic = GetBasic();
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index dfbed1e1760b..2fa68ad8cd9a 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <sfx2/app.hxx>
#include <com/sun/star/frame/XTerminateListener.hpp>
@@ -224,14 +225,14 @@ bool SfxApplication::Initialize_Impl()
pAppData_Impl->m_pToolsErrorHdl = new SfxErrorHandler(
RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1);
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
pAppData_Impl->pBasicResMgr = ResMgr::CreateResMgr("sb");
#endif
pAppData_Impl->pSvtResMgr = ResMgr::CreateResMgr("svt");
pAppData_Impl->m_pSoErrorHdl = new SfxErrorHandler(
RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END, pAppData_Impl->pSvtResMgr );
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
pAppData_Impl->m_pSbxErrorHdl = new SfxErrorHandler(
RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END, pAppData_Impl->pBasicResMgr );
#endif
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index e37e98d29959..18b04e5543e5 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <basic/basmgr.hxx>
#include <basic/sbstar.hxx>
@@ -61,7 +63,7 @@ void SfxApplication::Deinitialize()
if ( pAppData_Impl->bDowning )
return;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
StarBASIC::Stop();
SaveBasicAndDialogContainer();
@@ -91,7 +93,7 @@ void SfxApplication::Deinitialize()
// Release Controller and others
// then the remaining components should alse disapear ( Beamer! )
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
BasicManagerRepository::resetApplicationBasicManager();
pAppData_Impl->pBasicManager->reset( NULL );
// this will also delete pBasMgr
@@ -125,12 +127,12 @@ void SfxApplication::Deinitialize()
pAppData_Impl->pPool = NULL;
NoChaos::ReleaseItemPool();
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
DELETEZ(pAppData_Impl->pBasicResMgr);
#endif
DELETEZ(pAppData_Impl->pSvtResMgr);
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
delete pAppData_Impl->m_pSbxErrorHdl;
#endif
delete pAppData_Impl->m_pSoErrorHdl;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 7d0f4c65eb52..e2477009b557 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <com/sun/star/document/XEmbeddedScripts.hpp>
#include <com/sun/star/drawing/ModuleDispatcher.hpp>
#include <com/sun/star/embed/XStorage.hpp>
@@ -551,7 +553,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
case SID_BASICSTOP:
StarBASIC::Stop();
break;
@@ -725,7 +727,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
case SID_BASICSTOP:
if ( !StarBASIC::IsRunning() )
rSet.DisableItem(nWhich);
@@ -826,7 +828,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
}
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
#ifndef DISABLE_DYNLOADING
@@ -882,7 +884,7 @@ ResMgr* SfxApplication::GetOffResManager_Impl()
namespace
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
vcl::Window* lcl_getDialogParent( const Reference< XFrame >& _rxFrame, vcl::Window* _pFallback )
{
if ( !_rxFrame.is() )
@@ -957,7 +959,7 @@ namespace
}
return NULL;
}
-#endif // !DISABLE_SCRIPTING
+#endif // HAVE_FEATURE_SCRIPTING
}
void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
@@ -1036,7 +1038,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
}
break;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
case SID_BASICIDE_APPEAR:
{
SfxViewFrame* pView = lcl_getBasicIDEViewFrame( NULL );
@@ -1220,7 +1222,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
rReq.Done();
}
break;
-#endif // !DISABLE_SCRIPTING
+#endif // HAVE_FEATURE_SCRIPTING
case SID_OFFICE_CHECK_PLZ:
{
@@ -1231,7 +1233,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
{
bRet = true /*!!!SfxIniManager::CheckPLZ( aPLZ )*/;
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else
SbxBase::SetError( SbxERR_WRONG_ARGS );
#endif
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 0505c3885b09..55f610812a18 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <macroloader.hxx>
#include <com/sun/star/document/UpdateDocMode.hpp>
@@ -190,7 +192,7 @@ void SAL_CALL SfxMacroLoader::removeStatusListener(
ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::Any& rRetval, SfxObjectShell* pSh )
throw ( ucb::ContentCreationException, uno::RuntimeException )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) rURL;
(void) rRetval;
(void) pSh;
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 4d4ae52b4339..a032d8051685 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <sfx2/docmacromode.hxx>
#include <sfx2/signaturestate.hxx>
@@ -365,7 +366,7 @@ namespace sfx2
bool DocumentMacroMode::hasMacroLibrary() const
{
bool bHasMacroLib = false;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
try
{
Reference< XEmbeddedScripts > xScripts( m_pData->m_rDocumentAccess.getEmbeddedDocumentScripts() );
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index e1d3068ffe33..7ce7e253f539 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <sot/storage.hxx>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
@@ -805,7 +807,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
if ( !pNameItem )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
SbxBase::SetError( SbxERR_WRONG_ARGS );
#endif
rReq.Ignore();
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 8828551136ae..48bfcc9bf6eb 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1037,7 +1037,7 @@ bool SfxObjectShell::DoSave()
}
else
bOk = true;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if ( HasBasic() )
{
try
@@ -3095,7 +3095,7 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
bChart = true;
SetupStorage( xStorage, nVersion, bTemplate, bChart );
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if ( HasBasic() )
{
// Initialize Basic
@@ -3624,7 +3624,7 @@ void SfxObjectShell::SetConfigOptionsChecked( bool bChecked )
bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) xHandler;
#else
if ( !HasBasic() )
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index dcb115d84624..67cd9642b351 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -113,7 +113,7 @@ namespace {
class theCurrentComponent : public rtl::Static< WeakReference< XInterface >, theCurrentComponent > {};
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
// remember all registered components for VBA compatibility, to be able to remove them on disposing the model
typedef ::std::map< XInterface*, OString > VBAConstantNameMap;
@@ -179,7 +179,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
SfxObjectShell::SetCurrentComponent( Reference< XInterface >() );
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
/* Remove VBA component from AppBasic. As every application registers its
own current component, the disposed component may not be the "current
component" of the SfxObjectShell. */
@@ -677,7 +677,7 @@ bool SfxObjectShell::PrepareClose
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
namespace
{
static BasicManager* lcl_getBasicManagerForDocument( const SfxObjectShell& _rDocument )
@@ -716,7 +716,7 @@ namespace
BasicManager* SfxObjectShell::GetBasicManager() const
{
BasicManager* pBasMgr = NULL;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
try
{
pBasMgr = lcl_getBasicManagerForDocument( *this );
@@ -738,7 +738,7 @@ void SfxObjectShell::SetHasNoBasic()
bool SfxObjectShell::HasBasic() const
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
return false;
#else
if ( pImp->m_bNoBasicCapabilities )
@@ -752,7 +752,7 @@ bool SfxObjectShell::HasBasic() const
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
namespace
{
const Reference< XLibraryContainer >&
@@ -785,7 +785,7 @@ namespace
Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
try
{
if ( !pImp->m_bNoBasicCapabilities )
@@ -807,7 +807,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
try
{
if ( !pImp->m_bNoBasicCapabilities )
@@ -828,7 +828,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
StarBASIC* SfxObjectShell::GetBasic() const
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
return NULL;
#else
BasicManager * pMan = GetBasicManager();
@@ -873,7 +873,7 @@ void SfxObjectShell::InitBasicManager_Impl()
does not take ownership but stores only the raw pointer. Owner of all
Basic managers is the global BasicManagerRepository instance.
*/
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
DBG_ASSERT( !pImp->bBasicInitialized && !pImp->aBasicManager.isValid(), "Lokaler BasicManager bereits vorhanden");
try
{
@@ -969,7 +969,7 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp
// In other words, it's still possible that we here do something which is not necessary,
// but we should have filtered quite some unnecessary calls already.
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
BasicManager* pAppMgr = SfxGetpApp()->GetBasicManager();
rTheCurrentComponent = _rxComponent;
if ( pAppMgr )
@@ -1063,7 +1063,7 @@ OUString SfxObjectShell::GetServiceNameFromFactory( const OUString& rFact )
{
aServiceName = "com.sun.star.formula.FormulaProperties";
}
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
else if ( aFact == "sbasic" )
{
aServiceName = "com.sun.star.script.BasicIDE";
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 13a36c8d7e07..4e34a5080bbd 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -611,7 +611,7 @@ Reference< script::XStarBasicAccess > implGetStarBasicAccess( SfxObjectShell* pO
{
Reference< script::XStarBasicAccess > xRet;
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) pObjectShell;
#else
if( pObjectShell )
@@ -625,7 +625,7 @@ Reference< script::XStarBasicAccess > implGetStarBasicAccess( SfxObjectShell* pO
Reference< container::XNameContainer > SAL_CALL SfxBaseModel::getLibraryContainer() throw( RuntimeException, std::exception )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
Reference< container::XNameContainer > dummy;
return dummy;
@@ -650,7 +650,7 @@ void SAL_CALL SfxBaseModel::createLibrary( const OUString& LibName, const OUStri
const OUString& ExternalSourceURL, const OUString& LinkTargetURL )
throw(container::ElementExistException, RuntimeException, std::exception)
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) LibName;
(void) Password;
(void) ExternalSourceURL;
@@ -674,7 +674,7 @@ void SAL_CALL SfxBaseModel::addModule( const OUString& LibraryName, const OUStri
const OUString& Language, const OUString& Source )
throw( container::NoSuchElementException, RuntimeException, std::exception)
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) LibraryName;
(void) ModuleName;
(void) Language;
@@ -698,7 +698,7 @@ void SAL_CALL SfxBaseModel::addDialog( const OUString& LibraryName, const OUStri
const Sequence< sal_Int8 >& Data )
throw(container::NoSuchElementException, RuntimeException, std::exception)
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) LibraryName;
(void) DialogName;
(void) Data;
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index ead6ea5444fb..c3000407371c 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -19,6 +19,8 @@
#ifndef INCLUDED_SFX2_SOURCE_INC_APPDATA_HXX
#define INCLUDED_SFX2_SOURCE_INC_APPDATA_HXX
+#include <config_features.h>
+
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <svl/lstner.hxx>
@@ -83,13 +85,13 @@ public:
// application members
SfxFilterMatcher* pMatcher;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
ResMgr* pBasicResMgr;
#endif
ResMgr* pSvtResMgr;
SfxErrorHandler *m_pToolsErrorHdl;
SfxErrorHandler *m_pSoErrorHdl;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
SfxErrorHandler *m_pSbxErrorHdl;
#endif
SfxStatusDispatcher* pAppDispatch;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index b0c06b9aabd7..82e0e94bd36a 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2594,7 +2594,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra
*/
void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) sMacro;
#else
if ( sMacro.isEmpty() )
diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk
index 859ea8a0da73..8f8320a2336e 100644
--- a/solenv/gbuild/extensions/pre_MergedLibsList.mk
+++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk
@@ -92,7 +92,7 @@ gb_EXTRAMERGEDLIBS := \
$(call gb_Helper_optional,DESKTOP,unopkgapp) \
unotest \
$(call gb_Helper_optional,DESKTOP,updatefeed) \
- $(if $(DISABLE_SCRIPTING),,vbahelper) \
+ $(call gb_Helper_optional,SCRIPTING,vbahelper) \
xmlfa \
xmlfd \
xmlsecurity \
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 52539aeefc28..294c7d18df4b 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -258,7 +258,6 @@ gb_GLOBALDEFS += \
$(call gb_Helper_define_if_set,\
DISABLE_DYNLOADING \
DISABLE_EXPORT \
- DISABLE_SCRIPTING \
ENABLE_LTO \
)
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 0be2f6ae61e4..a36cb1e3526a 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "fmscriptingenv.hxx"
#include "svx/fmmodel.hxx"
@@ -898,7 +900,7 @@ namespace svxform
void FormScriptingEnvironment::doFireScriptEvent( const ScriptEvent& _rEvent, Any* _pSyncronousResult )
{
-#ifdef DISABLE_SCRIPTING
+#if !HAVE_FEATURE_SCRIPTING
(void) _rEvent;
(void) _pSyncronousResult;
(void) m_rFormModel;
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 825a193b7459..acf947acc6ed 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -71,7 +71,7 @@ $(eval $(call gb_Library_use_libraries,sw,\
tl \
ucbhelper \
utl \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
vbahelper) \
vcl \
xmlreader \
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index ba58d73bba52..d2059683dab7 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -38,7 +38,7 @@ $(eval $(call gb_Module_add_l10n_targets,sw,\
UIConfig_qa \
))
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_targets,sw,\
Library_vbaswobj \
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 3b9dc9f57d7b..6959e49d7f89 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <doc.hxx>
#include <DocumentFieldsManager.hxx>
#include <DocumentSettingManager.hxx>
@@ -1706,7 +1708,7 @@ void SwDoc::ChkCondColls()
uno::Reference< script::vba::XVBAEventProcessor >
SwDoc::GetVbaEventProcessor()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if( !mxVbaEvents.is() && mpDocShell && ooo::vba::isAlienWordDoc( *mpDocShell ) )
{
try
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 09d054089d03..91630f0f96e5 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <swtypes.hxx>
#include <cmdid.h>
#include <hintids.hxx>
@@ -89,7 +91,7 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
class SwVbaCodeNameProvider : public ::cppu::WeakImplHelper1< document::XCodeNameQuery >
{
@@ -562,7 +564,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
}
break;
case SW_SERVICE_VBAOBJECTPROVIDER :
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
{
SwVbaObjectForCodeNameProvider* pObjProv =
new SwVbaObjectForCodeNameProvider(rDoc.GetDocShell());
@@ -571,7 +573,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
#endif
break;
case SW_SERVICE_VBACODENAMEPROVIDER :
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
{
if (rDoc.GetDocShell() && ooo::vba::isAlienWordDoc(*rDoc.GetDocShell()))
{
@@ -582,7 +584,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
#endif
break;
case SW_SERVICE_VBAPROJECTNAMEPROVIDER :
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
{
uno::Reference< container::XNameContainer > xProjProv = rDoc.GetVBATemplateToProjectCache();
if (!xProjProv.is() && rDoc.GetDocShell()
@@ -596,7 +598,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
#endif
break;
case SW_SERVICE_VBAGLOBALS :
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
{
uno::Any aGlobs;
BasicManager *pBasicMan = rDoc.GetDocShell()->GetBasicManager();
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 22cb2c845ad1..f05ae7a7c925 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <hintids.hxx>
#include <comphelper/string.hxx>
#include <rtl/strbuf.hxx>
@@ -254,7 +256,7 @@ void SwHTMLParser::InsertBasicDocEvent( const OUString& aEvent, const OUString&
void SwHTMLWriter::OutBasic()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if( !bCfgStarBasic )
return;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c162f75cfed1..fafab4302037 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <sal/config.h>
#include <boost/noncopyable.hpp>
@@ -5175,7 +5177,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
aArgs[ 0 ] <<= mpDocShell->GetModel();
aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( "ooo.vba.word.Globals", aArgs );
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
BasicManager *pBasicMan = mpDocShell->GetBasicManager();
if (pBasicMan)
pBasicMan->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index deeb9d74aa06..b7be7533163d 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <hintids.hxx>
#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx>
@@ -582,7 +584,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if( pFlt->GetUserData() == "HTML" )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if( !rHtmlOpt.IsStarBasic() && rHtmlOpt.IsStarBasicWarning() && HasBasic() )
{
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 8117908fa512..a554ebd78ccf 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <com/sun/star/drawing/ModuleDispatcher.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
@@ -1288,7 +1290,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
// there are some from Meta-Tags dublicated or triplicated afterwards.
ClearHeaderAttributesForSourceViewHack();
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
// The Document-Basic also bites the dust ...
// A EnterBasicCall is not needed here, because nothing is called and
// there can't be any Dok-Basic, that has not yet been loaded inside
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 51d226e6d134..46ec8f3cf8ab 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <hintids.hxx>
#include <svl/whiter.hxx>
#include <svtools/imapobj.hxx>
@@ -1032,7 +1034,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
}
//Set distance only if the request is received from the controller.
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if(!StarBASIC::IsRunning())
#endif
{
diff --git a/vbahelper/Module_vbahelper.mk b/vbahelper/Module_vbahelper.mk
index ee82314911bb..09a66e4d0b62 100644
--- a/vbahelper/Module_vbahelper.mk
+++ b/vbahelper/Module_vbahelper.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Module_Module,vbahelper))
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
# the targets to be inserted are their file names without .mk extension
$(eval $(call gb_Module_add_targets,vbahelper,\