summaryrefslogtreecommitdiff
path: root/tools/source/string/strimp.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-23 15:57:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-23 15:58:52 +0000
commit67f67509ff20c0d5b6e9f3557fb1e427655601ee (patch)
treecfc6a68c839e0725e2717e8a7821a24df8f2bc1c /tools/source/string/strimp.cxx
parentd1421ed9862eaf8e509364ce0a0a1f3af052f7c9 (diff)
lock in ByteString gains
Diffstat (limited to 'tools/source/string/strimp.cxx')
-rw-r--r--tools/source/string/strimp.cxx86
1 files changed, 0 insertions, 86 deletions
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 1eef75d8b86d..dd00878a071d 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -60,34 +60,6 @@ static sal_Int32 ImplStringCompareWithoutZero( const STRCODE* pStr1, const STRCO
return nRet;
}
-// -----------------------------------------------------------------------
-
-static sal_Int32 ImplStringICompare( const STRCODE* pStr1, const STRCODE* pStr2 )
-{
- sal_Int32 nRet;
- STRCODE c1;
- STRCODE c2;
- do
- {
- // Ist das Zeichen zwischen 'A' und 'Z' dann umwandeln
- c1 = *pStr1;
- c2 = *pStr2;
- if ( (c1 >= 65) && (c1 <= 90) )
- c1 += 32;
- if ( (c2 >= 65) && (c2 <= 90) )
- c2 += 32;
- nRet = ((sal_Int32)((STRCODEU)c1))-((sal_Int32)((STRCODEU)c2));
- if ( nRet != 0 )
- break;
-
- ++pStr1,
- ++pStr2;
- }
- while ( c2 );
-
- return nRet;
-}
-
// =======================================================================
#ifdef DBG_UTIL
@@ -280,39 +252,6 @@ STRING& STRING::Assign( const STRING& rStr )
// -----------------------------------------------------------------------
-STRING& STRING::Assign( const STRCODE* pCharStr )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_ASSERT( pCharStr, "String::Assign() - pCharStr is NULL" );
-
- // Stringlaenge ermitteln
- xub_StrLen nLen = ImplStringLen( pCharStr );
-
- if ( !nLen )
- {
- STRING_NEW((STRING_TYPE **)&mpData);
- }
- else
- {
- // Wenn String genauso lang ist, wie der String, dann direkt kopieren
- if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) )
- memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) );
- else
- {
- // Alte Daten loeschen
- STRING_RELEASE((STRING_TYPE *)mpData);
-
- // Daten initialisieren und String kopieren
- mpData = ImplAllocData( nLen );
- memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) );
- }
- }
-
- return *this;
-}
-
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( const STRING& rStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -554,15 +493,6 @@ STRING& STRING::ToLowerAscii()
// -----------------------------------------------------------------------
-sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- return (ImplStringICompare( mpData->maStr, pCharStr ) == 0);
-}
-
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Search( STRCODE c, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -674,22 +604,6 @@ xub_StrLen STRING::Search( const STRCODE* pCharStr, xub_StrLen nIndex ) const
// -----------------------------------------------------------------------
-xub_StrLen STRING::SearchAndReplace( const STRING& rStr, const STRING& rRepStr,
- xub_StrLen nIndex )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rRepStr, STRING, DBGCHECKSTRING );
-
- xub_StrLen nSPos = Search( rStr, nIndex );
- if ( nSPos != STRING_NOTFOUND )
- Replace( nSPos, rStr.Len(), rRepStr );
-
- return nSPos;
-}
-
-// -----------------------------------------------------------------------
-
void STRING::SearchAndReplaceAll( STRCODE c, STRCODE cRep )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );