IDE, LCL: Formatting.

This commit is contained in:
Juha 2023-05-15 00:58:50 +03:00
parent 6e1adda721
commit 65d888e286
3 changed files with 21 additions and 23 deletions

View File

@ -706,7 +706,6 @@ begin
exit;
end;
end;
SearchPos:= TLazSearchMatchPos.Create;
SearchPos.MatchStart:=MatchStart;
SearchPos.MatchLen:=MatchLen;
@ -771,28 +770,27 @@ begin
end;
procedure TSearchResultsView.Parse_Search_Phrases(var slPhrases: TStrings);
var i, iLength: Integer;
sPhrases, sPhrase: string;
var
i, iLength: Integer;
sPhrases, sPhrase: string;
begin
//Parse Phrases
sPhrases := SearchInListEdit.Text;
iLength := Length(sPhrases);
sPhrase := '';
for i:=1 to iLength do
//Parse Phrases
sPhrases := SearchInListEdit.Text;
iLength := Length(sPhrases);
sPhrase := '';
for i:=1 to iLength do
begin
if ((sPhrases[i] = ' ') or (sPhrases[i] = ',') or (i = iLength)) then
if ((sPhrases[i] = ' ') or (sPhrases[i] = ',') or (i = iLength)) then
begin
if not ((sPhrases[i] = ' ') or (sPhrases[i] = ',')) then
if not ((sPhrases[i] = ' ') or (sPhrases[i] = ',')) then
sPhrase := sPhrase + sPhrases[i];
if (sPhrase > ' ') then
slPhrases.Add(UpperCase(sPhrase)); //End of phrase, add to phrase list
sPhrase := '';//Reset sPhrase
end
else if (sPhrases[i] > ' ') then
sPhrase := sPhrase + sPhrases[i];
if (sPhrase > ' ') then
slPhrases.Add(UpperCase(sPhrase));//End of phrase, add to phrase list
sPhrase := '';//Reset sPhrase
end else
begin
if (sPhrases[i] > ' ') then
sPhrase := sPhrase + sPhrases[i];
end;//End if ((sPhrases[i] = ' ') or (sPhrases[i] = ','))
end;//End for-loop i
end; //End for-loop i
end;
procedure TSearchResultsView.ResultsNoteBookChanging(Sender: TObject;
@ -1347,7 +1345,7 @@ begin
end;
ChildNode := Items.AddChild(Node, Line);
Node.Expanded:=true;
Node.Expanded := true;
ChildNode.Data := MatchPos;
end;

View File

@ -444,7 +444,7 @@ begin
end;
procedure TToolBarConfig.AddToolBarItem(CmdItem: TIDEButtonCommand);
Var
var
Node: TTreeNode;
lvItem: TListItem;
begin

View File

@ -1166,7 +1166,7 @@ type
Partial, Inclusive, Wrap: Boolean;
PartStart: Boolean = True): TListItem;
function FindData(const AData: Pointer): TListItem; overload;
function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem; overload;
function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem; overload;
function GetEnumerator: TListItemsEnumerator;
function IndexOf(const AItem: TListItem): Integer;
function Insert(const AIndex: Integer) : TListItem;
@ -1618,7 +1618,7 @@ type
procedure Repaint; override;
function FindCaption(StartIndex: Integer; Value: string;
Partial, Inclusive, Wrap: Boolean; PartStart: Boolean = True): TListItem;
function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem;
function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem;
function GetHitTestInfoAt(X, Y: Integer): THitTests;
function GetItemAt(x,y: integer): TListItem;