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
This commit is contained in:
Joshy
2009-11-14 18:48:17 +00:00
parent cafe31ad59
commit 758a46563d

View File

@ -544,14 +544,16 @@ procedure TsSpreadOpenDocWriter.WriteNumber(AStream: TStream; const ARow,
var var
StrValue: string; StrValue: string;
DisplayStr: string; DisplayStr: string;
FSettings: TFormatSettings;
begin begin
// The row should already be the correct one // The row should already be the correct one
if IsInfinite(AValue) then begin if IsInfinite(AValue) then begin
StrValue:='1.#INF'; StrValue:='1.#INF';
DisplayStr:='1.#INF'; DisplayStr:='1.#INF';
end else begin end else begin
Str(AValue, StrValue); FSettings.DecimalSeparator:='.';
DisplayStr:=FloatToStr(AValue); StrValue:=FloatToStr(AValue,FSettings); //Uses '.' as decimal separator
DisplayStr:=FloatToStr(AValue); // Uses locale decimal separator
end; end;
FContent := FContent + FContent := FContent +
' <table:table-cell office:value-type="float" office:value="' + StrValue + '">' + LineEnding + ' <table:table-cell office:value-type="float" office:value="' + StrValue + '">' + LineEnding +