Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTING

Feature test macros that govern conditional compilation should be
defined in config_*.h include files, not on the compilation command
line.

Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
This commit is contained in:
Tor Lillqvist 2014-10-21 23:21:37 +03:00
parent d0be09322d
commit 9ecac3874d
93 changed files with 303 additions and 209 deletions

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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

View file

@ -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;

View file

@ -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()))

View file

@ -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

View file

@ -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");

View file

@ -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() );

View file

@ -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

View file

@ -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
}

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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@

View file

@ -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
*

View file

@ -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

View file

@ -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 \

View file

@ -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
}

View file

@ -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

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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,\

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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 \

View file

@ -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,

View file

@ -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;

View file

@ -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 )
{

View file

@ -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();

View file

@ -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

View file

@ -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())
{

View file

@ -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

View file

@ -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

View file

@ -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
}

View file

@ -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

View file

@ -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),\

View file

@ -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() );

View file

@ -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 ();

View file

@ -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 ();

View file

@ -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 ();

View file

@ -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;

View file

@ -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 ();

View file

@ -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;

View file

@ -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);

View file

@ -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 )

View file

@ -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 );

View file

@ -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();

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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() );

View file

@ -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();

View file

@ -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() )

View file

@ -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";

View file

@ -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;

View file

@ -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;

View file

@ -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() )

View file

@ -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 \

View file

@ -258,7 +258,6 @@ gb_GLOBALDEFS += \
$(call gb_Helper_define_if_set,\
DISABLE_DYNLOADING \
DISABLE_EXPORT \
DISABLE_SCRIPTING \
ENABLE_LTO \
)

View file

@ -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;

View file

@ -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 \

View file

@ -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 \

View file

@ -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

View file

@ -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();

View file

@ -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;

View file

@ -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 );

View file

@ -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() )
{

View file

@ -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

View file

@ -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
{

View file

@ -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,\