diff options
author | Eike Rathke <erack@redhat.com> | 2016-06-14 19:58:31 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-14 19:59:45 +0200 |
commit | be2cf3d28b91cff4127c95cfe4481f36bdeb24fb (patch) | |
tree | 06e8811501b5366af034662713ceb5613a619345 /sc | |
parent | 5b562504fa8beb69b3322baae221269d93610d46 (diff) |
do not use OUString::number() to "format" numeric values
Change-Id: Ie35a34152556e19eff1f196ddd0ddd51a6da1a23
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr8.cxx | 48 |
1 files changed, 9 insertions, 39 deletions
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx index a94cd032ed02..b62fb59cde30 100644 --- a/sc/source/core/tool/interpr8.cxx +++ b/sc/source/core/tool/interpr8.cxx @@ -1416,17 +1416,12 @@ void ScInterpreter::ScConcat_MS() ScRefCellValue aCell( *pDok, aAdr ); if ( !aCell.isEmpty() ) { - if ( aCell.hasString() ) + if ( !aCell.hasEmptyValue() ) { svl::SharedString aSS; GetCellString( aSS, aCell); aResBuf.append( aSS.getString()); } - else - { - if ( !aCell.hasEmptyValue() ) - aResBuf.append( OUString::number( GetCellValue( aAdr, aCell))); - } } } break; @@ -1462,17 +1457,12 @@ void ScInterpreter::ScConcat_MS() ScRefCellValue aCell( *pDok, aAdr ); if ( !aCell.isEmpty() ) { - if ( aCell.hasString() ) + if ( !aCell.hasEmptyValue() ) { svl::SharedString aSS; GetCellString( aSS, aCell); aResBuf.append( aSS.getString()); } - else - { - if ( !aCell.hasEmptyValue() ) - aResBuf.append( OUString::number( GetCellValue( aAdr, aCell))); - } } } } @@ -1500,7 +1490,7 @@ void ScInterpreter::ScConcat_MS() else { if ( pMat->IsValue( j, k ) ) - aResBuf.append( OUString::number( pMat->GetDouble( j, k ) ) ); + aResBuf.append( pMat->GetString( *pFormatter, j, k ).getString() ); } } } @@ -1544,17 +1534,12 @@ void ScInterpreter::ScTextJoin_MS() ScRefCellValue aCell( *pDok, aAdr ); if ( !aCell.isEmpty() ) { - if ( aCell.hasString() ) + if ( !aCell.hasEmptyValue() ) { svl::SharedString aSS; GetCellString( aSS, aCell); aDelimiters.push_back( aSS.getString()); } - else - { - if ( !aCell.hasEmptyValue() ) - aDelimiters.push_back( OUString::number( GetCellValue( aAdr, aCell))); - } } } break; @@ -1590,17 +1575,12 @@ void ScInterpreter::ScTextJoin_MS() ScRefCellValue aCell( *pDok, aAdr ); if ( !aCell.isEmpty() ) { - if ( aCell.hasString() ) + if ( !aCell.hasEmptyValue() ) { svl::SharedString aSS; GetCellString( aSS, aCell); aDelimiters.push_back( aSS.getString()); } - else - { - if ( !aCell.hasEmptyValue() ) - aDelimiters.push_back( OUString::number( GetCellValue( aAdr, aCell))); - } } else aDelimiters.push_back( "" ); @@ -1632,7 +1612,7 @@ void ScInterpreter::ScTextJoin_MS() else { if ( pMat->IsValue( j, k ) ) - aDelimiters.push_back( OUString::number( pMat->GetDouble( j, k ) ) ); + aDelimiters.push_back( pMat->GetString( *pFormatter, j, k ).getString() ); } } else @@ -1697,17 +1677,12 @@ void ScInterpreter::ScTextJoin_MS() OUString aStr; if ( !aCell.isEmpty() ) { - if ( aCell.hasString() ) + if ( !aCell.hasEmptyValue() ) { svl::SharedString aSS; GetCellString( aSS, aCell); aStr = aSS.getString(); } - else - { - if ( !aCell.hasEmptyValue() ) - aStr = OUString::number( GetCellValue( aAdr, aCell)); - } } else aStr.clear(); @@ -1761,17 +1736,12 @@ void ScInterpreter::ScTextJoin_MS() ScRefCellValue aCell( *pDok, aAdr ); if ( !aCell.isEmpty() ) { - if ( aCell.hasString() ) + if ( !aCell.hasEmptyValue() ) { svl::SharedString aSS; GetCellString( aSS, aCell); aStr = aSS.getString(); } - else - { - if ( !aCell.hasEmptyValue() ) - aStr = OUString::number( GetCellValue( aAdr, aCell)); - } } else aStr.clear(); @@ -1819,7 +1789,7 @@ void ScInterpreter::ScTextJoin_MS() else { if ( pMat->IsValue( j, k ) ) - aStr = OUString::number( pMat->GetDouble( j, k ) ); + aStr = pMat->GetString( *pFormatter, j, k ).getString(); } } else |