Kaydet (Commit) 3f82d94b authored tarafından Caolán McNamara's avatar Caolán McNamara

String::CreateFromInt32->rtl::OUString::valueOf

üst 0c38c3e0
...@@ -1525,8 +1525,8 @@ sal_Bool BasicManager::LoadLib( sal_uInt16 nLib ) ...@@ -1525,8 +1525,8 @@ sal_Bool BasicManager::LoadLib( sal_uInt16 nLib )
} }
else else
{ {
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, String(), ERRCODE_BUTTON_OK ); StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, rtl::OUString(), ERRCODE_BUTTON_OK );
aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_LIBNOTFOUND, String::CreateFromInt32(nLib))); aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_LIBNOTFOUND, rtl::OUString::valueOf(static_cast<sal_Int32>(nLib))));
} }
return bDone; return bDone;
} }
......
...@@ -1601,14 +1601,12 @@ void StarBASIC::MakeErrorText( SbError nId, const ::rtl::OUString& aMsg ) ...@@ -1601,14 +1601,12 @@ void StarBASIC::MakeErrorText( SbError nId, const ::rtl::OUString& aMsg )
} }
else if( nOldID != 0 ) else if( nOldID != 0 )
{ {
String aStdMsg( RTL_CONSTASCII_USTRINGPARAM("Fehler ") ); rtl::OUStringBuffer aStdMsg;
aStdMsg += String::CreateFromInt32( nOldID); aStdMsg.append("Fehler ").append(static_cast<sal_Int32>(nOldID)).append(": Kein Fehlertext verfuegbar!");
aStdMsg += String( RTL_CONSTASCII_USTRINGPARAM(": Kein Fehlertext verfuegbar!") ); GetSbData()->aErrMsg = aStdMsg.makeStringAndClear();
GetSbData()->aErrMsg = aStdMsg;
} }
else else
GetSbData()->aErrMsg = String::EmptyString(); GetSbData()->aErrMsg = String::EmptyString();
} }
sal_Bool StarBASIC::CError sal_Bool StarBASIC::CError
...@@ -1672,11 +1670,10 @@ sal_Bool StarBASIC::RTError( SbError code, const String& rMsg, sal_uInt16 l, sal ...@@ -1672,11 +1670,10 @@ sal_Bool StarBASIC::RTError( SbError code, const String& rMsg, sal_uInt16 l, sal
// like vba ( adds an error number etc ) // like vba ( adds an error number etc )
if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) ) if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) )
{ {
String aTmp = '\''; rtl::OUStringBuffer aTmp;
aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); aTmp.append('\'').append(SbxErrObject::getUnoErrObject()->getNumber())
aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); .append("\'\n").append(GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg);
aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg; code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp.makeStringAndClear() );
code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp );
} }
else else
code = (sal_uIntPtr)*new StringErrorInfo( code, String(rMsg) ); code = (sal_uIntPtr)*new StringErrorInfo( code, String(rMsg) );
......
...@@ -800,13 +800,13 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const ...@@ -800,13 +800,13 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
} }
else else
{ {
rRes = String::CreateFromInt32( nMin ); rRes = rtl::OUString::valueOf(nMin);
} }
} }
else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_W )) else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_W ))
{ {
sal_Int32 nWeekDay = implGetWeekDay( nNumber ); sal_Int32 nWeekDay = implGetWeekDay( nNumber );
rRes = String::CreateFromInt32( nWeekDay ); rRes = rtl::OUString::valueOf(nWeekDay);
} }
else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_Y )) else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_Y ))
{ {
...@@ -814,7 +814,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const ...@@ -814,7 +814,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
double dBaseDate; double dBaseDate;
implDateSerial( nYear, 1, 1, dBaseDate ); implDateSerial( nYear, 1, 1, dBaseDate );
sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate ); sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate );
rRes = String::CreateFromInt32( nYear32 ); rRes = rtl::OUString::valueOf(nYear32);
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment