fpspreadsheet: Prev commit was not good, now ok. Also: Fix fraction formats with explicit denominator (such as "#/32").

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4159 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-05-29 17:30:43 +00:00
parent f014686438
commit 7a1caea387
2 changed files with 5 additions and 4 deletions

View File

@ -317,6 +317,8 @@ begin
section^.FracNumerator := section^.Elements[el].IntValue;
nftFracDenomSpaceDigit, nftFracDenomZeroDigit:
section^.FracDenominator := section^.Elements[el].IntValue;
nftFracDenom:
section^.FracDenominator := -section^.Elements[el].IntValue;
nftPercent:
section^.Kind := section^.Kind + [nfkPercent];
nftExpChar:

View File

@ -2579,15 +2579,14 @@ begin
AIndex := j;
if UseThSep then
begin
AIndex := j + 1;
// AIndex := j + 1;
j := Length(Result) - 2;
while (j > 1) and (Result[j-1] <> ' ') and (Result[j] <> ' ') do
begin
Insert(fs.ThousandSeparator, Result, j);
dec(j, 3);
end;
end else
AIndex := j;
end;
end;
end;
@ -2729,7 +2728,7 @@ begin
frnum := round(AValue*frdenom);
end;
sfrint := ProcessIntegerFormat(IntToStr(frint), fs, AElements, i,
INT_TOKENS, false, (AElements[i].Token = nftIntTh));
INT_TOKENS + [nftIntTh], false, (AElements[i].Token = nftIntTh));
while (i < numEl) and (AElements[i].Token in TERMINATING_TOKENS) do
begin
sintnumspace := sintnumspace + AElements[i].TextValue;