summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-01 13:39:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-01 14:19:25 +0100
commitd05a9ae25e4a397834330d868b68d92ca919e33b (patch)
tree3a9702d4c56ef0bd995f97dc3cfb382953d1f6d3 /tools
parent2655ef2d03b786b683723e92f3c76838fa012ab6 (diff)
Related: fdo#38838 remove UniString::AssignAscii
Change-Id: I263ef2594080ff7d47d5499c2b62e60e1689d2d6
Diffstat (limited to 'tools')
-rw-r--r--tools/source/string/strascii.cxx75
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 );