valueOf is deprecated

Change-Id: I8966ecd4e94c7b11af4d59b5b4461ce03a888891
This commit is contained in:
Luboš Luňák
2013-08-21 16:08:26 +02:00
parent 6263471eea
commit 1ece204b54
11 changed files with 23 additions and 27 deletions

View File

@@ -217,7 +217,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const DataTypeEn
if(nCount < (parameterIndex-1))
{
OUString sDefaultName( "parame" );
sDefaultName += OUString::valueOf(parameterIndex);
sDefaultName += OUString::number(parameterIndex);
ADOParameter* pParam = m_Command.CreateParameter(sDefaultName,_eType,adParamInput,_nSize,_Val);
if(pParam)
{
@@ -433,7 +433,7 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
{
const OUString sError( m_pConnection->getResources().getResourceStringWithSubstitution(
STR_UNKNOWN_PARA_TYPE,
"$position$", OUString::valueOf(parameterIndex)
"$position$", OUString::number(parameterIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
}
@@ -542,7 +542,7 @@ void OPreparedStatement::replaceParameterNodeName(OSQLParseNode* _pNode,
OSQLParseNode* pNewNode = new OSQLParseNode(OUString(":") ,SQL_NODE_PUNCTUATION,0);
delete pChildNode->replace(pChildNode->getChild(0),pNewNode);
OUString sParameterName = _sDefaultName;
sParameterName += OUString::valueOf(++_rParameterCount);
sParameterName += OUString::number(++_rParameterCount);
pChildNode->append(new OSQLParseNode( sParameterName,SQL_NODE_NAME,0));
}
else

View File

@@ -814,14 +814,12 @@ OUString SAL_CALL OEvoabDatabaseMetaData::getDriverName( ) throw(SQLException,
// -------------------------------------------------------------------------
OUString SAL_CALL OEvoabDatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException)
{
OUString aValue = OUString::valueOf((sal_Int32)1);
return aValue;
return OUString( "1" );
}
// -------------------------------------------------------------------------
OUString SAL_CALL OEvoabDatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException)
{
OUString aValue = OUString::valueOf((sal_Int32)0);
return aValue;
return OUString( "0" );
}
// -------------------------------------------------------------------------
OUString SAL_CALL OEvoabDatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException)

View File

@@ -272,7 +272,7 @@ void SAL_CALL OEvoabPreparedStatement::setObject( sal_Int32 parameterIndex, cons
{
const OUString sError( getOwnConnection()->getResources().getResourceStringWithSubstitution(
STR_UNKNOWN_PARA_TYPE,
"$position$", OUString::valueOf(parameterIndex)
"$position$", OUString::number(parameterIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
}

View File

@@ -367,7 +367,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
aMatchString = pAtom->getTokenValue();
// Determine where '%' character is...
if( aMatchString.equals( OUString::valueOf( WILDCARD ) ) )
if( aMatchString.equals( OUString( WILDCARD ) ) )
{
// String containing only a '%' and nothing else matches everything
pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS,

View File

@@ -63,7 +63,7 @@ namespace connectivity { namespace hsqldb
{
OString sLine( _pOp );
sLine += "( ";
sLine += OString::valueOf( _nLongArg );
sLine += OString::number( _nLongArg );
sLine += " )";
writeString( sLine.getStr(), true );
}
@@ -71,14 +71,14 @@ namespace connectivity { namespace hsqldb
void logReturn( jlong _nRetVal )
{
OString sLine( " -> " );
sLine += OString::valueOf( _nRetVal );
sLine += OString::number( _nRetVal );
writeString( sLine.getStr(), true );
}
void logReturn( jint _nRetVal )
{
OString sLine( " -> " );
sLine += OString::valueOf( _nRetVal );
sLine += OString::number( _nRetVal );
writeString( sLine.getStr(), true );
}

View File

@@ -221,8 +221,8 @@ void KabImplModule::impl_throwKdeTooOldException()
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceStringWithSubstitution(
STR_KDE_VERSION_TOO_OLD,
"$major$",OUString::valueOf((sal_Int32)MIN_KDE_VERSION_MAJOR),
"$minor$",OUString::valueOf((sal_Int32)MIN_KDE_VERSION_MINOR)
"$major$",OUString::number(MIN_KDE_VERSION_MAJOR),
"$minor$",OUString::number(MIN_KDE_VERSION_MINOR)
) );
impl_throwGenericSQLException( sError );
}
@@ -245,8 +245,8 @@ void KabImplModule::impl_throwKdeTooNewException()
SQLException aError;
aError.Message = aResources.getResourceStringWithSubstitution(
STR_KDE_VERSION_TOO_NEW,
"$major$",OUString::valueOf((sal_Int32)MIN_KDE_VERSION_MAJOR),
"$minor$",OUString::valueOf((sal_Int32)MIN_KDE_VERSION_MINOR)
"$major$",OUString::number(MIN_KDE_VERSION_MAJOR),
"$minor$",OUString::number(MIN_KDE_VERSION_MINOR)
);
aError.SQLState = OUString( "S1000" );
aError.ErrorCode = 0;

View File

@@ -281,7 +281,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
if ( nPortNumber > 0 ) {
m_sMozillaURI += OUString( ":" );
m_sMozillaURI += OUString::valueOf( nPortNumber );
m_sMozillaURI += OUString::number( nPortNumber );
}
if ( !sBaseDN.isEmpty() ) {

View File

@@ -659,14 +659,12 @@ OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, Runti
// -------------------------------------------------------------------------
OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException)
{
OUString aValue = OUString::valueOf((sal_Int32)1);
return aValue;
return OUString( "1" );
}
// -------------------------------------------------------------------------
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException)
{
OUString aValue = OUString::valueOf((sal_Int32)0);
return aValue;
return OUString( "0" );
}
// -------------------------------------------------------------------------
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException)

View File

@@ -919,7 +919,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
// Determine where '%' character is...
if ( matchString.equals( OUString::valueOf( WILDCARD ) ) )
if ( matchString.equals( OUString( WILDCARD ) ) )
{
// String containing only a '%' and nothing else
op = MQueryOp::Exists;
@@ -1652,7 +1652,7 @@ void OResultSet::checkPendingUpdate() throw(SQLException, RuntimeException)
{
const OUString sError( m_pStatement->getOwnConnection()->getResources().getResourceStringWithSubstitution(
STR_COMMIT_ROW,
"$position$", OUString::valueOf(nCurrentRow)
"$position$", OUString::number(nCurrentRow)
) );
::dbtools::throwGenericSQLException(sError,*this);
}
@@ -1784,7 +1784,7 @@ void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) th
{
const OUString sError( m_pStatement->getOwnConnection()->getResources().getResourceStringWithSubstitution(
STR_COLUMN_NOT_UPDATEABLE,
"$position$", OUString::valueOf(columnIndex)
"$position$", OUString::number(columnIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
} // if (!::dbtools::implUpdateObject(this, columnIndex, x))
@@ -1797,7 +1797,7 @@ void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any&
{
const OUString sError( m_pStatement->getOwnConnection()->getResources().getResourceStringWithSubstitution(
STR_COLUMN_NOT_UPDATEABLE,
"$position$", OUString::valueOf(columnIndex)
"$position$", OUString::number(columnIndex)
) );
::dbtools::throwGenericSQLException(sError,*this);
}

View File

@@ -759,7 +759,7 @@ sal_Bool MDatabaseMetaDataHelper::NewAddressBook(OConnection* _pCon,const OUStri
}
else if (NS_FAILED(rv))
{
m_aError.set( STR_COULD_NOT_CREATE_ADDRESSBOOK, 0, OUString::valueOf( sal_Int32(rv), 16 ) );
m_aError.set( STR_COULD_NOT_CREATE_ADDRESSBOOK, 0, OUString::number( sal_Int32(rv), 16 ) );
}
OSL_TRACE( "OUT MDatabaseMetaDataHelper::NewAddressBook()" );
return( NS_SUCCEEDED(rv) ? sal_True : sal_False );

View File

@@ -98,7 +98,7 @@ MNameMapper::add( OUString& str, nsIAbDirectory* abook )
long count =1;
while ( mDirMap->find( tempStr ) != mDirMap->end() ) {
tempStr = str + OUString::valueOf(count);
tempStr = str + OUString::number(count);
count ++;
}
str = tempStr;