diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-19 09:09:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-19 09:59:26 +0100 |
commit | c5a994a89dea96d06df07ee5ac292438655f7ec7 (patch) | |
tree | a3510fae2461722a3b9b115130a32531d9395e1c | |
parent | 6b7675a1b7994200c4501bc086ac40ca803b2335 (diff) |
oops not yet
-rw-r--r-- | tools/inc/tools/string.hxx | 2 | ||||
-rw-r--r-- | tools/source/string/strimp.cxx | 14 | ||||
-rw-r--r-- | tools/source/string/tustring.cxx | 14 |
3 files changed, 15 insertions, 15 deletions
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index b2f9035a6207..d976207835e8 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -172,7 +172,6 @@ private: sal_uInt32 nCvtFlags = UNISTRING_TO_BYTESTRING_CVTFLAGS ); //not implemented, to detect use of removed methods without compiler making somethiing to fit void Assign(int); // not implemented; to detect misuses of // Assign(sal_Char) - ByteString& Assign( sal_Char c ); //not implemented void operator =(int); // not implemented; to detect misuses // of operator =(sal_Char) void Append(int); // not implemented; to detect misuses of @@ -201,6 +200,7 @@ public: ByteString& Assign( const rtl::OString& rStr ); ByteString& Assign( const sal_Char* pCharStr ); ByteString& Assign( const sal_Char* pCharStr, xub_StrLen nLen ); + ByteString& Assign( sal_Char c ); ByteString& operator =( const ByteString& rStr ) { return Assign( rStr ); } ByteString& operator =( const rtl::OString& rStr ) diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx index 495b15aa4616..da98a85e09a6 100644 --- a/tools/source/string/strimp.cxx +++ b/tools/source/string/strimp.cxx @@ -428,6 +428,20 @@ STRING& STRING::Assign( const STRCODE* pCharStr, xub_StrLen nLen ) // ----------------------------------------------------------------------- +STRING& STRING::Assign( STRCODE c ) +{ + DBG_CHKTHIS( STRING, DBGCHECKSTRING ); + DBG_ASSERT( c, "String::Assign() - c is 0" ); + + // Verwaltungsdaten anlegen und initialisieren + STRING_RELEASE((STRING_TYPE *)mpData); + mpData = ImplAllocData( 1 ); + mpData->maStr[0] = c; + 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 82d5458c1e30..30a0fd508f49 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -576,18 +576,4 @@ STRING::STRING( STRCODE c ) mpData->maStr[0] = c; } -// ----------------------------------------------------------------------- - -STRING& STRING::Assign( STRCODE c ) -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - DBG_ASSERT( c, "String::Assign() - c is 0" ); - - // Verwaltungsdaten anlegen und initialisieren - STRING_RELEASE((STRING_TYPE *)mpData); - mpData = ImplAllocData( 1 ); - mpData->maStr[0] = c; - return *this; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |