diff options
Diffstat (limited to 'vcl/source/control/field.cxx')
-rw-r--r-- | vcl/source/control/field.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 0bd9ebab713e..3de0eaf50165 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -314,8 +314,7 @@ bool ImplNumericGetValue( const OUString& rStr, sal_Int64& rValue, sal_Int64 nDenom = o3tl::toInt64(aStrDenom); if (nDenom == 0) return false; // Division by zero double nFrac2Dec = nWholeNum + static_cast<double>(nNum)/nDenom; // Convert to double for floating point precision - OUStringBuffer aStrFrac; - aStrFrac.append(nFrac2Dec); + OUStringBuffer aStrFrac(OUString::number(nFrac2Dec)); // Reconvert division result to string and parse nDecPos = aStrFrac.indexOf('.'); if ( nDecPos >= 0) @@ -383,14 +382,12 @@ void ImplUpdateSeparatorString( OUString& io_rText, || (nIndexTh != -1 && nIndexDec == -1) ) { - aBuf.append( pBuffer + nIndex, nIndexTh - nIndex ); - aBuf.append( rNewThSep ); + aBuf.append( OUString::Concat(std::u16string_view(pBuffer + nIndex, nIndexTh - nIndex )) + rNewThSep ); nIndex = nIndexTh + rOldThSep.size(); } else if( nIndexDec != -1 ) { - aBuf.append( pBuffer + nIndex, nIndexDec - nIndex ); - aBuf.append( rNewDecSep ); + aBuf.append( OUString::Concat(std::u16string_view(pBuffer + nIndex, nIndexDec - nIndex )) + rNewDecSep ); nIndex = nIndexDec + rOldDecSep.size(); } else |