sc/source/core/tool/interpr8.cxx | 48 +++++++-------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-)
New commits: commit be2cf3d28b91cff4127c95cfe4481f36bdeb24fb Author: Eike Rathke <er...@redhat.com> Date: Tue Jun 14 19:58:31 2016 +0200 do not use OUString::number() to "format" numeric values Change-Id: Ie35a34152556e19eff1f196ddd0ddd51a6da1a23 diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx index a94cd03..b62fb59 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits