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
|
// Defined name in other sheet
|
||||||
ws := wb.AddWorksheet('Range from 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)');
|
ws.WriteFormula(4, 0, '=SUM(data)');
|
||||||
|
|
||||||
{----------}
|
{----------}
|
||||||
|
@ -419,6 +419,7 @@ type
|
|||||||
public
|
public
|
||||||
function ArgumentCount: Integer;
|
function ArgumentCount: Integer;
|
||||||
procedure Assign(Source: TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
|
property AsCellRange: TsCellRange3D read GetAscellRange write SetAsCellRange;
|
||||||
property AsFloat: TsExprFloat Read GetAsFloat Write SetAsFloat;
|
property AsFloat: TsExprFloat Read GetAsFloat Write SetAsFloat;
|
||||||
property AsInteger: Int64 Read GetAsInteger Write SetAsInteger;
|
property AsInteger: Int64 Read GetAsInteger Write SetAsInteger;
|
||||||
property AsString: String Read GetAsString Write SetAsString;
|
property AsString: String Read GetAsString Write SetAsString;
|
||||||
@ -3990,12 +3991,14 @@ procedure TsIdentifierExprNode.GetNodeValue(out AResult: TsExpressionResult);
|
|||||||
begin
|
begin
|
||||||
Result := true;
|
Result := true;
|
||||||
if (ARow1 = ARow2) and (ACol1 = ACol2) then exit;
|
if (ARow1 = ARow2) and (ACol1 = ACol2) then exit;
|
||||||
|
{ // I think this is wrong...
|
||||||
cell := ASheet1.FindCell(ARow1, ACol1);
|
cell := ASheet1.FindCell(ARow1, ACol1);
|
||||||
if (cell <> nil) and (cell^.ContentType = cctUTF8String) then
|
if (cell <> nil) and (cell^.ContentType = cctUTF8String) then
|
||||||
begin
|
begin
|
||||||
if (ARow1 = ARow2) and (ACol2 = ACol1 + 1) then exit;
|
if (ARow1 = ARow2) and (ACol2 = ACol1 + 1) then exit;
|
||||||
if (ACol1 = ACol2) and (ARow2 = ARow1 + 1) then exit;
|
if (ACol1 = ACol2) and (ARow2 = ARow1 + 1) then exit;
|
||||||
end;
|
end;
|
||||||
|
}
|
||||||
Result := false;
|
Result := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user