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,\
basic/source/runtime/props \
basic/source/runtime/stdobj \
basic/source/runtime/stdobj1 \
basic/source/runtime/runtime \
basic/source/classes/errobject \
))
endif
$(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/classes/errobject \
basic/source/runtime/basrdll \
basic/source/runtime/methods \
basic/source/runtime/methods1 \
basic/source/runtime/runtime \
basic/source/classes/sbintern \
basic/source/sbx/sbxarray \
basic/source/sbx/sbxbool \
......
......@@ -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()
......
......@@ -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;
......@@ -158,6 +160,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 );
......@@ -273,6 +278,7 @@ start:
case SbxSTRING:
case SbxLPSTR:
{
#if HAVE_FEATURE_SCRIPTING
if( !p->pOUString )
{
p->pOUString = new OUString;
......@@ -334,6 +340,7 @@ start:
LANGUAGE_ENGLISH_US,
eLangType );
pFormatter->GetOutputString( n, nIndex, *p->pOUString, &pColor );
#endif
break;
}
case SbxOBJECT:
......
......@@ -629,6 +629,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;
......@@ -640,9 +641,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"
......@@ -651,6 +654,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
{
......@@ -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.
// 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();
......@@ -784,6 +789,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
return;
}
}
#endif
SbxDataType eType = GetType();
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