From 758a46563d1c5b1344f72c3667e01dea32b9c5ad Mon Sep 17 00:00:00 2001 From: Joshy Date: Sat, 14 Nov 2009 18:48:17 +0000 Subject: [PATCH] Fixes 2897681 and 2897708 reported by Luiz Camara. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1007 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/fpsopendocument.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/fpsopendocument.pas b/components/fpspreadsheet/fpsopendocument.pas index 9f919cff4..ce05befb0 100755 --- a/components/fpspreadsheet/fpsopendocument.pas +++ b/components/fpspreadsheet/fpsopendocument.pas @@ -544,14 +544,16 @@ procedure TsSpreadOpenDocWriter.WriteNumber(AStream: TStream; const ARow, var StrValue: string; DisplayStr: string; + FSettings: TFormatSettings; begin // The row should already be the correct one if IsInfinite(AValue) then begin StrValue:='1.#INF'; DisplayStr:='1.#INF'; end else begin - Str(AValue, StrValue); - DisplayStr:=FloatToStr(AValue); + FSettings.DecimalSeparator:='.'; + StrValue:=FloatToStr(AValue,FSettings); //Uses '.' as decimal separator + DisplayStr:=FloatToStr(AValue); // Uses locale decimal separator end; FContent := FContent + ' ' + LineEnding +