[Libreoffice-commits] core.git: 6 commits - include/tools tools/inc tools/source vcl/win
Caolán McNamara
caolanm at redhat.com
Mon Oct 21 01:17:53 PDT 2013
include/tools/string.hxx | 40 ++-----------------
tools/inc/impstrg.hxx | 4 -
tools/source/string/strimp.cxx | 77 -------------------------------------
tools/source/string/strucvt.cxx | 8 ---
tools/source/string/tustring.cxx | 56 --------------------------
vcl/win/source/window/salframe.cxx | 14 +++---
6 files changed, 13 insertions(+), 186 deletions(-)
New commits:
commit 48bb54aa7eafa85c5b0a2574fb3fa167614ddcbc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 20 20:12:08 2013 +0100
Related: fdo#38838 remove String::Insert
Change-Id: I37e35b5a16d37b1fccc6aa47f5027ff406c67d98
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index 87b268d..f32d668 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -136,8 +136,6 @@ private:
TOOLS_DLLPRIVATE UniString& Append( const sal_Unicode* pCharStr );
TOOLS_DLLPRIVATE UniString& Append( const sal_Unicode* pCharStr, xub_StrLen nLen );
TOOLS_DLLPRIVATE UniString& Expand( xub_StrLen nCount, sal_Unicode cExpandChar );
- TOOLS_DLLPRIVATE UniString& Insert( const UniString& rStr, xub_StrLen nPos, xub_StrLen nLen,
- xub_StrLen nIndex = STRING_LEN );
TOOLS_DLLPRIVATE UniString& operator +=( const sal_Unicode* pCharStr );
@@ -192,8 +190,6 @@ public:
xub_StrLen Len() const { return (xub_StrLen)mpData->mnLen; }
- UniString& Insert( const UniString& rStr, xub_StrLen nIndex = STRING_LEN );
- UniString& Insert( sal_Unicode c, xub_StrLen nIndex = STRING_LEN );
UniString Copy( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ) const
{ return UniString( *this, nIndex, nCount ); }
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index e62f5ed..a3e44fa 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -167,32 +167,4 @@ STRING& STRING::Append( const STRING& rStr )
return *this;
}
-STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
-{
- // detect overflow
- sal_Int32 nCopyLen = ImplGetCopyLen( mpData->mnLen, rStr.mpData->mnLen );
-
- if ( !nCopyLen )
- return *this;
-
- // adjust index if necessary
- if ( nIndex > mpData->mnLen )
- nIndex = static_cast< xub_StrLen >(mpData->mnLen);
-
- // allocate string of new size
- STRINGDATA* pNewData = ImplAllocData( mpData->mnLen+nCopyLen );
-
- // copy string
- memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) );
- memcpy( pNewData->maStr+nIndex, rStr.mpData->maStr, nCopyLen*sizeof( STRCODE ) );
- memcpy( pNewData->maStr+nIndex+nCopyLen, mpData->maStr+nIndex,
- (mpData->mnLen-nIndex)*sizeof( STRCODE ) );
-
- // free old string
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = pNewData;
-
- return *this;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index d386c6a..42c6947 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -47,32 +47,6 @@ DBG_NAME( UniString )
UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
-STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
-{
- // Don't insert 0 char or string size is maximum
- if ( !c || (mpData->mnLen == STRING_MAXLEN) )
- return *this;
-
- // Adjust string index
- if ( nIndex > mpData->mnLen )
- nIndex = static_cast< xub_StrLen >(mpData->mnLen);
-
- // allocate string of new size
- STRINGDATA* pNewData = ImplAllocData( mpData->mnLen+1 );
-
- // copy string
- memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) );
- pNewData->maStr[nIndex] = c;
- memcpy( pNewData->maStr+nIndex+1, mpData->maStr+nIndex,
- (mpData->mnLen-nIndex)*sizeof( STRCODE ) );
-
- // free old data
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = pNewData;
-
- return *this;
-}
-
StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const
{
if ( mpData == rStr.mpData )
commit 9e6917c21e8a2fa5c40adeddafdaf704a67aef4a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 20 20:09:26 2013 +0100
Related: fdo#38838 remove String::ToInt32
Change-Id: I6f90e9a06acaa5af88cd011015938dba2059ee0e
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index 5df5f23..87b268d 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -174,8 +174,6 @@ public:
{ return Append( UniString( concat ) ); }
#endif
- sal_Int32 ToInt32() const;
-
UniString& operator =( const OUString& rStr )
{ return Assign( rStr ); }
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 1476dff..d386c6a 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -47,11 +47,6 @@ DBG_NAME( UniString )
UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
-sal_Int32 UniString::ToInt32() const
-{
- return rtl_ustr_toInt32( mpData->maStr, 10 );
-}
-
STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
{
// Don't insert 0 char or string size is maximum
commit 3714051f1495791095cce885918d48dce7b339f7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 20 20:06:15 2013 +0100
Related: fdo#38838 remove String::[G|S]etChar
Change-Id: I64711aa3e6580eff7c64a92243e3161ef2d7cb9e
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index bb6ec81..5df5f23 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -181,7 +181,7 @@ public:
UniString& Append( const UniString& rStr );
UniString& Append( sal_Unicode c );
- inline UniString & Append(char c) // ...but allow "Append('a')"
+ UniString & Append(char c) // ...but allow "Append('a')"
{ return Append(static_cast< sal_Unicode >(c)); }
UniString& operator +=( const UniString& rStr )
{ return Append( rStr ); }
@@ -189,18 +189,15 @@ public:
{ return Append( UniString(rStr) ); }
UniString& operator +=( sal_Unicode c )
{ return Append( c ); }
- inline UniString & operator +=(char c) // ...but allow "+= 'a'"
+ UniString & operator +=(char c) // ...but allow "+= 'a'"
{ return operator +=(static_cast< sal_Unicode >(c)); }
- void SetChar( xub_StrLen nIndex, sal_Unicode c );
- sal_Unicode GetChar( xub_StrLen nIndex ) const
- { return mpData->maStr[nIndex]; }
-
xub_StrLen Len() const { return (xub_StrLen)mpData->mnLen; }
UniString& Insert( const UniString& rStr, xub_StrLen nIndex = STRING_LEN );
UniString& Insert( sal_Unicode c, xub_StrLen nIndex = STRING_LEN );
- UniString Copy( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ) const;
+ 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; }
@@ -217,11 +214,6 @@ public:
{ return !(operator < ( rStr1, rStr2 )); }
};
-inline UniString UniString::Copy( xub_StrLen nIndex, xub_StrLen nCount ) const
-{
- return UniString( *this, nIndex, nCount );
-}
-
template< typename charT, typename traits > std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, UniString const & string)
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 335c6ae..e62f5ed 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -167,15 +167,6 @@ STRING& STRING::Append( const STRING& rStr )
return *this;
}
-void STRING::SetChar( xub_StrLen nIndex, STRCODE c )
-{
- DBG_ASSERT( nIndex < mpData->mnLen, "String::SetChar() - nIndex > String.Len()" );
-
- // copy data if necessary
- ImplCopyData();
- mpData->maStr[nIndex] = c;
-}
-
STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
{
// detect overflow
commit 60ff30a2ab0cb219a1dc46e599ad01416bb8d7fa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 20 20:03:17 2013 +0100
drop DBGCHECKSTRING
Change-Id: I0c60becfd3a61cffb46c76e6f1488528c59b46e9
diff --git a/tools/inc/impstrg.hxx b/tools/inc/impstrg.hxx
index b7fc086..5c67488 100644
--- a/tools/inc/impstrg.hxx
+++ b/tools/inc/impstrg.hxx
@@ -21,10 +21,6 @@
#include <tools/tools.h>
-// Debug methode for Strings
-
-const char* DbgCheckUniString( const void* pString );
-
// Helper functions for Strings
xub_StrLen ImplStringLen( const sal_Char* pStr );
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 34f782e..335c6ae 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -32,18 +32,6 @@ static sal_Int32 ImplStringCompareWithoutZero( const STRCODE* pStr1, const STRCO
return nRet;
}
-#ifdef DBG_UTIL
-const char* DBGCHECKSTRING( const void* pString )
-{
- STRING* p = (STRING*)pString;
-
- if ( p->GetBuffer()[p->Len()] != 0 )
- return "String damaged: aStr[nLen] != 0";
-
- return NULL;
-}
-#endif
-
static STRINGDATA* ImplAllocData( sal_Int32 nLen )
{
STRINGDATA* pData = (STRINGDATA*)rtl_allocateMemory( sizeof(STRINGDATA)+(nLen*sizeof( STRCODE )) );
@@ -96,16 +84,11 @@ inline sal_Int32 ImplGetCopyLen( sal_Int32 nStrLen, sal_Int32 nCopyLen )
STRING::STRING()
: mpData(NULL)
{
- DBG_CTOR( STRING, DBGCHECKSTRING );
-
STRING_NEW((STRING_TYPE **)&mpData);
}
STRING::STRING( const STRING& rStr )
{
- DBG_CTOR( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
// Set pointer to argument string and increase reference counter
STRING_ACQUIRE((STRING_TYPE *)rStr.mpData);
mpData = rStr.mpData;
@@ -114,9 +97,6 @@ STRING::STRING( const STRING& rStr )
STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen )
: mpData( NULL )
{
- DBG_CTOR( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
if ( nPos > rStr.mpData->mnLen )
nLen = 0;
else
@@ -150,17 +130,12 @@ STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen )
STRING::~STRING()
{
- DBG_DTOR( STRING, DBGCHECKSTRING );
-
// free string data
STRING_RELEASE((STRING_TYPE *)mpData);
}
STRING& STRING::Append( const STRING& rStr )
{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
// Assignment is sufficient if string is empty
sal_Int32 nLen = mpData->mnLen;
if ( !nLen )
@@ -194,7 +169,6 @@ STRING& STRING::Append( const STRING& rStr )
void STRING::SetChar( xub_StrLen nIndex, STRCODE c )
{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_ASSERT( nIndex < mpData->mnLen, "String::SetChar() - nIndex > String.Len()" );
// copy data if necessary
@@ -204,9 +178,6 @@ void STRING::SetChar( xub_StrLen nIndex, STRCODE c )
STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
// detect overflow
sal_Int32 nCopyLen = ImplGetCopyLen( mpData->mnLen, rStr.mpData->mnLen );
diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx
index 29041dd..f85d7d6 100644
--- a/tools/source/string/strucvt.cxx
+++ b/tools/source/string/strucvt.cxx
@@ -20,7 +20,6 @@
UniString::UniString( const char* pByteStr,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
- DBG_CTOR( UniString, DbgCheckUniString );
DBG_ASSERT( pByteStr, "UniString::UniString() - pByteStr is NULL" );
mpData = NULL;
@@ -32,7 +31,6 @@ UniString::UniString( const char* pByteStr,
UniString::UniString( const char* pByteStr, xub_StrLen nLen,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
- DBG_CTOR( UniString, DbgCheckUniString );
DBG_ASSERT( pByteStr, "UniString::UniString() - pByteStr is NULL" );
if ( nLen == STRING_LEN )
@@ -47,8 +45,6 @@ UniString::UniString( const char* pByteStr, xub_StrLen nLen,
UniString::UniString( const OUString& rStr )
: mpData(NULL)
{
- DBG_CTOR( UniString, DbgCheckUniString );
-
OSL_ENSURE(rStr.pData->length < STRING_MAXLEN,
"Overflowing OUString -> UniString cut to zero length");
@@ -66,8 +62,6 @@ UniString::UniString( const OUString& rStr )
UniString& UniString::Assign( const OUString& rStr )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
-
OSL_ENSURE(rStr.pData->length < STRING_MAXLEN,
"Overflowing OUString -> UniString cut to zero length");
@@ -95,8 +89,6 @@ UniString::UniString( const ResId& rResId )
{
OUString sStr(rResId.toString());
- DBG_CTOR( UniString, DbgCheckUniString );
-
OSL_ENSURE(sStr.pData->length < STRING_MAXLEN,
"Overflowing OUString -> UniString cut to zero length");
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index e3dc5b6..1476dff 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -42,10 +42,6 @@ DBG_NAME( UniString )
#define STRING_RELEASE rtl_uString_release
#define STRING_NEW rtl_uString_new
-#if defined DBG_UTIL
-#define DBGCHECKSTRING DbgCheckUniString
-#endif
-
#include <strimp.cxx>
#include <strucvt.cxx>
@@ -53,15 +49,11 @@ UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
sal_Int32 UniString::ToInt32() const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
-
return rtl_ustr_toInt32( mpData->maStr, 10 );
}
STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
// Don't insert 0 char or string size is maximum
if ( !c || (mpData->mnLen == STRING_MAXLEN) )
return *this;
@@ -88,9 +80,6 @@ STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const
{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
if ( mpData == rStr.mpData )
return COMPARE_EQUAL;
@@ -123,8 +112,6 @@ sal_Bool operator==(const UniString& rStr1, const UniString& rStr2)
STRING& STRING::Append( STRCODE c )
{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
// don't append null characters and keep string length < maxlen
sal_Int32 nLen = mpData->mnLen;
if ( c && (nLen < STRING_MAXLEN) )
commit 5ce6e535bb9ea6a2e19731a6d7f58acd6a78b39b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 20 19:58:07 2013 +0100
String::GetBuffer()->OUString::getStr()
Change-Id: I427bb7b8e32d8a0040dbca1d0d0c765f526ba62f
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 963bce2..273d28e 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -4818,12 +4818,12 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
hfntOld = (HFONT) SelectObject(pDI->hDC, (HFONT) CreateFontIndirect( &ncm.lfMenuFont ));
SIZE strSize;
- String aStr( pSalMenuItem->mText );
- GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.GetBuffer(),
- aStr.Len(), &strSize );
+ OUString aStr( pSalMenuItem->mText );
+ GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.getStr(),
+ aStr.getLength(), &strSize );
if(!DrawStateW( pDI->hDC, (HBRUSH)NULL, (DRAWSTATEPROC)NULL,
- (LPARAM)(LPWSTR) aStr.GetBuffer(),
+ (LPARAM)(LPWSTR) aStr.getStr(),
(WPARAM)0, aRect.left, aRect.top + (lineHeight - strSize.cy)/2, 0, 0,
DST_PREFIXTEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) )
ImplWriteLastError(GetLastError(), "ImplDrawItem");
@@ -4832,15 +4832,15 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
{
SIZE strSizeA;
aStr = pSalMenuItem->mAccelText;
- GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.GetBuffer(),
- aStr.Len(), &strSizeA );
+ GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.getStr(),
+ aStr.getLength(), &strSizeA );
TEXTMETRIC tm;
GetTextMetrics( pDI->hDC, &tm );
// position the accelerator string to the right but leave space for the
// (potential) submenu arrow (tm.tmMaxCharWidth)
if(!DrawStateW( pDI->hDC, (HBRUSH)NULL, (DRAWSTATEPROC)NULL,
- (LPARAM)(LPWSTR) aStr.GetBuffer(),
+ (LPARAM)(LPWSTR) aStr.getStr(),
(WPARAM)0, aRect.right-strSizeA.cx-tm.tmMaxCharWidth, aRect.top + (lineHeight - strSizeA.cy)/2, 0, 0,
DST_TEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) )
ImplWriteLastError(GetLastError(), "ImplDrawItem");
commit 9be876cd067cf95338e719645c7f3025757d5563
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 20 19:04:48 2013 +0100
Related: fdo#38838 remove non OUString ::Append
Change-Id: I084ce5c4833964018849617632a1308dc74adda3
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index ea43eb8..bb6ec81 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -106,11 +106,11 @@ private:
StringCompare CompareTo( const UniString& rStr,
xub_StrLen nLen = STRING_LEN ) const;
+ UniString& Assign( const OUString& rStr );
+
UniString( const int* pDummy ); // not implemented: to prevent UniString( NULL )
UniString(int); // not implemented; to detect misuses of
// UniString(sal_Unicode)
- void Assign(int); // not implemented; to detect misuses of
- // Assign(sal_Unicode)
void operator =(int); // not implemented; to detect misuses
// of operator =(sal_Unicode)
void Append(int); // not implemented; to detect misuses of
@@ -133,8 +133,6 @@ private:
TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr );
TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr, xub_StrLen nLen );
TOOLS_DLLPRIVATE UniString( sal_Unicode c );
- TOOLS_DLLPRIVATE UniString& Assign( const sal_Unicode* pCharStr );
- TOOLS_DLLPRIVATE UniString& Assign( const sal_Unicode* pCharStr, xub_StrLen nLen );
TOOLS_DLLPRIVATE UniString& Append( const sal_Unicode* pCharStr );
TOOLS_DLLPRIVATE UniString& Append( const sal_Unicode* pCharStr, xub_StrLen nLen );
TOOLS_DLLPRIVATE UniString& Expand( xub_StrLen nCount, sal_Unicode cExpandChar );
@@ -178,20 +176,8 @@ public:
sal_Int32 ToInt32() const;
- UniString& Assign( const UniString& rStr );
- UniString& Assign( const OUString& rStr );
- UniString& Assign( sal_Unicode c );
- inline UniString & Assign(char c) // ...but allow "Assign('a')"
- { return Assign(static_cast< sal_Unicode >(c)); }
-
- UniString& operator =( const UniString& rStr )
- { return Assign( rStr ); }
UniString& operator =( const OUString& rStr )
{ return Assign( rStr ); }
- UniString& operator =( sal_Unicode c )
- { return Assign( c ); }
- inline UniString & operator =(char c) // ...but allow "= 'a'"
- { return operator =(static_cast< sal_Unicode >(c)); }
UniString& Append( const UniString& rStr );
UniString& Append( sal_Unicode c );
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index a0d6cca..34f782e 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -156,17 +156,6 @@ STRING::~STRING()
STRING_RELEASE((STRING_TYPE *)mpData);
}
-STRING& STRING::Assign( const STRING& rStr )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
- STRING_ACQUIRE((STRING_TYPE *)rStr.mpData);
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = rStr.mpData;
- return *this;
-}
-
STRING& STRING::Append( const STRING& rStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 3d174a4..e3dc5b6 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -144,18 +144,6 @@ STRING& STRING::Append( STRCODE c )
return *this;
}
-STRING& STRING::Assign( STRCODE c )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_ASSERT( c, "String::Assign() - c is 0" );
-
- // initialize maintenance data
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = ImplAllocData( 1 );
- mpData->maStr[0] = c;
- return *this;
-}
-
xub_StrLen ImplStringLen( const sal_Char* pStr )
{
const sal_Char* pTempStr = pStr;
More information about the Libreoffice-commits
mailing list