diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-14 14:04:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-14 14:04:23 +0100 |
commit | 5167539b10478cdb14d6690147d440d99ea05e83 (patch) | |
tree | fa6c45d50f46309579e1495d5efdb53f960d717b /tools/source | |
parent | callcatcher: update unused code list (diff) | |
download | core-5167539b10478cdb14d6690147d440d99ea05e83.tar.gz core-5167539b10478cdb14d6690147d440d99ea05e83.zip |
Related: fdo#38838 one UniString::Search variant now unused
Change-Id: Id0b7b9bf53985f0692cd446a528274fb2009d33e
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/string/strimp.cxx | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx index c6d882b65524..3357c22ed29d 100644 --- a/tools/source/string/strimp.cxx +++ b/tools/source/string/strimp.cxx @@ -428,48 +428,6 @@ xub_StrLen STRING::Search( const STRING& rStr, xub_StrLen nIndex ) const return STRING_NOTFOUND; } -xub_StrLen STRING::Search( const STRCODE* pCharStr, xub_StrLen nIndex ) const -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - - sal_Int32 nLen = mpData->mnLen; - xub_StrLen nStrLen = ImplStringLen( pCharStr ); - - // rStr was not found if its length is zero - // or index is larger than searched string - if ( !nStrLen || (nIndex >= nLen) ) - return STRING_NOTFOUND; - - const STRCODE* pStr = mpData->maStr; - pStr += nIndex; - - if ( nStrLen == 1 ) - { - STRCODE cSearch = *pCharStr; - while ( nIndex < nLen ) - { - if ( *pStr == cSearch ) - return nIndex; - ++pStr, - ++nIndex; - } - } - else - { - // search only within string - while ( nLen - nIndex >= nStrLen ) - { - // increase match if found - if ( ImplStringCompareWithoutZero( pStr, pCharStr, nStrLen ) == 0 ) - return nIndex; - ++pStr, - ++nIndex; - } - } - - return STRING_NOTFOUND; -} - void STRING::SearchAndReplaceAll( STRCODE c, STRCODE cRep ) { DBG_CHKTHIS( STRING, DBGCHECKSTRING ); |