summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-15 11:23:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-15 11:23:39 +0100
commit2bee9847ec615258819b6cfec857c84e8f03fc6d (patch)
tree6c620af846913c0f28a0af7b2c3fec722cd83c11 /tools/source
parentf1d1cb2d8f0f6e3a9c6071faeda1e58f88041749 (diff)
ditch ByteString::Fill
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/string/strimp.cxx32
-rw-r--r--tools/source/string/tustring.cxx32
2 files changed, 32 insertions, 32 deletions
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index f351aea90044..3d15cb29b26c 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -769,38 +769,6 @@ STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount )
// -----------------------------------------------------------------------
-STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- if ( !nCount )
- return *this;
-
- // Ist nCount groesser wie der jetzige String, dann verlaengern
- if ( nCount > mpData->mnLen )
- {
- // dann neuen String mit der neuen Laenge anlegen
- STRINGDATA* pNewData = ImplAllocData( nCount );
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = pNewData;
- }
- else
- ImplCopyData();
-
- STRCODE* pStr = mpData->maStr;
- do
- {
- *pStr = cFillChar;
- ++pStr,
- --nCount;
- }
- while ( nCount );
-
- return *this;
-}
-
-// -----------------------------------------------------------------------
-
STRING& STRING::Expand( xub_StrLen nCount, STRCODE cExpandChar )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 877b6d86fb49..720d5a24b002 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -442,4 +442,36 @@ StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
return COMPARE_GREATER;
}
+// -----------------------------------------------------------------------
+
+STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+
+ if ( !nCount )
+ return *this;
+
+ // Ist nCount groesser wie der jetzige String, dann verlaengern
+ if ( nCount > mpData->mnLen )
+ {
+ // dann neuen String mit der neuen Laenge anlegen
+ STRINGDATA* pNewData = ImplAllocData( nCount );
+ STRING_RELEASE((STRING_TYPE *)mpData);
+ mpData = pNewData;
+ }
+ else
+ ImplCopyData();
+
+ STRCODE* pStr = mpData->maStr;
+ do
+ {
+ *pStr = cFillChar;
+ ++pStr,
+ --nCount;
+ }
+ while ( nCount );
+
+ return *this;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */