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 @@
#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;
......@@ -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:
......
......@@ -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 )
......
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