summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-06 16:04:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-06 21:15:31 +0200
commitcc21480a25f1a289c7dd1bc536699fcae1457fc8 (patch)
tree1104825fee8a7c17495881a569ad5f8966f96a94 /basic
parent030cdbc7f8782eb196f09661bc2f116d790de9be (diff)
make --disable-scripting compile
Change-Id: Ie2be232e062389b74408dd9f001b1cf4db7db7d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120123 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/inc/sbintern.hxx5
-rw-r--r--basic/source/runtime/methods.cxx8
2 files changed, 8 insertions, 5 deletions
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index d4bed5bf845e..bf0439724c4f 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -23,6 +23,7 @@
#include <sbxfac.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <vcl/errcode.hxx>
+#include <config_features.h>
namespace utl
{
@@ -99,8 +100,6 @@ public:
virtual SbxObjectRef CreateObject( const OUString& ) override;
};
-
-
struct SbiGlobals
{
static SbiGlobals* pGlobals;
@@ -129,7 +128,9 @@ struct SbiGlobals
OUString aErrMsg; // buffer for GetErrorText()
std::unique_ptr<::utl::TransliterationWrapper> pTransliterationWrapper; // For StrComp
bool bBlockCompilerError;
+#if HAVE_FEATURE_SCRIPTING
std::unique_ptr<BasicManager> pAppBasMgr;
+#endif
StarBASIC* pMSOMacroRuntimLib; // Lib containing MSO Macro Runtime API entry symbols
SbiGlobals();
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 27da5fdac33d..77e1d26e4fe5 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4741,11 +4741,13 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
else
#endif
{
- if ( 0 <= nYear && nYear < 100 && (bUseTwoDigitYear
+ if ( 0 <= nYear && nYear < 100 &&
#if HAVE_FEATURE_SCRIPTING
- || SbiRuntime::isVBAEnabled()
+ (bUseTwoDigitYear || SbiRuntime::isVBAEnabled())
+#else
+ bUseTwoDigitYear
#endif
- ) )
+ )
{
nYear += 1900;
}