diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-21 12:23:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-21 14:26:32 +0100 |
commit | 91e181ea585855bea97a07823f7334d0b98b20d5 (patch) | |
tree | 2578b79ddca097390802b5d2f5d5676d6a7821ff /vcl | |
parent | 958f7b512cff932f7f2d52d128c297d0f0ab6354 (diff) |
remove uses of COMPARE_*
Change-Id: Icdc36b4b24d2f399f481065df3200feb98025135
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 96ad632d8064..a9de9725edfe 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -691,41 +691,40 @@ sal_Int32 PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) { // compare their width, weight, italic and style name if( GetWidthType() < rOther.GetWidthType() ) - return COMPARE_LESS; + return -1; else if( GetWidthType() > rOther.GetWidthType() ) - return COMPARE_GREATER; + return 1; if( GetWeight() < rOther.GetWeight() ) - return COMPARE_LESS; + return -1; else if( GetWeight() > rOther.GetWeight() ) - return COMPARE_GREATER; + return 1; if( GetSlant() < rOther.GetSlant() ) - return COMPARE_LESS; + return -1; else if( GetSlant() > rOther.GetSlant() ) - return COMPARE_GREATER; + return 1; - sal_Int32 eCompare = GetFamilyName().compareTo( rOther.GetFamilyName() ); - return eCompare; + return GetFamilyName().compareTo( rOther.GetFamilyName() ); } sal_Int32 PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const { - sal_Int32 eCompare = CompareIgnoreSize( rOther ); - if( eCompare != COMPARE_EQUAL ) - return eCompare; + sal_Int32 nCompare = CompareIgnoreSize( rOther ); + if (nCompare != 0) + return nCompare; if( mnHeight < rOther.mnHeight ) - return COMPARE_LESS; + return -1; else if( mnHeight > rOther.mnHeight ) - return COMPARE_GREATER; + return 1; if( mnWidth < rOther.mnWidth ) - return COMPARE_LESS; + return -1; else if( mnWidth > rOther.mnWidth ) - return COMPARE_GREATER; + return 1; - return COMPARE_EQUAL; + return 0; } struct FontMatchStatus @@ -1030,9 +1029,9 @@ bool ImplDevFontListData::AddFontFace( PhysicalFontFace* pNewData ) for(; (pData=*ppHere) != NULL; ppHere=&pData->mpNext ) { sal_Int32 eComp = pNewData->CompareWithSize( *pData ); - if( eComp == COMPARE_GREATER ) + if( eComp > 0 ) continue; - if( eComp == COMPARE_LESS ) + if( eComp < 0 ) break; // ignore duplicate if its quality is worse |