lcl: code cleanup - remove local procedure in TCustomDrawGrid.DefaultDrawCell

git-svn-id: trunk@32926 -
This commit is contained in:
blikblum 2011-10-16 20:09:49 +00:00
parent 0ec0a215fb
commit 4ff03734cb

View File

@ -9396,15 +9396,6 @@ end;
procedure TCustomDrawGrid.DefaultDrawCell(aCol, aRow: Integer; var aRect: TRect; procedure TCustomDrawGrid.DefaultDrawCell(aCol, aRow: Integer; var aRect: TRect;
aState: TGridDrawState); aState: TGridDrawState);
procedure DrawText;
begin
if GetIsCellTitle(aCol, aRow) then
DrawColumnText(aCol, aRow, aRect, aState)
else
DrawTextInCell(aCol,aRow, aRect,aState);
end;
begin begin
if goColSpanning in Options then CalcCellExtent(acol, arow, aRect); if goColSpanning in Options then CalcCellExtent(acol, arow, aRect);
@ -9416,18 +9407,21 @@ begin
if CellNeedsCheckboxBitmaps(aCol,aRow) then if CellNeedsCheckboxBitmaps(aCol,aRow) then
DrawCellCheckboxBitmaps(aCol,aRow,aRect) DrawCellCheckboxBitmaps(aCol,aRow,aRect)
else else
if IsCellButtonColumn(Point(aCol,aRow)) then begin begin
DrawButtonCell(aCol,aRow,aRect,aState); if IsCellButtonColumn(Point(aCol,aRow)) then begin
DrawText; DrawButtonCell(aCol,aRow,aRect,aState);
end end
else begin else begin
if (goFixedRowNumbering in Options) and (ARow>=FixedRows) and (aCol=0) and
if (goFixedRowNumbering in Options) and (ARow>=FixedRows) and (aCol=0) and (FixedCols>0)
(FixedCols>0) then
then DrawCellAutonumbering(aCol, aRow, aRect, IntToStr(aRow-FixedRows+1));
DrawCellAutonumbering(aCol, aRow, aRect, IntToStr(aRow-FixedRows+1)); end;
//draw text
DrawText; if GetIsCellTitle(aCol, aRow) then
DrawColumnText(aCol, aRow, aRect, aState)
else
DrawTextInCell(aCol,aRow, aRect,aState);
end; end;
end; end;