diff options
author | jan Iversen <jani@libreoffice.org> | 2018-01-08 11:52:17 +0100 |
---|---|---|
committer | jan Iversen <jani@libreoffice.org> | 2018-01-08 13:18:36 +0100 |
commit | ee4b074ce26029092d0e5f27c22a358abe101312 (patch) | |
tree | ca40adc5ac677e61488bb4ed98103fc2be1f4bb6 | |
parent | 3dc21da3b01811e9e26890e3a30ea73589f36ea1 (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
-rw-r--r-- | basic/Library_sb.mk | 4 | ||||
-rw-r--r-- | basic/source/runtime/basrdll.cxx | 3 | ||||
-rw-r--r-- | basic/source/sbx/sbxdate.cxx | 7 | ||||
-rw-r--r-- | basic/source/sbx/sbxscan.cxx | 6 |
4 files changed, 18 insertions, 2 deletions
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk index 88cae207b166..c1b47e27daa6 100644 --- a/basic/Library_sb.mk +++ b/basic/Library_sb.mk @@ -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 \ 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 5342d557e1f0..a7f8c0ebc147 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; @@ -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: diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 370e73c8ae58..2e9a723542d6 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -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 ) |