fpspreadsheet: Fix painting bug in grid next to fixed header column.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5808 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-03-18 16:27:44 +00:00
parent 4dcc147e5b
commit 06d6acfe2b

View File

@ -1924,12 +1924,12 @@ begin
else else
begin begin
ColRowToOffset(True, True, fc-1, tmp, cliprect.Left); ColRowToOffset(True, True, fc-1, tmp, cliprect.Left);
dec(clipRect.Left); // dec(clipRect.Left); // wp!!!
end; end;
fr := FHeaderCount + FFrozenRows; fr := FHeaderCount + FFrozenRows;
if fr > 0 then begin if fr > 0 then begin
ColRowToOffset(False, True, fr-1, tmp, cliprect.Top); ColRowToOffset(False, True, fr-1, tmp, cliprect.Top);
dec(cliprect.Top); // dec(cliprect.Top); // wp!!!
end; end;
DrawFrozenPaneBorders(clipRect); DrawFrozenPaneBorders(clipRect);
@ -4869,12 +4869,12 @@ begin
if (Worksheet = nil) or (Worksheet.GetCellCount = 0) then begin if (Worksheet = nil) or (Worksheet.GetCellCount = 0) then begin
FixedCols := FFrozenCols + FHeaderCount; FixedCols := FFrozenCols + FHeaderCount;
FixedRows := FFrozenRows + FHeaderCount; FixedRows := FFrozenRows + FHeaderCount;
FTopLeft := CalcTopLeft(false);
if ShowHeaders then begin if ShowHeaders then begin
PrepareCanvasFont; // Applies the zoom factor PrepareCanvasFont; // Applies the zoom factor
ColWidths[0] := GetDefaultHeaderColWidth; ColWidths[0] := GetDefaultHeaderColWidth;
RowHeights[0] := GetDefaultRowHeight; RowHeights[0] := GetDefaultRowHeight;
end; end;
FTopLeft := CalcTopLeft(false);
end else end else
if Worksheet <> nil then begin if Worksheet <> nil then begin
if aeDefault in FAutoExpand then begin if aeDefault in FAutoExpand then begin
@ -4884,7 +4884,6 @@ begin
ColCount := Max(GetGridCol(WorkSheet.GetLastColIndex), 1) + FHeaderCount; ColCount := Max(GetGridCol(WorkSheet.GetLastColIndex), 1) + FHeaderCount;
RowCount := Max(GetGridCol(Worksheet.GetLastRowIndex), 1) + FHeaderCount; RowCount := Max(GetGridCol(Worksheet.GetLastRowIndex), 1) + FHeaderCount;
end; end;
FTopLeft := CalcTopLeft(false);
FixedCols := FFrozenCols + FHeaderCount; FixedCols := FFrozenCols + FHeaderCount;
FixedRows := FFrozenRows + FHeaderCount; FixedRows := FFrozenRows + FHeaderCount;
if ShowHeaders then begin if ShowHeaders then begin
@ -4892,6 +4891,7 @@ begin
ColWidths[0] := GetDefaultHeaderColWidth; ColWidths[0] := GetDefaultHeaderColWidth;
RowHeights[0] := GetDefaultRowHeight; RowHeights[0] := GetDefaultRowHeight;
end; end;
FTopLeft := CalcTopLeft(false);
end; end;
UpdateColWidths; UpdateColWidths;
UpdateRowHeights; UpdateRowHeights;