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
This commit is contained in:
wp_xxyyzz
2015-04-20 11:20:09 +00:00
parent cd397b64d5
commit 249c483503

View File

@ -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