include/tools/string.hxx | 4 ---- tools/source/string/strimp.cxx | 34 ---------------------------------- 2 files changed, 38 deletions(-)
New commits: commit cfda947d7c0476b9c402c84f9d8515c76ec87bac Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 21 14:32:36 2013 +0100 Related: fdo#38838 remove UniString::Copy Change-Id: I566e3ade54962bbc6ace9b757f79c1b8ed9ffd00 diff --git a/include/tools/string.hxx b/include/tools/string.hxx index 9560220..3933595 100644 --- a/include/tools/string.hxx +++ b/include/tools/string.hxx @@ -103,7 +103,6 @@ public: UniString(); UniString( const ResId& rResId ); UniString( const UniString& rStr ); - UniString( const UniString& rStr, xub_StrLen nPos, xub_StrLen nLen ); UniString( const OUString& rStr ); ~UniString(); @@ -133,9 +132,6 @@ public: xub_StrLen Len() const { return (xub_StrLen)mpData->mnLen; } - UniString Copy( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ) const - { return UniString( *this, nIndex, nCount ); } - const sal_Unicode* GetBuffer() const { return mpData->maStr; } friend sal_Bool operator == ( const UniString& rStr1, const UniString& rStr2 ); diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx index a3e44fa..de479e4 100644 --- a/tools/source/string/strimp.cxx +++ b/tools/source/string/strimp.cxx @@ -94,40 +94,6 @@ STRING::STRING( const STRING& rStr ) mpData = rStr.mpData; } -STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen ) -: mpData( NULL ) -{ - if ( nPos > rStr.mpData->mnLen ) - nLen = 0; - else - { - // correct length if necessary - sal_Int32 nMaxLen = rStr.mpData->mnLen-nPos; - if ( nLen > nMaxLen ) - nLen = static_cast< xub_StrLen >(nMaxLen); - } - - if ( nLen ) - { - // Increase reference counter if it suffices - if ( (nPos == 0) && (nLen == rStr.mpData->mnLen) ) - { - STRING_ACQUIRE((STRING_TYPE *)rStr.mpData); - mpData = rStr.mpData; - } - else - { - // otherwise, copy string - mpData = ImplAllocData( nLen ); - memcpy( mpData->maStr, rStr.mpData->maStr+nPos, nLen*sizeof( STRCODE ) ); - } - } - else - { - STRING_NEW((STRING_TYPE **)&mpData); - } -} - STRING::~STRING() { // free string data
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits