summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-18 21:03:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-19 21:11:02 +0000
commitca02d728082a86780d68ede7b9d565128dbc0434 (patch)
tree8c0a857ad73f89d592295f99e5f72a0c96e55e57 /tools
parente4ff699291ddab16d70aa9b11c717e34dfbe5414 (diff)
remove [Byte]String::EraseAllChars
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/string.hxx3
-rw-r--r--tools/source/string/strimp.cxx43
2 files changed, 0 insertions, 46 deletions
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 64564efd1671..fb373b2c3632 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -237,8 +237,6 @@ public:
ByteString& EraseLeadingChars( sal_Char c = ' ' );
ByteString& EraseTrailingChars( sal_Char c = ' ' );
ByteString& EraseLeadingAndTrailingChars( sal_Char c = ' ' );
- ByteString& EraseAllChars( sal_Char c = ' ' );
-
ByteString& ConvertLineEnd( LineEnd eLineEnd );
ByteString& ConvertLineEnd()
{ return ConvertLineEnd( GetSystemLineEnd() ); }
@@ -491,7 +489,6 @@ public:
UniString& EraseLeadingChars( sal_Unicode c = ' ' );
UniString& EraseTrailingChars( sal_Unicode c = ' ' );
UniString& EraseLeadingAndTrailingChars( sal_Unicode c = ' ' );
- UniString& EraseAllChars( sal_Unicode c = ' ' );
UniString& Reverse();
UniString& ConvertLineEnd( LineEnd eLineEnd );
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index da98a85e09a6..aad7df6dd67e 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -810,49 +810,6 @@ STRING& STRING::EraseLeadingAndTrailingChars( STRCODE c )
// -----------------------------------------------------------------------
-STRING& STRING::EraseAllChars( STRCODE c )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- sal_Int32 nCount = 0;
- for (sal_Int32 i = 0; i < mpData->mnLen; ++i) {
- if ( mpData->maStr[i] == c )
- ++nCount;
- }
-
- if ( nCount )
- {
- if ( nCount == mpData->mnLen )
- {
- STRING_NEW((STRING_TYPE **)&mpData);
- }
- else
- {
- // Neuen String anlegen
- STRINGDATA* pNewData = ImplAllocData( mpData->mnLen-nCount );
-
- // Alten String kopieren und initialisieren
- nCount = 0;
- for( xub_StrLen j = 0; j < mpData->mnLen; ++j )
- {
- if ( mpData->maStr[j] != c )
- {
- pNewData->maStr[nCount] = mpData->maStr[j];
- ++nCount;
- }
- }
-
- // Alte Daten loeschen und Neue zuweisen
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = pNewData;
- }
- }
-
- return *this;
-}
-
-// -----------------------------------------------------------------------
-
STRING& STRING::ToLowerAscii()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );