summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-20 20:06:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-21 09:17:31 +0100
commit3714051f1495791095cce885918d48dce7b339f7 (patch)
tree18fa4d379e30064f5b8425944393a58c80bb56cc
parent60ff30a2ab0cb219a1dc46e599ad01416bb8d7fa (diff)
Related: fdo#38838 remove String::[G|S]etChar
Change-Id: I64711aa3e6580eff7c64a92243e3161ef2d7cb9e
-rw-r--r--include/tools/string.hxx16
-rw-r--r--tools/source/string/strimp.cxx9
2 files changed, 4 insertions, 21 deletions
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index bb6ec815755f..5df5f23b528f 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 335c6aed2e26..e62f5ed5d0b1 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