You've already forked lazarus-ccr
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:
@@ -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;
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user