summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2018-01-08 11:52:17 +0100
committerMichael Meeks <michael.meeks@collabora.com>2018-10-30 17:00:41 +0000
commit453395ee4708afb5b7b41fe876aae1a10fdbb526 (patch)
treee711e7eb51db0b5cd107b222a77760a61489c1d8 /basic
parent891e3623d3c255c4cd4c9d7468517b25397834d3 (diff)
basic, solve link problems
When not using scripting, there were a number of unresolved symbols. First aproach did not work, so this commit is the more extensive. Change-Id: Iaf78bde10d9a43862d58d1aa8f46b14aa075eddb Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/basrdll.cxx3
-rw-r--r--basic/source/sbx/sbxdate.cxx7
-rw-r--r--basic/source/sbx/sbxscan.cxx6
3 files changed, 16 insertions, 0 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index d84e3953284e..e7a639a5a069 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -29,6 +29,7 @@
#include <unotools/resmgr.hxx>
#include <strings.hrc>
#include <sbxbase.hxx>
+#include <config_features.h>
struct BasicDLL::Impl
{
@@ -85,6 +86,7 @@ void BasicDLL::BasicBreak()
{
BasicDLL* pThis = BASIC_DLL;
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
+#if HAVE_FEATURE_SCRIPTING
if ( pThis )
{
// bJustStopping: if there's someone pressing STOP like crazy umpteen times,
@@ -99,6 +101,7 @@ void BasicDLL::BasicBreak()
bJustStopping = false;
}
}
+#endif
}
SbxAppData& GetSbxData_Impl()
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index e59c9214a90b..9fbfdc15ec87 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -31,6 +31,7 @@
#include <math.h>
#include <comphelper/processfactory.hxx>
#include <memory>
+#include <config_features.h>
double ImpGetDate( const SbxValues* p )
@@ -96,6 +97,7 @@ double ImpGetDate( const SbxValues* p )
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
+#if HAVE_FEATURE_SCRIPTING
if( !p->pOUString )
{
nRes = 0;
@@ -157,6 +159,9 @@ double ImpGetDate( const SbxValues* p )
SbxBase::SetError( ERRCODE_BASIC_CONVERSION ); nRes = 0;
}
}
+#else
+ nRes = 0;
+#endif
break;
case SbxOBJECT:
pVal = dynamic_cast<SbxValue*>( p->pObj );
@@ -272,6 +277,7 @@ start:
case SbxSTRING:
case SbxLPSTR:
{
+#if HAVE_FEATURE_SCRIPTING
if( !p->pOUString )
{
p->pOUString = new OUString;
@@ -333,6 +339,7 @@ start:
LANGUAGE_ENGLISH_US,
eLangType );
pFormatter->GetOutputString( n, nIndex, *p->pOUString, &pColor );
+#endif
break;
}
case SbxOBJECT:
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 59d6fd6bead4..845cf395ebb1 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -631,6 +631,7 @@ const VbaFormatInfo pFormatInfoTable[] =
{ VbaFormatType::Null, OUStringLiteral(""), NF_INDEX_TABLE_ENTRIES, nullptr }
};
+#if HAVE_FEATURE_SCRIPTING
const VbaFormatInfo* getFormatInfo( const OUString& rFmt )
{
const VbaFormatInfo* pInfo = pFormatInfoTable;
@@ -642,9 +643,11 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt )
}
return pInfo;
}
+#endif
} // namespace
+#if HAVE_FEATURE_SCRIPTING
#define VBAFORMAT_GENERALDATE "General Date"
#define VBAFORMAT_C "c"
#define VBAFORMAT_N "n"
@@ -653,6 +656,7 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt )
#define VBAFORMAT_Y "y"
#define VBAFORMAT_LOWERCASE "<"
#define VBAFORMAT_UPPERCASE ">"
+#endif
void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
{
@@ -662,6 +666,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
// pflin, It is better to use SvNumberFormatter to handle the date/time/number format.
// the SvNumberFormatter output is mostly compatible with
// VBA output besides the OOo-basic output
+#if HAVE_FEATURE_SCRIPTING
if( pFmt && !SbxBasicFormater::isBasicFormat( *pFmt ) )
{
OUString aStr = GetOUString();
@@ -786,6 +791,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
return;
}
}
+#endif
SbxDataType eType = GetType();
switch( eType )