diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-21 15:27:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-22 12:21:35 +0100 |
commit | 28c9207da43551059e283008225abfdfb4a988be (patch) | |
tree | 111ae9308cd0903e8c930cca45857ad119a493e2 /tools | |
parent | 3656a57e885065db046d774e27d0834884744a3c (diff) |
Related: fdo#38838 remove UniString::InsertAscii
Change-Id: I949b62842d77fe83caed2cc79784fe1e3f3ae400
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/string/strascii.cxx | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx index 7cae272cf7a6..83094ffac273 100644 --- a/tools/source/string/strascii.cxx +++ b/tools/source/string/strascii.cxx @@ -294,41 +294,6 @@ UniString& UniString::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ) return *this; } -UniString& UniString::InsertAscii( const char* pAsciiStr, xub_StrLen nIndex ) -{ - DBG_CHKTHIS( UniString, DbgCheckUniString ); - DBG_ASSERT( pAsciiStr, "UniString::InsertAscii() - 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 ) - return *this; - - // Adjust index if exceeds length - if ( nIndex > mpData->mnLen ) - nIndex = static_cast< xub_StrLen >(mpData->mnLen); - - // Allocate new string - UniStringData* pNewData = ImplAllocData( mpData->mnLen+nCopyLen ); - - // copy string data - memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( sal_Unicode ) ); - ImplCopyAsciiStr( pNewData->maStr+nIndex, pAsciiStr, nCopyLen ); - memcpy( pNewData->maStr+nIndex+nCopyLen, mpData->maStr+nIndex, - (mpData->mnLen-nIndex)*sizeof( sal_Unicode ) ); - - // release old string - STRING_RELEASE((STRING_TYPE *)mpData); - mpData = pNewData; - - return *this; -} - StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ) const { |