diff options
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/string/strascii.cxx | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx index bf0d5a288f14..53a2babc634f 100644 --- a/tools/source/string/strascii.cxx +++ b/tools/source/string/strascii.cxx @@ -91,81 +91,6 @@ static sal_Int32 ImplStringCompareWithoutZeroAscii( const sal_Unicode* pStr1, co return nRet; } -UniString& UniString::AssignAscii( const sal_Char* pAsciiStr ) -{ - DBG_CHKTHIS( UniString, DbgCheckUniString ); - DBG_ASSERT( pAsciiStr, "UniString::AssignAscii() - pAsciiStr is NULL" ); - - // Determine string length - xub_StrLen nLen = ImplStringLen( pAsciiStr ); - - if ( !nLen ) - { - STRING_NEW((STRING_TYPE **)&mpData); - } - else - { - // Replace string in-place if new size is equal - if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) ) - ImplCopyAsciiStr( mpData->maStr, pAsciiStr, nLen ); - else - { - // release old string - STRING_RELEASE((STRING_TYPE *)mpData); - - // copy new string - mpData = ImplAllocData( nLen ); - ImplCopyAsciiStr( mpData->maStr, pAsciiStr, nLen ); - } - } - - return *this; -} - -UniString& UniString::AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ) -{ - DBG_CHKTHIS( UniString, DbgCheckUniString ); - DBG_ASSERT( pAsciiStr, "UniString::AssignAscii() - 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::AssignAscii() : nLen is wrong" ); - } - } - } -#endif - - if ( !nLen ) - { - STRING_NEW((STRING_TYPE **)&mpData); - } - else - { - // Replace string in-place if new size is equal - if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) ) - ImplCopyAsciiStr( mpData->maStr, pAsciiStr, nLen ); - else - { - // release old string - STRING_RELEASE((STRING_TYPE *)mpData); - - // copy new string - mpData = ImplAllocData( nLen ); - ImplCopyAsciiStr( mpData->maStr, pAsciiStr, nLen ); - } - } - - return *this; -} - UniString& UniString::AppendAscii( const sal_Char* pAsciiStr ) { DBG_CHKTHIS( UniString, DbgCheckUniString ); |