summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-08-09 10:57:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-08-09 12:47:03 +0100
commit490b51371dede5910fed770fe70fd1870db0fffa (patch)
tree9c4447301b99125af506ab7a8f27f3a7e50b60c6 /sc/source/core
parent6292b12acfdddd51a816fad3b3ea8073a58eb3c2 (diff)
String::AllocBuffer -> rtl::OUStringBuffer
Change-Id: I9fa73190aa68c5c19fcf76b327dca6942697cf2a
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/tool/interpr1.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index b10aea70e75b..489a53bd2d28 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8041,17 +8041,12 @@ void ScInterpreter::ScRept()
PushString( EMPTY_STRING );
else
{
- xub_StrLen n = (xub_StrLen) fAnz;
const xub_StrLen nLen = aStr.Len();
- String aRes;
- const sal_Unicode* const pSrc = aStr.GetBuffer();
- sal_Unicode* pDst = aRes.AllocBuffer( n * nLen );
+ xub_StrLen n = (xub_StrLen) fAnz;
+ rtl::OUStringBuffer aRes(n*nLen);
while( n-- )
- {
- memcpy( pDst, pSrc, nLen * sizeof(sal_Unicode) );
- pDst += nLen;
- }
- PushString( aRes );
+ aRes.append(aStr);
+ PushString( aRes.makeStringAndClear() );
}
}
}