Lines 64-70
Link Here
|
64 |
#include "sbx.hxx" |
64 |
#include "sbx.hxx" |
65 |
#include "sbxconv.hxx" |
65 |
#include "sbxconv.hxx" |
66 |
#include <math.h> |
66 |
#include <math.h> |
67 |
|
67 |
#include "runtime.hxx" |
68 |
// AB 29.10.99 Unicode |
68 |
// AB 29.10.99 Unicode |
69 |
#ifndef _USE_NO_NAMESPACE |
69 |
#ifndef _USE_NO_NAMESPACE |
70 |
using namespace rtl; |
70 |
using namespace rtl; |
Lines 1125-1130
BOOL SbxValue::Convert( SbxDataType eTo
Link Here
|
1125 |
|
1125 |
|
1126 |
BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) |
1126 |
BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) |
1127 |
{ |
1127 |
{ |
|
|
1128 |
bool bVBAInterop = SbiRuntime::isVBAEnabled(); |
1129 |
|
1128 |
SbxDataType eThisType = GetType(); |
1130 |
SbxDataType eThisType = GetType(); |
1129 |
SbxDataType eOpType = rOp.GetType(); |
1131 |
SbxDataType eOpType = rOp.GetType(); |
1130 |
SbxError eOld = GetError(); |
1132 |
SbxError eOld = GetError(); |
Lines 1138-1144
BOOL SbxValue::Compute( SbxOperator eOp,
Link Here
|
1138 |
else if( eThisType == SbxNULL || eOpType == SbxNULL ) |
1140 |
else if( eThisType == SbxNULL || eOpType == SbxNULL ) |
1139 |
SetType( SbxNULL ); |
1141 |
SetType( SbxNULL ); |
1140 |
// Sonderregel 2: Ist ein Operand Empty, ist das Ergebnis der 2. Operand |
1142 |
// Sonderregel 2: Ist ein Operand Empty, ist das Ergebnis der 2. Operand |
1141 |
else if( eThisType == SbxEMPTY ) |
1143 |
else if( eThisType == SbxEMPTY |
|
|
1144 |
&& !bVBAInterop |
1145 |
) |
1142 |
*this = rOp; |
1146 |
*this = rOp; |
1143 |
// 13.2.96: Nicht schon vor Get auf SbxEMPTY pruefen |
1147 |
// 13.2.96: Nicht schon vor Get auf SbxEMPTY pruefen |
1144 |
else |
1148 |
else |
Lines 1442-1447
Lbl_OpIsEmpty:
Link Here
|
1442 |
|
1446 |
|
1443 |
BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const |
1447 |
BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const |
1444 |
{ |
1448 |
{ |
|
|
1449 |
bool bVBAInterop = SbiRuntime::isVBAEnabled(); |
1450 |
|
1445 |
BOOL bRes = FALSE; |
1451 |
BOOL bRes = FALSE; |
1446 |
SbxError eOld = GetError(); |
1452 |
SbxError eOld = GetError(); |
1447 |
if( eOld != SbxERR_OK ) |
1453 |
if( eOld != SbxERR_OK ) |
Lines 1458-1467
BOOL SbxValue::Compare( SbxOperator eOp,
Link Here
|
1458 |
// Sonderregel 2: Wenn beide Variant sind und einer ist numerisch, |
1464 |
// Sonderregel 2: Wenn beide Variant sind und einer ist numerisch, |
1459 |
// und der andere ein String, ist num < str |
1465 |
// und der andere ein String, ist num < str |
1460 |
else if( !IsFixed() && !rOp.IsFixed() |
1466 |
else if( !IsFixed() && !rOp.IsFixed() |
1461 |
&& ( rOp.GetType() == SbxSTRING && GetType() != SbxSTRING && IsNumeric() ) ) |
1467 |
&& ( rOp.GetType() == SbxSTRING && GetType() != SbxSTRING && IsNumeric() ) && !bVBAInterop |
|
|
1468 |
) |
1462 |
bRes = BOOL( eOp == SbxLT || eOp == SbxLE || eOp == SbxNE ); |
1469 |
bRes = BOOL( eOp == SbxLT || eOp == SbxLE || eOp == SbxNE ); |
1463 |
else if( !IsFixed() && !rOp.IsFixed() |
1470 |
else if( !IsFixed() && !rOp.IsFixed() |
1464 |
&& ( GetType() == SbxSTRING && rOp.GetType() != SbxSTRING && rOp.IsNumeric() ) ) |
1471 |
&& ( GetType() == SbxSTRING && rOp.GetType() != SbxSTRING && rOp.IsNumeric() ) |
|
|
1472 |
&& !bVBAInterop |
1473 |
) |
1465 |
bRes = BOOL( eOp == SbxGT || eOp == SbxGE || eOp == SbxNE ); |
1474 |
bRes = BOOL( eOp == SbxGT || eOp == SbxGE || eOp == SbxNE ); |
1466 |
else |
1475 |
else |
1467 |
{ |
1476 |
{ |