fpspreadsheet: Add support for xls one-parameter SUM formulas.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6031 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-10-04 12:36:16 +00:00
parent 8ddf7321f2
commit 709be76b4f
3 changed files with 15 additions and 2 deletions

View File

@@ -2064,6 +2064,9 @@ begin
destCol^.Col := AToCol;
// ... and copy the format record - it may have be missing at destination
CopyColFormat(srcCol, destCol, AFromWorksheet, self);
// Notify visual controls of changes
ChangedCol(destCol^.Col);
end;
{@@ ----------------------------------------------------------------------------

View File

@@ -983,7 +983,8 @@ function TsSpreadBIFF2Reader.ReadRPNAttr(AStream: TStream; AIdentifier: Byte): B
begin
Result := false;
case AIdentifier of
$01: AStream.ReadByte; // tAttrVolatile
$01: AStream.ReadByte; // tAttrVolatile, data not used
$10: AStream.ReadByte; // tAttrSum, data not used
else exit; // others not supported by fpspreadsheet --> Result = false
end;
Result := true;

View File

@@ -2277,7 +2277,8 @@ function TsSpreadBIFFReader.ReadRPNAttr(AStream: TStream; AIdentifier: Byte): Bo
begin
Result := false;
case AIdentifier of
$01: AStream.ReadWord; // tAttrVolatile token
$01: AStream.ReadWord; // tAttrVolatile token, data not used
$10: AStream.ReadWord; // tAttrSum token, data not used
else exit; // others not supported by fps --> Result = false
end;
Result := true;
@@ -2644,6 +2645,14 @@ begin
begin
b := AStream.ReadByte;
supported := ReadRPNAttr(AStream, b);
if supported then begin
case b of
$10:
begin // one-parameter sum
rpnItem := RPNFunc('SUM', 1, rpnItem)
end;
end;
end;
end;
INT_EXCEL_TOKEN_TREFV:
begin