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:
parent
cd397b64d5
commit
249c483503
@ -31,7 +31,6 @@ type
|
|||||||
|
|
||||||
TsNumFormatParser = class
|
TsNumFormatParser = class
|
||||||
private
|
private
|
||||||
FCreateMethod: Byte;
|
|
||||||
FToken: Char;
|
FToken: Char;
|
||||||
FCurrent: PChar;
|
FCurrent: PChar;
|
||||||
FStart: PChar;
|
FStart: PChar;
|
||||||
@ -105,7 +104,6 @@ type
|
|||||||
function IsDateTimeFormat: Boolean;
|
function IsDateTimeFormat: Boolean;
|
||||||
function IsTimeFormat: Boolean;
|
function IsTimeFormat: Boolean;
|
||||||
procedure LimitDecimals;
|
procedure LimitDecimals;
|
||||||
procedure Localize;
|
|
||||||
|
|
||||||
property CurrencySymbol: String read GetCurrencySymbol;
|
property CurrencySymbol: String read GetCurrencySymbol;
|
||||||
property Decimals: Byte read GetDecimals write SetDecimals;
|
property Decimals: Byte read GetDecimals write SetDecimals;
|
||||||
@ -134,7 +132,6 @@ constructor TsNumFormatParser.Create(AWorkbook: TsWorkbook;
|
|||||||
const AFormatString: String);
|
const AFormatString: String);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
FCreateMethod := 0;
|
|
||||||
FWorkbook := AWorkbook;
|
FWorkbook := AWorkbook;
|
||||||
Parse(AFormatString);
|
Parse(AFormatString);
|
||||||
CheckSections;
|
CheckSections;
|
||||||
@ -828,28 +825,6 @@ begin
|
|||||||
FSections[j].Elements[i].IntValue := 2;
|
FSections[j].Elements[i].IntValue := 2;
|
||||||
end;
|
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;
|
function TsNumFormatParser.NextToken: Char;
|
||||||
begin
|
begin
|
||||||
if FCurrent < FEnd then begin
|
if FCurrent < FEnd then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user