IDE: checked compiler warnings, clean up

git-svn-id: trunk@48236 -
This commit is contained in:
mattias 2015-03-10 15:59:16 +00:00
parent 58ccd15d06
commit ab1f174af5
3 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;