fpspreadsheet: Fix grid painting into header cells if fixed columns are used.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5827 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-03-30 12:39:54 +00:00
parent 09e3c1d772
commit dc4314db8b

View File

@ -4123,10 +4123,20 @@ begin
if (rct.Left < rct.Right) and HorizontalIntersect(rct, clipArea) then
begin
// Define clipping rectangle in order to avoid painting into the header cells
clip_rct := rct;
clip_rct.Top := AClipRect.Top;
clip_rct.Bottom := AClipRect.Bottom;
if (gc >= FHeaderCount + FFrozenCols) then begin
if UseRightToLeftReading then begin
if (clip_rct.Right > FTopLeft.X) then
clip_rct.Right := FTopLeft.X;
end else
if (clip_rct.Left < FTopLeft.X) then
clip_rct.Left := FTopLeft.X;
end;
gds := GetGridDrawState(gc, gr);
// Draw cell
InternalDrawCell(gc, gr, clip_rct, rct, gds);
// Draw comment marker