View | Details | Raw Unified | Return to issue 71827
Collapse All | Expand All

(-)basic.orig/source/sbx/sbxvalue.cxx (-4 / +13 lines)
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
	{
(-)/data4/sles/ooo-build-NEWEST-Latest/ooo-build/build/ooe680-m2/basic/source/sbx/sbxvalue.cxx (-3 / +9 lines)
Lines 1149-1155 BOOL SbxValue::Compute( SbxOperator eOp, Link Here
1149
	{
1149
	{
1150
		SbxValues aL, aR;
1150
		SbxValues aL, aR;
1151
		bool bDecimal = false;
1151
		bool bDecimal = false;
1152
		if( eThisType == SbxSTRING || eOp == SbxCAT )
1152
		if( eThisType == SbxSTRING || eOp == SbxCAT || ( bVBAInterop && ( eOpType == SbxSTRING ) && (  eOp == SbxPLUS ) ) )
1153
		{
1153
		{
1154
			if( eOp == SbxCAT || eOp == SbxPLUS )
1154
			if( eOp == SbxCAT || eOp == SbxPLUS )
1155
			{
1155
			{
Lines 1207-1213 BOOL SbxValue::Compute( SbxOperator eOp, Link Here
1207
			if( rOp.Get( aR ) )
1207
			if( rOp.Get( aR ) )
1208
			{
1208
			{
1209
				if( rOp.GetType() == SbxEMPTY )
1209
				if( rOp.GetType() == SbxEMPTY )
1210
					goto Lbl_OpIsEmpty;
1210
				{
1211
					if ( !bVBAInterop || ( bVBAInterop && ( eOp != SbxNOT  ) ) )
1212
						goto Lbl_OpIsEmpty;
1213
				}
1211
				if( Get( aL ) ) switch( eOp )
1214
				if( Get( aL ) ) switch( eOp )
1212
				{
1215
				{
1213
					case SbxIDIV:
1216
					case SbxIDIV:
Lines 1396-1402 BOOL SbxValue::Compute( SbxOperator eOp, Link Here
1396
			if( rOp.Get( aR ) )
1399
			if( rOp.Get( aR ) )
1397
			{
1400
			{
1398
				if( rOp.GetType() == SbxEMPTY )
1401
				if( rOp.GetType() == SbxEMPTY )
1399
					goto Lbl_OpIsEmpty;
1402
				{
1403
					if ( !bVBAInterop || ( bVBAInterop && ( eOp != SbxNEG ) ) )
1404
						goto Lbl_OpIsEmpty;
1405
				}
1400
				if( Get( aL ) )
1406
				if( Get( aL ) )
1401
				{
1407
				{
1402
					switch( eOp )
1408
					switch( eOp )

Return to issue 71827