diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-10-21 23:21:37 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-10-22 09:30:23 +0300 |
commit | 9ecac3874d179b1d7aa6b45337001b1def06a9dd (patch) | |
tree | 120fc40fda1055a0f504e60c553b5734030d2741 /basic/source/runtime/methods.cxx | |
parent | d0be09322d127e7d517851db38c764d57fbab2dc (diff) |
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
Diffstat (limited to 'basic/source/runtime/methods.cxx')
-rw-r--r-- | basic/source/runtime/methods.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
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 |