Kaydet (Commit) 453395ee authored tarafından jan Iversen's avatar jan Iversen Kaydeden (comit) Michael Meeks

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: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 891e3623
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <unotools/resmgr.hxx> #include <unotools/resmgr.hxx>
#include <strings.hrc> #include <strings.hrc>
#include <sbxbase.hxx> #include <sbxbase.hxx>
#include <config_features.h>
struct BasicDLL::Impl struct BasicDLL::Impl
{ {
...@@ -85,6 +86,7 @@ void BasicDLL::BasicBreak() ...@@ -85,6 +86,7 @@ void BasicDLL::BasicBreak()
{ {
BasicDLL* pThis = BASIC_DLL; BasicDLL* pThis = BASIC_DLL;
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" ); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
#if HAVE_FEATURE_SCRIPTING
if ( pThis ) if ( pThis )
{ {
// bJustStopping: if there's someone pressing STOP like crazy umpteen times, // bJustStopping: if there's someone pressing STOP like crazy umpteen times,
...@@ -99,6 +101,7 @@ void BasicDLL::BasicBreak() ...@@ -99,6 +101,7 @@ void BasicDLL::BasicBreak()
bJustStopping = false; bJustStopping = false;
} }
} }
#endif
} }
SbxAppData& GetSbxData_Impl() SbxAppData& GetSbxData_Impl()
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <math.h> #include <math.h>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <memory> #include <memory>
#include <config_features.h>
double ImpGetDate( const SbxValues* p ) double ImpGetDate( const SbxValues* p )
...@@ -96,6 +97,7 @@ double ImpGetDate( const SbxValues* p ) ...@@ -96,6 +97,7 @@ double ImpGetDate( const SbxValues* p )
case SbxBYREF | SbxSTRING: case SbxBYREF | SbxSTRING:
case SbxSTRING: case SbxSTRING:
case SbxLPSTR: case SbxLPSTR:
#if HAVE_FEATURE_SCRIPTING
if( !p->pOUString ) if( !p->pOUString )
{ {
nRes = 0; nRes = 0;
...@@ -157,6 +159,9 @@ double ImpGetDate( const SbxValues* p ) ...@@ -157,6 +159,9 @@ double ImpGetDate( const SbxValues* p )
SbxBase::SetError( ERRCODE_BASIC_CONVERSION ); nRes = 0; SbxBase::SetError( ERRCODE_BASIC_CONVERSION ); nRes = 0;
} }
} }
#else
nRes = 0;
#endif
break; break;
case SbxOBJECT: case SbxOBJECT:
pVal = dynamic_cast<SbxValue*>( p->pObj ); pVal = dynamic_cast<SbxValue*>( p->pObj );
...@@ -272,6 +277,7 @@ start: ...@@ -272,6 +277,7 @@ start:
case SbxSTRING: case SbxSTRING:
case SbxLPSTR: case SbxLPSTR:
{ {
#if HAVE_FEATURE_SCRIPTING
if( !p->pOUString ) if( !p->pOUString )
{ {
p->pOUString = new OUString; p->pOUString = new OUString;
...@@ -333,6 +339,7 @@ start: ...@@ -333,6 +339,7 @@ start:
LANGUAGE_ENGLISH_US, LANGUAGE_ENGLISH_US,
eLangType ); eLangType );
pFormatter->GetOutputString( n, nIndex, *p->pOUString, &pColor ); pFormatter->GetOutputString( n, nIndex, *p->pOUString, &pColor );
#endif
break; break;
} }
case SbxOBJECT: case SbxOBJECT:
......
...@@ -631,6 +631,7 @@ const VbaFormatInfo pFormatInfoTable[] = ...@@ -631,6 +631,7 @@ const VbaFormatInfo pFormatInfoTable[] =
{ VbaFormatType::Null, OUStringLiteral(""), NF_INDEX_TABLE_ENTRIES, nullptr } { VbaFormatType::Null, OUStringLiteral(""), NF_INDEX_TABLE_ENTRIES, nullptr }
}; };
#if HAVE_FEATURE_SCRIPTING
const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) const VbaFormatInfo* getFormatInfo( const OUString& rFmt )
{ {
const VbaFormatInfo* pInfo = pFormatInfoTable; const VbaFormatInfo* pInfo = pFormatInfoTable;
...@@ -642,9 +643,11 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) ...@@ -642,9 +643,11 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt )
} }
return pInfo; return pInfo;
} }
#endif
} // namespace } // namespace
#if HAVE_FEATURE_SCRIPTING
#define VBAFORMAT_GENERALDATE "General Date" #define VBAFORMAT_GENERALDATE "General Date"
#define VBAFORMAT_C "c" #define VBAFORMAT_C "c"
#define VBAFORMAT_N "n" #define VBAFORMAT_N "n"
...@@ -653,6 +656,7 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) ...@@ -653,6 +656,7 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt )
#define VBAFORMAT_Y "y" #define VBAFORMAT_Y "y"
#define VBAFORMAT_LOWERCASE "<" #define VBAFORMAT_LOWERCASE "<"
#define VBAFORMAT_UPPERCASE ">" #define VBAFORMAT_UPPERCASE ">"
#endif
void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
{ {
...@@ -662,6 +666,7 @@ 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. // pflin, It is better to use SvNumberFormatter to handle the date/time/number format.
// the SvNumberFormatter output is mostly compatible with // the SvNumberFormatter output is mostly compatible with
// VBA output besides the OOo-basic output // VBA output besides the OOo-basic output
#if HAVE_FEATURE_SCRIPTING
if( pFmt && !SbxBasicFormater::isBasicFormat( *pFmt ) ) if( pFmt && !SbxBasicFormater::isBasicFormat( *pFmt ) )
{ {
OUString aStr = GetOUString(); OUString aStr = GetOUString();
...@@ -786,6 +791,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const ...@@ -786,6 +791,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
return; return;
} }
} }
#endif
SbxDataType eType = GetType(); SbxDataType eType = GetType();
switch( eType ) switch( eType )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment