You've already forked lazarus-ccr
fpspreadsheet: Less hints
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4051 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -24,20 +24,20 @@ type
|
||||
protected
|
||||
FCurrentNode: TAVLTreeNode;
|
||||
FTree: TsRowColAVLTree;
|
||||
FStartRow, FEndRow, FStartCol, FEndCol: Cardinal;
|
||||
FStartRow, FEndRow, FStartCol, FEndCol: LongInt;
|
||||
FDone: Boolean;
|
||||
FReverse: Boolean;
|
||||
function GetCurrent: PsRowCol;
|
||||
public
|
||||
constructor Create(ATree: TsRowColAVLTree;
|
||||
AStartRow, AStartCol, AEndRow, AEndCol: Cardinal; AReverse: Boolean);
|
||||
AStartRow, AStartCol, AEndRow, AEndCol: LongInt; AReverse: Boolean);
|
||||
function GetEnumerator: TsRowColEnumerator; inline;
|
||||
function MoveNext: Boolean;
|
||||
property Current: PsRowCol read GetCurrent;
|
||||
property StartRow: Cardinal read FStartRow;
|
||||
property EndRow: Cardinal read FEndRow;
|
||||
property StartCol: Cardinal read FStartCol;
|
||||
property EndCol: Cardinal read FEndCol;
|
||||
property StartRow: LongInt read FStartRow;
|
||||
property EndRow: LongInt read FEndRow;
|
||||
property StartCol: LongInt read FStartCol;
|
||||
property EndCol: LongInt read FEndCol;
|
||||
end;
|
||||
|
||||
{ TsRowColAVLTree }
|
||||
@ -197,7 +197,7 @@ end;
|
||||
{******************************************************************************}
|
||||
|
||||
constructor TsRowColEnumerator.Create(ATree: TsRowColAVLTree;
|
||||
AStartRow, AStartCol, AEndRow, AEndCol: Cardinal; AReverse: Boolean);
|
||||
AStartRow, AStartCol, AEndRow, AEndCol: LongInt; AReverse: Boolean);
|
||||
var
|
||||
node: TAVLTreeNode;
|
||||
begin
|
||||
@ -224,6 +224,7 @@ begin
|
||||
if FEndRow = $7FFFFFFF then
|
||||
begin
|
||||
node := FTree.FindHighest;
|
||||
if node <> nil then
|
||||
FEndRow := PsRowCol(node.Data)^.Row;
|
||||
end;
|
||||
end;
|
||||
|
@ -1601,9 +1601,8 @@ end;
|
||||
procedure TsWorksheet.WriteHyperlink(ACell: PCell; ATarget: String;
|
||||
ATooltip: String = '');
|
||||
var
|
||||
hyperlink: PsHyperlink;
|
||||
fmt: TsCellFormat;
|
||||
target, bm, fn, displayTxt: String;
|
||||
target, bm, displayTxt: String;
|
||||
begin
|
||||
if ACell = nil then
|
||||
exit;
|
||||
@ -1613,20 +1612,19 @@ begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
hyperlink := FHyperlinks.AddHyperlink(ACell^.Row, ACell^.Col, ATarget, ATooltip);
|
||||
FHyperlinks.AddHyperlink(ACell^.Row, ACell^.Col, ATarget, ATooltip);
|
||||
Include(ACell^.Flags, cfHyperlink);
|
||||
|
||||
if ACell^.ContentType = cctEmpty then
|
||||
begin
|
||||
SplitHyperlink(ATarget, target, bm);
|
||||
displayTxt := ATarget;
|
||||
if pos('file:', lowercase(displayTxt))=1 then
|
||||
if pos('file:', lowercase(ATarget))=1 then
|
||||
begin
|
||||
URIToFilename(displayTxt, displayTxt);
|
||||
// Delete(displayTxt, 1, Length('file:///'));
|
||||
URIToFilename(target, displayTxt);
|
||||
ForcePathDelims(displayTxt);
|
||||
if bm <> '' then displayTxt := fn + '#' + bm;
|
||||
end;
|
||||
if bm <> '' then displayTxt := displayTxt + '#' + bm;
|
||||
end else
|
||||
displayTxt := ATarget;
|
||||
ACell^.ContentType := cctUTF8String;
|
||||
ACell^.UTF8StringValue := displayTxt;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user