You've already forked lazarus-ccr
fpspreadsheet: TsWorksheetGrid ignores setting DefaultColWidth and DefaultRowHeight to values < 0.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5850 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1242,7 +1242,7 @@ begin
|
|||||||
FHeaderCount := 1;
|
FHeaderCount := 1;
|
||||||
ColCount := DEFAULT_COL_COUNT + FHeaderCount;
|
ColCount := DEFAULT_COL_COUNT + FHeaderCount;
|
||||||
RowCount := DEFAULT_ROW_COUNT + FHeaderCount;
|
RowCount := DEFAULT_ROW_COUNT + FHeaderCount;
|
||||||
FDefRowHeight100 := inherited DefaultRowHeight;
|
FDefRowHeight100 := inherited GetDefaultRowHeight;
|
||||||
FDefColWidth100 := inherited DefaultColWidth;
|
FDefColWidth100 := inherited DefaultColWidth;
|
||||||
//FOldTopRow := -1;
|
//FOldTopRow := -1;
|
||||||
FCellFont := TFont.Create;
|
FCellFont := TFont.Create;
|
||||||
@ -5073,9 +5073,10 @@ end;
|
|||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
procedure TsCustomWorksheetGrid.Setup;
|
procedure TsCustomWorksheetGrid.Setup;
|
||||||
begin
|
begin
|
||||||
|
{
|
||||||
if csLoading in ComponentState then
|
if csLoading in ComponentState then
|
||||||
exit;
|
exit;
|
||||||
|
}
|
||||||
if FLockSetup > 0 then
|
if FLockSetup > 0 then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
@ -6346,10 +6347,10 @@ end;
|
|||||||
|
|
||||||
procedure TsCustomWorksheetGrid.SetDefColWidth(AValue: Integer);
|
procedure TsCustomWorksheetGrid.SetDefColWidth(AValue: Integer);
|
||||||
begin
|
begin
|
||||||
if AValue = GetDefColWidth then
|
if (AValue = GetDefColWidth) or (AValue < 0) then
|
||||||
exit;
|
exit;
|
||||||
// AValue contains the zoom factor
|
{ AValue contains the zoom factor.
|
||||||
// FDefColWidth1000 is the col width at zoom factor 1.0
|
FDefColWidth1000 is the col width at zoom factor 1.0 }
|
||||||
FDefColWidth100 := round(AValue / ZoomFactor);
|
FDefColWidth100 := round(AValue / ZoomFactor);
|
||||||
inherited DefaultColWidth := AValue;
|
inherited DefaultColWidth := AValue;
|
||||||
if FHeaderCount > 0 then begin
|
if FHeaderCount > 0 then begin
|
||||||
@ -6362,10 +6363,10 @@ end;
|
|||||||
|
|
||||||
procedure TsCustomWorksheetGrid.SetDefRowHeight(AValue: Integer);
|
procedure TsCustomWorksheetGrid.SetDefRowHeight(AValue: Integer);
|
||||||
begin
|
begin
|
||||||
if AValue = GetDefRowHeight then
|
if (AValue = GetDefRowHeight) or (AValue < 0) then
|
||||||
exit;
|
exit;
|
||||||
// AValue contains the zoom factor
|
{ AValue contains the zoom factor
|
||||||
// FDefRowHeight100 is the row height at zoom factor 1.0
|
FDefRowHeight100 is the row height at zoom factor 1.0 }
|
||||||
FDefRowHeight100 := round(AValue / ZoomFactor);
|
FDefRowHeight100 := round(AValue / ZoomFactor);
|
||||||
inherited DefaultRowHeight := AValue;
|
inherited DefaultRowHeight := AValue;
|
||||||
if FHeaderCount > 0 then
|
if FHeaderCount > 0 then
|
||||||
|
Reference in New Issue
Block a user