summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-14 20:52:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-16 15:21:35 +0100
commit52d1caa43786adb5e6066f5f3f670212ff84e422 (patch)
treed25cc1286eba1ae96550dbc1aae1f0c7e7050ada /tools
parent502c93143ef29989692ca3e63e3e6abc255fd53f (diff)
String::CreateFromInt32->rtl::OUString::valueOf
Diffstat (limited to 'tools')
-rw-r--r--tools/source/fsys/tempfile.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index 4a5c957c17f7..7a69e2e7696c 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -31,6 +31,7 @@
#include "comdep.hxx"
#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
#include <osl/file.hxx>
#include <rtl/instance.hxx>
#include <tools/time.hxx>
@@ -119,9 +120,10 @@ void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_Tru
for ( unsigned long nOld = u; ++u != nOld; )
{
u %= (nRadix*nRadix*nRadix);
- String aTmp( aName );
- aTmp += String::CreateFromInt32( (sal_Int32) (unsigned) u, nRadix );
- aTmp += String::CreateFromAscii( ".tmp" );
+ rtl::OUString aTmp = rtl::OUStringBuffer(aName).
+ append((sal_Int32)(unsigned)u, nRadix).
+ append(".tmp").
+ makeStringAndClear();
if ( bDir )
{
@@ -200,12 +202,14 @@ TempFile::TempFile( const String& rLeadingChars, const String* pExtension, const
aName += rLeadingChars;
for ( sal_Int32 i=0;; i++ )
{
- String aTmp( aName );
- aTmp += String::CreateFromInt32( i );
+ rtl::OUStringBuffer aTmpBuffer(aName);
+ aTmpBuffer.append(i);
if ( pExtension )
- aTmp += *pExtension;
+ aTmpBuffer.append(*pExtension);
else
- aTmp += String::CreateFromAscii( ".tmp" );
+ aTmpBuffer.append(".tmp");
+ rtl::OUString aTmp = aTmpBuffer.makeStringAndClear();
+
if ( bDirectory )
{
FileBase::RC err = Directory::create( aTmp );