mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 10:39:09 +02:00
IDE: checked compiler warnings, clean up
git-svn-id: trunk@48236 -
This commit is contained in:
parent
58ccd15d06
commit
ab1f174af5
@ -178,6 +178,7 @@ begin
|
|||||||
sg := Sender as TStringGrid;
|
sg := Sender as TStringGrid;
|
||||||
if (Button = mbLeft) and (sg.MouseToGridZone(X, Y) = gzNormal) then
|
if (Button = mbLeft) and (sg.MouseToGridZone(X, Y) = gzNormal) then
|
||||||
begin
|
begin
|
||||||
|
Col:=0; Row:=0;
|
||||||
sg.MouseToCell(X, Y, Col, Row);
|
sg.MouseToCell(X, Y, Col, Row);
|
||||||
if (sg.Cells[Col, Row] <> '') and (Assigned(OnInsertCharacter)) then
|
if (sg.Cells[Col, Row] <> '') and (Assigned(OnInsertCharacter)) then
|
||||||
OnInsertCharacter(sg.Cells[Col, Row]);
|
OnInsertCharacter(sg.Cells[Col, Row]);
|
||||||
@ -192,6 +193,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if StringGrid1.MouseToGridZone(X, Y) = gzNormal then
|
if StringGrid1.MouseToGridZone(X, Y) = gzNormal then
|
||||||
begin
|
begin
|
||||||
|
Col:=0; Row:=0;
|
||||||
StringGrid1.MouseToCell(X, Y, Col, Row);
|
StringGrid1.MouseToCell(X, Y, Col, Row);
|
||||||
if StringGrid1.Cells[Col, Row] <> '' then
|
if StringGrid1.Cells[Col, Row] <> '' then
|
||||||
begin
|
begin
|
||||||
@ -216,6 +218,7 @@ var Row, Col, i: Integer;
|
|||||||
begin
|
begin
|
||||||
if StringGrid2.MouseToGridZone(X, Y) = gzNormal then
|
if StringGrid2.MouseToGridZone(X, Y) = gzNormal then
|
||||||
begin
|
begin
|
||||||
|
Col:=0; Row:=0;
|
||||||
StringGrid2.MouseToCell(X, Y, Col, Row);
|
StringGrid2.MouseToCell(X, Y, Col, Row);
|
||||||
S:=UnicodeBlocks[cbUniRange.ItemIndex].S+(Col)+(Row*16);
|
S:=UnicodeBlocks[cbUniRange.ItemIndex].S+(Col)+(Row*16);
|
||||||
tmp:=UnicodeToUTF8(S);
|
tmp:=UnicodeToUTF8(S);
|
||||||
|
@ -70,7 +70,6 @@ procedure GetEncloseSelectionParams(TheType: TEncloseSelectionType;
|
|||||||
out Template: string);
|
out Template: string);
|
||||||
procedure EncloseTextSelection(const Template: string; Source: TStrings;
|
procedure EncloseTextSelection(const Template: string; Source: TStrings;
|
||||||
SelectionStart, SelectionEnd: TPoint;
|
SelectionStart, SelectionEnd: TPoint;
|
||||||
Indent: integer;
|
|
||||||
out NewSelection: string; out NewCursor: TPoint);
|
out NewSelection: string; out NewCursor: TPoint);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -161,8 +160,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure EncloseTextSelection(const Template: string; Source: TStrings;
|
procedure EncloseTextSelection(const Template: string; Source: TStrings;
|
||||||
SelectionStart, SelectionEnd: TPoint; Indent: integer; out
|
SelectionStart, SelectionEnd: TPoint; out NewSelection: string; out
|
||||||
NewSelection: string; out NewCursor: TPoint);
|
NewCursor: TPoint);
|
||||||
var
|
var
|
||||||
TemplateLen: Integer;
|
TemplateLen: Integer;
|
||||||
TemplatePos: Integer;
|
TemplatePos: Integer;
|
||||||
|
@ -4773,7 +4773,6 @@ begin
|
|||||||
GetEncloseSelectionParams(EncloseType,EncloseTemplate);
|
GetEncloseSelectionParams(EncloseType,EncloseTemplate);
|
||||||
EncloseTextSelection(EncloseTemplate,FEditor.Lines,
|
EncloseTextSelection(EncloseTemplate,FEditor.Lines,
|
||||||
FEditor.BlockBegin,FEditor.BlockEnd,
|
FEditor.BlockBegin,FEditor.BlockEnd,
|
||||||
FEditor.BlockIndent,
|
|
||||||
NewSelection,NewCaretXY);
|
NewSelection,NewCaretXY);
|
||||||
//debugln(['TSourceEditor.EncloseSelection A NewCaretXY=',NewCaretXY.X,',',NewCaretXY.Y,' "',NewSelection,'"']);
|
//debugln(['TSourceEditor.EncloseSelection A NewCaretXY=',NewCaretXY.X,',',NewCaretXY.Y,' "',NewSelection,'"']);
|
||||||
FEditor.SelText:=NewSelection;
|
FEditor.SelText:=NewSelection;
|
||||||
|
Loading…
Reference in New Issue
Block a user