diff options
Diffstat (limited to 'connectivity')
21 files changed, 42 insertions, 42 deletions
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index 8506fef0b7dd..4b9f62019c51 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -225,7 +225,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL { sal_Int32 nValue = 0; if ( pBegin->Value >>= nValue ) - sValue = OUString::valueOf(nValue); + sValue = OUString::number(nValue); else { Sequence< OUString> aSeq; diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index fd51bfde1f06..a4880d4416f2 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1454,12 +1454,12 @@ OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString& OUString sName( _rBaseName ); sal_Int32 nPos = 1; if ( _bStartWithNumber ) - sName += OUString::valueOf( nPos ); + sName += OUString::number( nPos ); while ( aUsedNames.find( sName ) != aUsedNames.end() ) { sName = _rBaseName; - sName += OUString::valueOf( ++nPos ); + sName += OUString::number( ++nPos ); } return sName; } @@ -1976,7 +1976,7 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams, ::connectivity::SharedResources aResources; const OUString sError( aResources.getResourceStringWithSubstitution( STR_UNKNOWN_PARA_TYPE, - "$position$", OUString::valueOf(parameterIndex) + "$position$", OUString::number(parameterIndex) ) ); ::dbtools::throwGenericSQLException(sError,NULL); } diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index bfa07500824c..233d249e111f 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -955,7 +955,7 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSour SharedResources aResources; OUString sMessage = aResources.getResourceStringWithSubstitution( STR_STRING_LENGTH_EXCEEDED, "$string$", _rSource, - "$maxlen$", OUString::valueOf( _nMaxLen ), + "$maxlen$", OUString::number( _nMaxLen ), "$charset$", lcl_getEncodingName( _eEncoding ) ); diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index b21a4765da23..9f05e883dff7 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -434,7 +434,7 @@ static OUString lcl_GetColumnStr( sal_Int32 nColumn ) { //SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::lcl_GetColumnStr" ); if ( nColumn < 26 ) - return OUString::valueOf( (sal_Unicode) ( 'A' + nColumn ) ); + return OUString( (sal_Unicode) ( 'A' + nColumn ) ); else { OUStringBuffer aBuffer(2); @@ -504,7 +504,7 @@ void OCalcTable::fillColumns() sal_Int32 nExprCnt = 0; while(aFind != m_aColumns->get().end()) { - (aAlias = aColumnName) += OUString::valueOf((sal_Int32)++nExprCnt); + (aAlias = aColumnName) += OUString::number(++nExprCnt); aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase); } diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index b4f445f7189e..7f0c00c46a15 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -976,13 +976,13 @@ OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, Runti OUString SAL_CALL ODatabaseMetaData::getDriverVersion( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDriverVersion" ); - return OUString::valueOf((sal_Int32)1); + return OUString::number(1); } // ------------------------------------------------------------------------- OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDatabaseProductVersion" ); - return OUString::valueOf((sal_Int32)0); + return OUString::number(0); } // ------------------------------------------------------------------------- OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index 175fd48a3dca..d34c5266c99f 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -350,7 +350,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); } diff --git a/connectivity/source/drivers/file/FStringFunctions.cxx b/connectivity/source/drivers/file/FStringFunctions.cxx index 15e49ff4323b..acac9ac82a93 100644 --- a/connectivity/source/drivers/file/FStringFunctions.cxx +++ b/connectivity/source/drivers/file/FStringFunctions.cxx @@ -114,7 +114,7 @@ ORowSetValue OOp_Locate::operate(const ::std::vector<ORowSetValue>& lhs) const return ORowSetValue(); } if ( lhs.size() == 2 ) - return OUString::valueOf(lhs[0].getString().indexOf(lhs[1].getString())+1); + return OUString::number(lhs[0].getString().indexOf(lhs[1].getString())+1); else if ( lhs.size() != 3 ) return ORowSetValue(); diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 75f804e93df6..899ad14cec74 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -110,7 +110,7 @@ namespace connectivity OUString lcl_getNextCount() { static sal_Int32 s_nCount = 0; - return OUString::valueOf(s_nCount++); + return OUString::number(s_nCount++); } // ----------------------------------------------------------------------------- OUString StorageContainer::removeURLPrefix(const OUString& _sURL,const OUString& _sFileURL) @@ -295,7 +295,7 @@ namespace connectivity sMessage += "\nMode: 0x"; if ( _nMode < 16 ) sMessage += "0"; - sMessage += OString::valueOf( _nMode, 16 ).toAsciiUpperCase(); + sMessage += OString::number( _nMode, 16 ).toAsciiUpperCase(); OSL_FAIL( sMessage.getStr() ); #endif StorageContainer::throwJavaException(e,env); diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index 0458ad7d5af4..59a4b29b46f3 100644 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx @@ -389,7 +389,7 @@ void SAL_CALL java_sql_PreparedStatement::setObject( sal_Int32 parameterIndex, c { const OUString sError( m_pConnection->getResources().getResourceStringWithSubstitution( STR_UNKNOWN_PARA_TYPE, - "$position$", OUString::valueOf(parameterIndex) + "$position$", OUString::number(parameterIndex) ) ); ::dbtools::throwGenericSQLException(sError,*this); } diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index 6664ee0e21d8..34526cacdbde 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -842,7 +842,7 @@ void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::c ::connectivity::SharedResources aResources; const OUString sError( aResources.getResourceStringWithSubstitution( STR_UNKNOWN_COLUMN_TYPE, - "$position$", OUString::valueOf(columnIndex) + "$position$", OUString::number(columnIndex) ) ); ::dbtools::throwGenericSQLException(sError,*this); } diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx index 1f7e8798e40f..a850bdec26dd 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx @@ -654,13 +654,13 @@ OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, Runti // ------------------------------------------------------------------------- OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { - OUString aValue = OUString::valueOf((sal_Int32)1); + OUString aValue = OUString::number(1); return aValue; } // ------------------------------------------------------------------------- OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { - OUString aValue = OUString::valueOf((sal_Int32)0); + OUString aValue = OUString::number(0); return aValue; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index 7486f3f3c54a..c439d05d5c9d 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -936,7 +936,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; @@ -1787,7 +1787,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)) @@ -1800,7 +1800,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); } diff --git a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx index 5d234c445ea4..c0e4f0dfc9cb 100644 --- a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx @@ -932,8 +932,8 @@ void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex) { ::connectivity::SharedResources aResources; const OUString sError( aResources.getResourceStringWithSubstitution(STR_WRONG_PARAM_INDEX, - "$pos$", OUString::valueOf(_parameterIndex), - "$count$", OUString::valueOf((sal_Int32)numParams) + "$pos$", OUString::number(_parameterIndex), + "$count$", OUString::number(numParams) )); SQLException aNext(sError,*this, OUString(),0,Any()); diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx index 365f9205bbcb..8e442f2e4c42 100644 --- a/connectivity/source/drivers/odbcbase/OTools.cxx +++ b/connectivity/source/drivers/odbcbase/OTools.cxx @@ -209,7 +209,7 @@ void OTools::bindValue( OConnection* _pConnection, case SQL_DECIMAL: case SQL_NUMERIC: { - OString aString = OString::valueOf(*(double*)_pValue); + OString aString = OString::number(*(double*)_pValue); _nMaxLen = (SQLSMALLINT)aString.getLength(); *pLen = _nMaxLen; *((OString*)_pData) = aString; diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index 2442bbaab290..8ec5b6beec61 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -1635,12 +1635,12 @@ static void columnMetaData2DatabaseTypeDescription( // row[9] RADIX TODO if( xRow->getBoolean( 6 ) && ! isSystemColumn(xRow->getInt( 12 )) ) { - row[10] <<= OUString::valueOf(com::sun::star::sdbc::ColumnValue::NO_NULLS); + row[10] <<= OUString::number(com::sun::star::sdbc::ColumnValue::NO_NULLS); row[17] <<= statics.NO; } else { - row[10] <<= OUString::valueOf(com::sun::star::sdbc::ColumnValue::NULLABLE); + row[10] <<= OUString::number(com::sun::star::sdbc::ColumnValue::NULLABLE); row[17] <<= statics.YES; } @@ -1865,7 +1865,7 @@ static void columnMetaData2DatabaseTypeDescription( if( tableOid != lastTableOid ) index = 1; lastTableOid = tableOid; - row[4] <<= OUString::valueOf( index ); + row[4] <<= OUString::number( index ); index ++; } { @@ -2305,14 +2305,14 @@ static void pgTypeInfo2ResultSet( } row[TYPE_NAME] <<= xRow->getString(1); - row[DATA_TYPE] <<= OUString::valueOf(dataType); - row[PRECISION] <<= OUString::valueOf( precision ); + row[DATA_TYPE] <<= OUString::number(dataType); + row[PRECISION] <<= OUString::number( precision ); sal_Int32 nullable = xRow->getBoolean(4) ? com::sun::star::sdbc::ColumnValue::NO_NULLS : com::sun::star::sdbc::ColumnValue::NULLABLE; - row[NULLABLE] <<= OUString::valueOf(nullable); - row[CASE_SENSITIVE] <<= OUString::valueOf((sal_Int32)1); - row[SEARCHABLE] <<= OUString::valueOf( calcSearchable( dataType ) ); + row[NULLABLE] <<= OUString::number(nullable); + row[CASE_SENSITIVE] <<= OUString::number(1); + row[SEARCHABLE] <<= OUString::number( calcSearchable( dataType ) ); row[UNSIGNED_ATTRIBUTE] <<= OUString("0"); // if( com::sun::star::sdbc::DataType::INTEGER == dataType || com::sun::star::sdbc::DataType::BIGINT == dataType ) @@ -2320,7 +2320,7 @@ static void pgTypeInfo2ResultSet( else row[AUTO_INCREMENT] <<= OUString("0"); // TODO row[MINIMUM_SCALE] <<= OUString("0"); // TODO: what is this ? - row[MAXIMUM_SCALE] <<= OUString::valueOf( getMaxScale( dataType ) ); + row[MAXIMUM_SCALE] <<= OUString::number( getMaxScale( dataType ) ); row[NUM_PREC_RADIX] <<= OUString("10"); // TODO: what is this ? (void)FIXED_PREC_SCALE; vec.push_back( row ); diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index fb82b9907089..23ef836b16ac 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -668,7 +668,7 @@ void PreparedStatement::setObjectWithInfo( OUString myString; if( x >>= myDouble ) { - myString = OUString::valueOf( myDouble ); + myString = OUString::number( myDouble ); } else { diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx index ec000a54e354..b0d1c74a5629 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx @@ -462,7 +462,7 @@ void UpdateableResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw // buf.append( "'" ); // buf.append( (sal_Int64) x ); // buf.append( "'" ); - m_updateableField[columnIndex-1].value <<= OUString::valueOf( x ); + m_updateableField[columnIndex-1].value <<= OUString::number( x ); } void UpdateableResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw (SQLException, RuntimeException) @@ -472,7 +472,7 @@ void UpdateableResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw (S checkClosed(); checkUpdate( columnIndex ); - m_updateableField[columnIndex-1].value <<= OUString::valueOf( x ); + m_updateableField[columnIndex-1].value <<= OUString::number( x ); } void UpdateableResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw (SQLException, RuntimeException) @@ -481,7 +481,7 @@ void UpdateableResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw checkClosed(); checkUpdate( columnIndex ); - m_updateableField[columnIndex-1].value <<= OUString::valueOf( x ); + m_updateableField[columnIndex-1].value <<= OUString::number( x ); } void UpdateableResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw (SQLException, RuntimeException) diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx index 60ed5b0658ae..d687b6913bbb 100644 --- a/connectivity/source/parse/PColumn.cxx +++ b/connectivity/source/parse/PColumn.cxx @@ -138,7 +138,7 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe sal_Int32 searchIndex=1; while(_rColumns.find(sAlias) != _rColumns.end()) { - (sAlias = sLabel) += OUString::valueOf(searchIndex++); + (sAlias = sLabel) += OUString::number(searchIndex++); } sLabel = sAlias; } diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 12b44805f22e..1237120d07ed 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -1141,7 +1141,7 @@ namespace { if ( _rParentNode.getChild(i) == &_rParamNode ) { - sColumnName += OUString::valueOf( i+1 ); + sColumnName += OUString::number( i+1 ); break; } } @@ -1854,7 +1854,7 @@ OUString OSQLParseTreeIterator::getUniqueColumnName(const OUString & rColumnName sal_Int32 i=1; while(aIter != m_aSelectColumns->get().end()) { - (aAlias = rColumnName) += OUString::valueOf(i++); + (aAlias = rColumnName) += OUString::number(i++); aIter = find( m_aSelectColumns->get().begin(), m_aSelectColumns->get().end(), diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 1c748abae7b2..db004873a733 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1150,7 +1150,7 @@ OUString OSQLParser::stringToDouble(const OUString& _rValue,sal_Int16 _nScale) ParseResult aResult = m_xCharClass->parsePredefinedToken(KParseType::ANY_NUMBER,_rValue,0,m_pData->aLocale,0,OUString(),KParseType::ANY_NUMBER,OUString()); if((aResult.TokenType & KParseType::IDENTNAME) && aResult.EndPos == _rValue.getLength()) { - aValue = OUString::valueOf(aResult.Value); + aValue = OUString::number(aResult.Value); sal_Int32 nPos = aValue.lastIndexOf('.'); if((nPos+_nScale) < aValue.getLength()) aValue = aValue.replaceAt(nPos+_nScale,aValue.getLength()-nPos-_nScale,OUString()); diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index 2bf53267d2b7..bbed1713d2ca 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -310,7 +310,7 @@ Any SAL_CALL OCollection::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsEx { ::osl::MutexGuard aGuard(m_rMutex); if (Index < 0 || Index >= m_pElements->size() ) - throw IndexOutOfBoundsException(OUString::valueOf(Index),static_cast<XTypeProvider*>(this)); + throw IndexOutOfBoundsException(OUString::number(Index),static_cast<XTypeProvider*>(this)); return makeAny(getObject(Index)); } @@ -413,7 +413,7 @@ void SAL_CALL OCollection::dropByIndex( sal_Int32 index ) throw(SQLException, In { ::osl::MutexGuard aGuard(m_rMutex); if(index <0 || index >= getCount()) - throw IndexOutOfBoundsException(OUString::valueOf(index),static_cast<XTypeProvider*>(this)); + throw IndexOutOfBoundsException(OUString::number(index),static_cast<XTypeProvider*>(this)); dropImpl(index); } |