diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-19 19:21:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-20 12:03:50 +0100 |
commit | 35373db02976efff7f640b477d07825e96c6b5a4 (patch) | |
tree | f0e46664d32ab9b2ba09c8b46a14b2fd6fde67dd /tools | |
parent | fix save several file on by reseting the xstorable on close (diff) | |
download | core-35373db02976efff7f640b477d07825e96c6b5a4.tar.gz core-35373db02976efff7f640b477d07825e96c6b5a4.zip |
Related: fdo#38838 remove String::Assign(const sal_Unicode*)
Change-Id: I0dfa34732acfd20e71fa3876466552338332610b
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/string/tustring.cxx | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index 59b80d7016cb..6fd2689fdd3d 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -221,36 +221,6 @@ STRING& STRING::Assign( STRCODE c ) return *this; } -STRING& STRING::Assign( const STRCODE* pCharStr ) -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - DBG_ASSERT( pCharStr, "String::Assign() - pCharStr is NULL" ); - - xub_StrLen nLen = ImplStringLen( pCharStr ); - - if ( !nLen ) - { - STRING_NEW((STRING_TYPE **)&mpData); - } - else - { - // copy without allocation if string length is identical - if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) ) - memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); - else - { - // free old string - STRING_RELEASE((STRING_TYPE *)mpData); - - // allocate string of new size and copy - mpData = ImplAllocData( nLen ); - memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); - } - } - - return *this; -} - xub_StrLen ImplStringLen( const sal_Char* pStr ) { const sal_Char* pTempStr = pStr; |