summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxvalue.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/sbx/sbxvalue.cxx')
-rw-r--r--basic/source/sbx/sbxvalue.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index d8f047059ef0..047d6c07a8ab 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1146,8 +1146,8 @@ BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
{
SbxValues aL, aR;
bool bDecimal = false;
- if( bVBAInterop && ( ( eThisType == SbxSTRING && eOpType != SbxSTRING ) ||
- ( eThisType != SbxSTRING && eOpType == SbxSTRING ) ) &&
+ if( bVBAInterop && ( ( eThisType == SbxSTRING && eOpType != SbxSTRING && eOpType != SbxEMPTY ) ||
+ ( eThisType != SbxSTRING && eThisType != SbxEMPTY && eOpType == SbxSTRING ) ) &&
( eOp == SbxMUL || eOp == SbxDIV || eOp == SbxPLUS || eOp == SbxMINUS ) )
{
goto Lbl_OpIsDouble;
@@ -1194,6 +1194,8 @@ BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
aL.eType = aR.eType = GetType();
// else if( GetType() == SbxDouble || GetType() == SbxSingle )
// aL.eType = aR.eType = SbxLONG64;
+ else if ( bVBAInterop && eOpType == SbxBOOL )
+ aL.eType = aR.eType = SbxBOOL;
else
aL.eType = aR.eType = SbxLONG;
}
@@ -1280,7 +1282,12 @@ BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
break;
case SbxNOT:
if( aL.eType != SbxLONG && aL.eType != SbxULONG )
- aL.nLong64 = ~aL.nLong64;
+ {
+ if ( aL.eType != SbxBOOL )
+ aL.nLong64 = ~aL.nLong64;
+ else
+ aL.nLong = ~aL.nLong;
+ }
else
aL.nLong = ~aL.nLong;
break;