summaryrefslogtreecommitdiff
path: root/sc/source/core/data/conditio.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-21 12:23:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-21 14:26:32 +0100
commit91e181ea585855bea97a07823f7334d0b98b20d5 (patch)
tree2578b79ddca097390802b5d2f5d5676d6a7821ff /sc/source/core/data/conditio.cxx
parent958f7b512cff932f7f2d52d128c297d0f0ab6354 (diff)
remove uses of COMPARE_*
Change-Id: Icdc36b4b24d2f399f481065df3200feb98025135
Diffstat (limited to 'sc/source/core/data/conditio.cxx')
-rw-r--r--sc/source/core/data/conditio.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 3ab133c3ddb7..117f2a096372 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1148,8 +1148,7 @@ bool ScConditionEntry::IsValidStr( const OUString& rArg, const ScAddress& rPos )
OUString aUpVal2( aStrVal2 );
if ( eOp == SC_COND_BETWEEN || eOp == SC_COND_NOTBETWEEN )
- if ( ScGlobal::GetCollator()->compareString( aUpVal1, aUpVal2 )
- == COMPARE_GREATER )
+ if (ScGlobal::GetCollator()->compareString( aUpVal1, aUpVal2 ) > 0)
{
// richtige Reihenfolge fuer Wertebereich
OUString aTemp( aUpVal1 ); aUpVal1 = aUpVal2; aUpVal2 = aTemp;
@@ -1159,11 +1158,11 @@ bool ScConditionEntry::IsValidStr( const OUString& rArg, const ScAddress& rPos )
{
case SC_COND_EQUAL:
bValid = (ScGlobal::GetCollator()->compareString(
- rArg, aUpVal1 ) == COMPARE_EQUAL);
+ rArg, aUpVal1 ) == 0);
break;
case SC_COND_NOTEQUAL:
bValid = (ScGlobal::GetCollator()->compareString(
- rArg, aUpVal1 ) != COMPARE_EQUAL);
+ rArg, aUpVal1 ) != 0);
break;
case SC_COND_TOP_PERCENT:
case SC_COND_BOTTOM_PERCENT:
@@ -1197,23 +1196,23 @@ bool ScConditionEntry::IsValidStr( const OUString& rArg, const ScAddress& rPos )
switch ( eOp )
{
case SC_COND_GREATER:
- bValid = ( nCompare == COMPARE_GREATER );
+ bValid = ( nCompare > 0 );
break;
case SC_COND_EQGREATER:
- bValid = ( nCompare == COMPARE_EQUAL || nCompare == COMPARE_GREATER );
+ bValid = ( nCompare >= 0 );
break;
case SC_COND_LESS:
- bValid = ( nCompare == COMPARE_LESS );
+ bValid = ( nCompare < 0 );
break;
case SC_COND_EQLESS:
- bValid = ( nCompare == COMPARE_EQUAL || nCompare == COMPARE_LESS );
+ bValid = ( nCompare <= 0 );
break;
case SC_COND_BETWEEN:
case SC_COND_NOTBETWEEN:
// Test auf NOTBETWEEN:
- bValid = ( nCompare == COMPARE_LESS ||
+ bValid = ( nCompare < 0 ||
ScGlobal::GetCollator()->compareString( rArg,
- aUpVal2 ) == COMPARE_GREATER );
+ aUpVal2 ) > 0 );
if ( eOp == SC_COND_BETWEEN )
bValid = !bValid;
break;