diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-20 19:04:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-21 09:17:31 +0100 |
commit | 9be876cd067cf95338e719645c7f3025757d5563 (patch) | |
tree | 9da757ed8852afcff8133c2c76e2dea1e8f3f7c9 | |
parent | 0980948795a77fcbb19a464a533e31d6529526a1 (diff) |
Related: fdo#38838 remove non OUString ::Append
Change-Id: I084ce5c4833964018849617632a1308dc74adda3
-rw-r--r-- | include/tools/string.hxx | 18 | ||||
-rw-r--r-- | tools/source/string/strimp.cxx | 11 | ||||
-rw-r--r-- | tools/source/string/tustring.cxx | 12 |
3 files changed, 2 insertions, 39 deletions
diff --git a/include/tools/string.hxx b/include/tools/string.hxx index ea43eb8bb05b..bb6ec815755f 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 a0d6ccaf67a6..34f782efea0b 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 3d174a4b3e56..e3dc5b680b67 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; |