Kaydet (Commit) ee4b074c authored tarafından jan Iversen's avatar jan Iversen

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
üst 3dc21da3
...@@ -97,15 +97,15 @@ $(eval $(call gb_Library_add_exception_objects,sb,\ ...@@ -97,15 +97,15 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/runtime/props \ basic/source/runtime/props \
basic/source/runtime/stdobj \ basic/source/runtime/stdobj \
basic/source/runtime/stdobj1 \ basic/source/runtime/stdobj1 \
basic/source/runtime/runtime \
basic/source/classes/errobject \
)) ))
endif endif
$(eval $(call gb_Library_add_exception_objects,sb,\ $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/classes/errobject \
basic/source/runtime/basrdll \ basic/source/runtime/basrdll \
basic/source/runtime/methods \ basic/source/runtime/methods \
basic/source/runtime/methods1 \ basic/source/runtime/methods1 \
basic/source/runtime/runtime \
basic/source/classes/sbintern \ basic/source/classes/sbintern \
basic/source/sbx/sbxarray \ basic/source/sbx/sbxarray \
basic/source/sbx/sbxbool \ basic/source/sbx/sbxbool \
......
...@@ -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;
...@@ -158,6 +160,9 @@ double ImpGetDate( const SbxValues* p ) ...@@ -158,6 +160,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 );
...@@ -273,6 +278,7 @@ start: ...@@ -273,6 +278,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;
...@@ -334,6 +340,7 @@ start: ...@@ -334,6 +340,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:
......
...@@ -629,6 +629,7 @@ const VbaFormatInfo pFormatInfoTable[] = ...@@ -629,6 +629,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;
...@@ -640,9 +641,11 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) ...@@ -640,9 +641,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"
...@@ -651,6 +654,7 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) ...@@ -651,6 +654,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
{ {
...@@ -660,6 +664,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const ...@@ -660,6 +664,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();
...@@ -784,6 +789,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const ...@@ -784,6 +789,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