From 249c4835037fbf1b0cdf07433ef946901a7ac41b Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 20 Apr 2015 11:20:09 +0000 Subject: [PATCH] fpspreadsheet: Remove no-longer-needed method "Localize" of TsNumFormatParser git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4090 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../fpspreadsheet/fpsnumformatparser.pas | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/components/fpspreadsheet/fpsnumformatparser.pas b/components/fpspreadsheet/fpsnumformatparser.pas index 84f390ca1..3afa25b05 100644 --- a/components/fpspreadsheet/fpsnumformatparser.pas +++ b/components/fpspreadsheet/fpsnumformatparser.pas @@ -31,7 +31,6 @@ type TsNumFormatParser = class private - FCreateMethod: Byte; FToken: Char; FCurrent: PChar; FStart: PChar; @@ -105,7 +104,6 @@ type function IsDateTimeFormat: Boolean; function IsTimeFormat: Boolean; procedure LimitDecimals; - procedure Localize; property CurrencySymbol: String read GetCurrencySymbol; property Decimals: Byte read GetDecimals write SetDecimals; @@ -134,7 +132,6 @@ constructor TsNumFormatParser.Create(AWorkbook: TsWorkbook; const AFormatString: String); begin inherited Create; - FCreateMethod := 0; FWorkbook := AWorkbook; Parse(AFormatString); CheckSections; @@ -828,28 +825,6 @@ begin FSections[j].Elements[i].IntValue := 2; end; -{ Localizes the thousand- and decimal separator symbols by replacing them with - the FormatSettings value of the workbook. A recreated format string will be - localized as required by Excel2. } -procedure TsNumFormatParser.Localize; -var - i, j: Integer; - fs: TFormatSettings; - txt: String; -begin - fs := FWorkbook.FormatSettings; - for j:=0 to High(FSections) do - for i:=0 to High(FSections[j].Elements) do begin - txt := FSections[j].Elements[i].TextValue; - case FSections[j].Elements[i].Token of - nftThSep : txt := fs.ThousandSeparator; - nftDecSep : txt := fs.DecimalSeparator; - nftCurrSymbol: txt := UTF8ToAnsi(txt); - end; - FSections[j].Elements[i].TextValue := txt; - end; -end; - function TsNumFormatParser.NextToken: Char; begin if FCurrent < FEnd then begin