summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-08-21 15:07:31 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-08-21 15:10:35 +0200
commit64b993e046f23baaacaff1572b7d2a816588b5ef (patch)
tree237dce36a1d4787d168a0520839f6aab22500487 /basic
parent75f41baab6ce75786a91fe461835ee16a23ec18e (diff)
finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sb.cxx2
-rw-r--r--basic/source/comp/token.cxx2
-rw-r--r--basic/source/runtime/methods.cxx10
-rw-r--r--basic/source/sbx/sbxcurr.cxx2
-rw-r--r--basic/source/sbx/sbxint.cxx4
-rw-r--r--basic/source/sbx/sbxobj.cxx4
-rw-r--r--basic/source/sbx/sbxscan.cxx10
-rw-r--r--basic/source/sbx/sbxvar.cxx2
8 files changed, 18 insertions, 18 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 3ef3255a3030..298712372ccd 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1734,7 +1734,7 @@ sal_Bool StarBASIC::RTError( SbError code, const OUString& rMsg, sal_Int32 l, sa
// like vba ( adds an error number etc )
if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) )
{
- OUString aTmp = "\'" + OUString::valueOf(SbxErrObject::getUnoErrObject()->getNumber()) +
+ OUString aTmp = "\'" + OUString::number(SbxErrObject::getUnoErrObject()->getNumber()) +
"\'\n" + OUString(!GetSbData()->aErrMsg.isEmpty() ? GetSbData()->aErrMsg : rMsg);
code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp );
}
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index f3d27eddbcd1..57614271c857 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -280,7 +280,7 @@ const OUString& SbiTokenizer::Symbol( SbiToken t )
// character token?
if( t < FIRSTKWD )
{
- aSym = OUString::valueOf(sal::static_int_cast<sal_Unicode>(t));
+ aSym = OUString(sal::static_int_cast<sal_Unicode>(t));
return aSym;
}
switch( t )
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 3ae89cb80f7c..fb01bdbfb989 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -886,7 +886,7 @@ RTLFUNC(Hex)
sal_uInt32 nVal = pArg->IsInteger() ?
static_cast<sal_uInt16>(pArg->GetInteger()) :
static_cast<sal_uInt32>(pArg->GetLong());
- OUString aStr(OUString::valueOf( sal_Int64(nVal), 16 ));
+ OUString aStr(OUString::number( nVal, 16 ));
aStr = aStr.toAsciiUpperCase();
rPar.Get(0)->PutString( aStr );
}
@@ -4649,8 +4649,8 @@ RTLFUNC(Partition)
// will be handled properly during any subsequent sort operation.
// calculate the maximun number of characters before lowervalue and uppervalue
- OUString aBeforeStart = OUString::valueOf( nStart - 1 );
- OUString aAfterStop = OUString::valueOf( nStop + 1 );
+ OUString aBeforeStart = OUString::number( nStart - 1 );
+ OUString aAfterStop = OUString::number( nStop + 1 );
sal_Int32 nLen1 = aBeforeStart.getLength();
sal_Int32 nLen2 = aAfterStop.getLength();
sal_Int32 nLen = nLen1 >= nLen2 ? nLen1:nLen2;
@@ -4675,8 +4675,8 @@ RTLFUNC(Partition)
nLowerValue = ((( nNumber - nStart ) / nInterval ) * nInterval ) + nStart;
nUpperValue = nLowerValue + nInterval - 1;
}
- aLowerValue = OUString::valueOf( nLowerValue );
- aUpperValue = OUString::valueOf( nUpperValue );
+ aLowerValue = OUString::number( nLowerValue );
+ aUpperValue = OUString::number( nUpperValue );
}
nLen1 = aLowerValue.getLength();
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 422c0dde799c..851c6a8caa93 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -37,7 +37,7 @@ static OUString ImpCurrencyToString( const sal_Int64 &rVal )
ImpGetIntntlSep( cDecimalSep, cThousandSep );
#endif
- OUString aAbsStr = OUString::valueOf( absVal );
+ OUString aAbsStr = OUString::number( absVal );
OUStringBuffer aBuf;
sal_Int32 initialLen = aAbsStr.getLength();
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 6642789c58b1..649bb46f11c6 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -543,7 +543,7 @@ start:
if( !p->pOUString )
p->pOUString = new OUString;
- ::OString aOStr = ::OString::valueOf( n );
+ ::OString aOStr = OString::number( n );
(*p->pOUString) = ::OStringToOUString
( aOStr, RTL_TEXTENCODING_ASCII_US );
break;
@@ -821,7 +821,7 @@ start:
SbxBase::SetError( SbxERR_CONVERSION );
else
{
- ::OString aOStr = ::OString::valueOf( (sal_Int64)n );
+ ::OString aOStr = OString::number( n );
(*p->pOUString) = ::OStringToOUString
( aOStr, RTL_TEXTENCODING_ASCII_US );
}
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index ac609287bf74..ea82ec7a0c7c 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -827,7 +827,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
OString aNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
OString aClassNameStr(OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US));
rStrm << "Object( "
- << OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr()<< "=='"
+ << OString::number(reinterpret_cast<sal_Int64>(this)).getStr()<< "=='"
<< ( aNameStr.isEmpty() ? "<unnamed>" : aNameStr.getStr() ) << "', "
<< "of class '" << aClassNameStr.getStr() << "', "
<< "counts "
@@ -837,7 +837,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
{
OString aParentNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
rStrm << "in parent "
- << OString::valueOf(reinterpret_cast<sal_Int64>(GetParent())).getStr()
+ << OString::number(reinterpret_cast<sal_Int64>(GetParent())).getStr()
<< "=='" << ( aParentNameStr.isEmpty() ? "<unnamed>" : aParentNameStr.getStr() ) << "'";
}
else
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 180de7ed0ac6..e3545ef1a130 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -471,12 +471,12 @@ bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType )
{
if( rSrc.equalsIgnoreAsciiCase("true") )
{
- aNewString = OUString::valueOf( (sal_Int32)SbxTRUE );
+ aNewString = OUString::number( SbxTRUE );
bChanged = true;
}
else if( rSrc.equalsIgnoreAsciiCase("false") )
{
- aNewString = OUString::valueOf( (sal_Int32)SbxFALSE );
+ aNewString = OUString::number( SbxFALSE );
bChanged = true;
}
break;
@@ -825,13 +825,13 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
}
else
{
- rRes = OUString::valueOf(nMin);
+ rRes = OUString::number(nMin);
}
}
else if( aFmtStr.equalsIgnoreAsciiCase( VBAFORMAT_W ))
{
sal_Int32 nWeekDay = implGetWeekDay( nNumber );
- rRes = OUString::valueOf(nWeekDay);
+ rRes = OUString::number(nWeekDay);
}
else if( aFmtStr.equalsIgnoreAsciiCase( VBAFORMAT_Y ))
{
@@ -839,7 +839,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
double dBaseDate;
implDateSerial( nYear, 1, 1, dBaseDate );
sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate );
- rRes = OUString::valueOf(nYear32);
+ rRes = OUString::number(nYear32);
}
else
{
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 6c4c09b72e6d..8fb9e0897da2 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -737,7 +737,7 @@ void SbxVariable::Dump( SvStream& rStrm, sal_Bool bFill )
{
OString aBNameStr(OUStringToOString(GetName( SbxNAME_SHORT_TYPES ), RTL_TEXTENCODING_ASCII_US));
rStrm << "Variable( "
- << OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr() << "=="
+ << OString::number(reinterpret_cast<sal_Int64>(this)).getStr() << "=="
<< aBNameStr.getStr();
OString aBParentNameStr(OUStringToOString(GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US));
if ( GetParent() )