summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-10-28 20:31:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-10-28 23:09:32 +0000
commit0dd085f8f327b08cf5d69c3e1b93ff82016995fb (patch)
tree0fec0966cd3a88b840621161de72ef5c462bb877 /tools
parent8865b7f013bcd9b4ce41dd98be28ba28aeb22e66 (diff)
UniString->rtl::OUStringBuffer
Change-Id: I9938d7c4ab5594baeb10f405f0aa0964ef84d6c5
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/string.hxx3
-rw-r--r--tools/source/string/tustring.cxx29
2 files changed, 1 insertions, 31 deletions
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 7603b9727040..3aeb7e9a37d7 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -131,7 +131,7 @@ private:
sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );
TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr );
TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr, xub_StrLen nLen );
-
+ TOOLS_DLLPRIVATE UniString& Expand( xub_StrLen nCount, sal_Unicode cExpandChar );
public:
UniString();
UniString( const ResId& rResId );
@@ -216,7 +216,6 @@ public:
UniString Copy( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ) const;
UniString& Fill( xub_StrLen nCount, sal_Unicode cFillChar = ' ' );
- UniString& Expand( xub_StrLen nCount, sal_Unicode cExpandChar = ' ' );
UniString& ToLowerAscii();
UniString& ToUpperAscii();
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 0893e4afb256..898d2d899597 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -267,35 +267,6 @@ STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
return *this;
}
-STRING& STRING::Expand( xub_StrLen nCount, STRCODE cExpandChar )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- // return if string doesn't need expanding
- sal_Int32 nLen = mpData->mnLen;
- if ( nCount <= nLen )
- return *this;
-
- // allocate string of new size
- STRINGDATA* pNewData = ImplAllocData( nCount );
-
- // copy from old string
- memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) );
-
- // and expand using the given character
- STRCODE* pStr = pNewData->maStr;
- pStr += nLen;
- for (sal_Int32 i = nCount - nLen; i > 0; --i) {
- *pStr++ = cExpandChar;
- }
-
- // free old string
- STRING_RELEASE((STRING_TYPE *)mpData);
- mpData = pNewData;
-
- return *this;
-}
-
STRCODE* STRING::GetBufferAccess()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );