convert SbxDecimal::CmpResult to scoped enum
Change-Id: Id2d887c3ce4316a223497ef6790ca326983c4817
This commit is contained in:
parent
4ea27cf64f
commit
dc21a49ea3
@ -324,7 +324,7 @@ SbxDecimal::CmpResult compare( const SbxDecimal &rLeft, const SbxDecimal &rRight
|
||||
{
|
||||
(void)rLeft;
|
||||
(void)rRight;
|
||||
return (SbxDecimal::CmpResult)0;
|
||||
return SbxDecimal::CmpResult::LT;
|
||||
}
|
||||
|
||||
void SbxDecimal::setChar( sal_Unicode val ) { (void)val; }
|
||||
|
@ -95,7 +95,8 @@ public:
|
||||
|
||||
bool isZero();
|
||||
|
||||
enum CmpResult { LT, EQ, GT };
|
||||
// must match the return values of the Microsoft VarDecCmp Automation function
|
||||
enum class CmpResult { LT, EQ, GT };
|
||||
friend CmpResult compare( const SbxDecimal &rLeft, const SbxDecimal &rRight );
|
||||
};
|
||||
|
||||
|
@ -1293,17 +1293,17 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
|
||||
switch( eOp )
|
||||
{
|
||||
case SbxEQ:
|
||||
bRes = ( eRes == SbxDecimal::EQ ); break;
|
||||
bRes = ( eRes == SbxDecimal::CmpResult::EQ ); break;
|
||||
case SbxNE:
|
||||
bRes = ( eRes != SbxDecimal::EQ ); break;
|
||||
bRes = ( eRes != SbxDecimal::CmpResult::EQ ); break;
|
||||
case SbxLT:
|
||||
bRes = ( eRes == SbxDecimal::LT ); break;
|
||||
bRes = ( eRes == SbxDecimal::CmpResult::LT ); break;
|
||||
case SbxGT:
|
||||
bRes = ( eRes == SbxDecimal::GT ); break;
|
||||
bRes = ( eRes == SbxDecimal::CmpResult::GT ); break;
|
||||
case SbxLE:
|
||||
bRes = ( eRes != SbxDecimal::GT ); break;
|
||||
bRes = ( eRes != SbxDecimal::CmpResult::GT ); break;
|
||||
case SbxGE:
|
||||
bRes = ( eRes != SbxDecimal::LT ); break;
|
||||
bRes = ( eRes != SbxDecimal::CmpResult::LT ); break;
|
||||
default:
|
||||
SetError( ERRCODE_SBX_NOTIMP );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user