From 692aa127680a45edc98d94a06117535bca7cf643 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Tue, 8 Oct 2019 16:18:47 +0000 Subject: [PATCH] fpspreadsheet: Reduce max count of digits in general number format (15 --> 14, like in Calc, Excel only has 9) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7153 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/fpsnumformat.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/source/common/fpsnumformat.pas b/components/fpspreadsheet/source/common/fpsnumformat.pas index 2e9d1d674..d846d9138 100644 --- a/components/fpspreadsheet/source/common/fpsnumformat.pas +++ b/components/fpspreadsheet/source/common/fpsnumformat.pas @@ -1113,8 +1113,9 @@ end; function GeneralFormatFloat(AValue: Double; AFormatSettings: TFormatSettings): String; begin - Result := FloatToStrF(AValue, ffGeneral, 16, 16, AFormatSettings); - // 16 is for best rounding results + Result := FloatToStrF(AValue, ffGeneral, 15, 15, AFormatSettings); + // 15 is for best rounding results. + // Note: Still more than Excel whichrounds pi to 9 digits only. end;