diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-12 21:21:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-13 10:25:32 +0100 |
commit | bc19d8491f320b4f5e728a2a8f0d0a7cbe65a849 (patch) | |
tree | 94e62ac2dd0e0324d7e576ab4a31a6649331e087 /tools | |
parent | 832fa247b71184f23eb6f3f88d7347af135c225a (diff) |
callcatcher: ByteString::CompareIgnoreCaseToAscii unused, shrink api
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/string.hxx | 2 | ||||
-rw-r--r-- | tools/source/string/strimp.cxx | 30 | ||||
-rw-r--r-- | tools/source/string/tustring.cxx | 30 |
3 files changed, 30 insertions, 32 deletions
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 46760c07f003..9435d4fb9bd9 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -286,8 +286,6 @@ public: xub_StrLen nLen = STRING_LEN ) const; StringCompare CompareTo( const sal_Char* pCharStr, xub_StrLen nLen = STRING_LEN ) const; - StringCompare CompareIgnoreCaseToAscii( const ByteString& rStr, - xub_StrLen nLen = STRING_LEN ) const; StringCompare CompareIgnoreCaseToAscii( const sal_Char* pCharStr, xub_StrLen nLen = STRING_LEN ) const; sal_Bool Equals( const ByteString& rStr ) const; diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx index 452905c415e1..2f79410a9c19 100644 --- a/tools/source/string/strimp.cxx +++ b/tools/source/string/strimp.cxx @@ -1209,36 +1209,6 @@ StringCompare STRING::CompareTo( const STRCODE* pCharStr, xub_StrLen nLen ) cons // ----------------------------------------------------------------------- -StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr, - xub_StrLen nLen ) const -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING ); - - // Auf Gleichheit der Pointer testen - if ( mpData == rStr.mpData ) - return COMPARE_EQUAL; - - // Maximale Laenge ermitteln - if ( mpData->mnLen < nLen ) - nLen = static_cast< xub_StrLen >(mpData->mnLen+1); - if ( rStr.mpData->mnLen < nLen ) - nLen = static_cast< xub_StrLen >(rStr.mpData->mnLen+1); - - // String vergleichen - sal_Int32 nCompare = ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, nLen ); - - // Rueckgabewert anpassen - if ( nCompare == 0 ) - return COMPARE_EQUAL; - else if ( nCompare < 0 ) - return COMPARE_LESS; - else - return COMPARE_GREATER; -} - -// ----------------------------------------------------------------------- - StringCompare STRING::CompareIgnoreCaseToAscii( const STRCODE* pCharStr, xub_StrLen nLen ) const { diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index fe0feb51b85b..9ef026f6cce8 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -471,4 +471,34 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr, xub_StrLen nInd return (ImplStringICompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0); } +// ----------------------------------------------------------------------- + +StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr, + xub_StrLen nLen ) const +{ + DBG_CHKTHIS( STRING, DBGCHECKSTRING ); + DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING ); + + // Auf Gleichheit der Pointer testen + if ( mpData == rStr.mpData ) + return COMPARE_EQUAL; + + // Maximale Laenge ermitteln + if ( mpData->mnLen < nLen ) + nLen = static_cast< xub_StrLen >(mpData->mnLen+1); + if ( rStr.mpData->mnLen < nLen ) + nLen = static_cast< xub_StrLen >(rStr.mpData->mnLen+1); + + // String vergleichen + sal_Int32 nCompare = ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, nLen ); + + // Rueckgabewert anpassen + if ( nCompare == 0 ) + return COMPARE_EQUAL; + else if ( nCompare < 0 ) + return COMPARE_LESS; + else + return COMPARE_GREATER; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |