summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-08 17:35:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-10 12:49:48 +0100
commit3f82d94bdcf707e6cf30403434c3470930bb0b01 (patch)
tree5b795d19d50ef2d5f91d44f2df9813fa440a75f4 /basic
parent0c38c3e0899f50ba2a780ca7c261a622bcf32bb2 (diff)
String::CreateFromInt32->rtl::OUString::valueOf
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basmgr.cxx4
-rw-r--r--basic/source/classes/sb.cxx17
-rw-r--r--basic/source/sbx/sbxscan.cxx6
3 files changed, 12 insertions, 15 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 81e006bec1ff..5e909b2cebae 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1525,8 +1525,8 @@ sal_Bool BasicManager::LoadLib( sal_uInt16 nLib )
}
else
{
- StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, String(), ERRCODE_BUTTON_OK );
- aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_LIBNOTFOUND, String::CreateFromInt32(nLib)));
+ StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, rtl::OUString(), ERRCODE_BUTTON_OK );
+ aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_LIBNOTFOUND, rtl::OUString::valueOf(static_cast<sal_Int32>(nLib))));
}
return bDone;
}
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 816c7d3ad0dd..84d747192da4 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1601,14 +1601,12 @@ void StarBASIC::MakeErrorText( SbError nId, const ::rtl::OUString& aMsg )
}
else if( nOldID != 0 )
{
- String aStdMsg( RTL_CONSTASCII_USTRINGPARAM("Fehler ") );
- aStdMsg += String::CreateFromInt32( nOldID);
- aStdMsg += String( RTL_CONSTASCII_USTRINGPARAM(": Kein Fehlertext verfuegbar!") );
- GetSbData()->aErrMsg = aStdMsg;
+ rtl::OUStringBuffer aStdMsg;
+ aStdMsg.append("Fehler ").append(static_cast<sal_Int32>(nOldID)).append(": Kein Fehlertext verfuegbar!");
+ GetSbData()->aErrMsg = aStdMsg.makeStringAndClear();
}
else
GetSbData()->aErrMsg = String::EmptyString();
-
}
sal_Bool StarBASIC::CError
@@ -1672,11 +1670,10 @@ sal_Bool StarBASIC::RTError( SbError code, const String& rMsg, sal_uInt16 l, sal
// like vba ( adds an error number etc )
if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) )
{
- String aTmp = '\'';
- aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() );
- aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") );
- aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg;
- code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp );
+ rtl::OUStringBuffer aTmp;
+ aTmp.append('\'').append(SbxErrObject::getUnoErrObject()->getNumber())
+ .append("\'\n").append(GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg);
+ code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp.makeStringAndClear() );
}
else
code = (sal_uIntPtr)*new StringErrorInfo( code, String(rMsg) );
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index b4f111c32f6c..80276a3f217f 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -800,13 +800,13 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
}
else
{
- rRes = String::CreateFromInt32( nMin );
+ rRes = rtl::OUString::valueOf(nMin);
}
}
else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_W ))
{
sal_Int32 nWeekDay = implGetWeekDay( nNumber );
- rRes = String::CreateFromInt32( nWeekDay );
+ rRes = rtl::OUString::valueOf(nWeekDay);
}
else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_Y ))
{
@@ -814,7 +814,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
double dBaseDate;
implDateSerial( nYear, 1, 1, dBaseDate );
sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate );
- rRes = String::CreateFromInt32( nYear32 );
+ rRes = rtl::OUString::valueOf(nYear32);
}
else
{