From d486b2b324364dd99bea686b6969f7a796f5e329 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 21 Oct 2013 09:30:09 +0100 Subject: Related: fdo#38838 remove/privatize String::Append Change-Id: I5ae90b02e7ae5ddd19495fd0847b7e9dfc4419e8 --- tools/source/string/tustring.cxx | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'tools/source') diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index 42c69477c865..f4f3bd27086d 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -79,27 +79,6 @@ sal_Bool operator==(const UniString& rStr1, const UniString& rStr2) return (ImplStringCompareWithoutZero( rStr1.mpData->maStr, rStr2.mpData->maStr, rStr1.mpData->mnLen ) == 0); } -STRING& STRING::Append( STRCODE c ) -{ - // don't append null characters and keep string length < maxlen - sal_Int32 nLen = mpData->mnLen; - if ( c && (nLen < STRING_MAXLEN) ) - { - // allocate string of new size - STRINGDATA* pNewData = ImplAllocData( nLen+1 ); - - // copy string - memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); - pNewData->maStr[nLen] = c; - - // free old string - STRING_RELEASE((STRING_TYPE *)mpData); - mpData = pNewData; - } - - return *this; -} - xub_StrLen ImplStringLen( const sal_Char* pStr ) { const sal_Char* pTempStr = pStr; -- cgit