summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-14 09:54:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-14 11:54:59 +0100
commit7e7a487e904143cbc282a2b90c4cb3918bfa151f (patch)
treea3091c70d009ea75dd54c35540759aaec748fa91 /tools
parentbe1ce88b8e5e06947e93146a052b0ba2c64dc479 (diff)
Related: fdo#38838 remove UniString::AppendAscii
Change-Id: I0f929843d73eb445c8b1aa56d59cbbce844b9008
Diffstat (limited to 'tools')
-rw-r--r--tools/source/string/strascii.cxx86
1 files changed, 0 insertions, 86 deletions
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx
index 83cf85a42c08..85cca277286f 100644
--- a/tools/source/string/strascii.cxx
+++ b/tools/source/string/strascii.cxx
@@ -32,21 +32,6 @@ static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen
}
#endif
-static void ImplCopyAsciiStr( sal_Unicode* pDest, const sal_Char* pSrc,
- sal_Int32 nLen )
-{
- DBG_ASSERT( ImplDbgCheckAsciiStr( pSrc, nLen ),
- "UniString::CopyAsciiStr() - pAsciiStr include characters > 127" );
-
- while ( nLen )
- {
- *pDest = (unsigned char)*pSrc;
- ++pDest,
- ++pSrc,
- --nLen;
- }
-}
-
static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2,
xub_StrLen nCount )
{
@@ -63,77 +48,6 @@ static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Cha
return nRet;
}
-UniString& UniString::AppendAscii( const sal_Char* pAsciiStr )
-{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
- DBG_ASSERT( pAsciiStr, "UniString::AppendAscii() - pAsciiStr is NULL" );
-
- // determine string length
- sal_Int32 nCopyLen = ImplStringLen( pAsciiStr );
-
- // detect overflow
- nCopyLen = ImplGetCopyLen( mpData->mnLen, nCopyLen );
-
- // If appended string is not empty
- if ( nCopyLen )
- {
- // Allocate new string
- UniStringData* pNewData = ImplAllocData( mpData->mnLen+nCopyLen );
-
- // copy string data
- memcpy( pNewData->maStr, mpData->maStr, mpData->mnLen*sizeof( sal_Unicode ) );
- ImplCopyAsciiStr( pNewData->maStr+mpData->mnLen, pAsciiStr, nCopyLen );
-
- // release old string
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = pNewData;
- }
-
- return *this;
-}
-
-UniString& UniString::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
-{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
- DBG_ASSERT( pAsciiStr, "UniString::AppendAscii() - pAsciiStr is NULL" );
-
- if ( nLen == STRING_LEN )
- nLen = ImplStringLen( pAsciiStr );
-
-#ifdef DBG_UTIL
- if ( DbgIsAssert() )
- {
- for ( xub_StrLen i = 0; i < nLen; ++i )
- {
- if ( !pAsciiStr[i] )
- {
- OSL_FAIL( "UniString::AppendAscii() : nLen is wrong" );
- }
- }
- }
-#endif
-
- // detect overflow
- sal_Int32 nCopyLen = ImplGetCopyLen( mpData->mnLen, nLen );
-
- // If appended string is not empty
- if ( nCopyLen )
- {
- // Allocate new string
- UniStringData* pNewData = ImplAllocData( mpData->mnLen+nCopyLen );
-
- // copy string data
- memcpy( pNewData->maStr, mpData->maStr, mpData->mnLen*sizeof( sal_Unicode ) );
- ImplCopyAsciiStr( pNewData->maStr+mpData->mnLen, pAsciiStr, nCopyLen );
-
- // release old string
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = pNewData;
- }
-
- return *this;
-}
-
StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen ) const
{