fpspreadsheet: Fix incorrect usage of single-cell defined names.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9406 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
7980b028b0
commit
b3deb7c0f6
@ -44,7 +44,7 @@ begin
|
||||
// Defined name in other sheet
|
||||
ws := wb.AddWorksheet('Range from other sheet');
|
||||
|
||||
wb.DefinedNames.Add('data', wsIdx1, wsIdx1, 1, 0, 3, 0); // wsIdx refers to sheet "Range"
|
||||
wb.DefinedNames.Add('data', wsIdx1, wsIdx1, 1, 0, 3, 0); // wsIdx1 refers to sheet "Range"
|
||||
ws.WriteFormula(4, 0, '=SUM(data)');
|
||||
|
||||
{----------}
|
||||
|
@ -419,6 +419,7 @@ type
|
||||
public
|
||||
function ArgumentCount: Integer;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
property AsCellRange: TsCellRange3D read GetAscellRange write SetAsCellRange;
|
||||
property AsFloat: TsExprFloat Read GetAsFloat Write SetAsFloat;
|
||||
property AsInteger: Int64 Read GetAsInteger Write SetAsInteger;
|
||||
property AsString: String Read GetAsString Write SetAsString;
|
||||
@ -3990,12 +3991,14 @@ procedure TsIdentifierExprNode.GetNodeValue(out AResult: TsExpressionResult);
|
||||
begin
|
||||
Result := true;
|
||||
if (ARow1 = ARow2) and (ACol1 = ACol2) then exit;
|
||||
{ // I think this is wrong...
|
||||
cell := ASheet1.FindCell(ARow1, ACol1);
|
||||
if (cell <> nil) and (cell^.ContentType = cctUTF8String) then
|
||||
begin
|
||||
if (ARow1 = ARow2) and (ACol2 = ACol1 + 1) then exit;
|
||||
if (ACol1 = ACol2) and (ARow2 = ARow1 + 1) then exit;
|
||||
end;
|
||||
}
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user