You've already forked lazarus-ccr
fpspreadsheet: Make TsWorksheetGrid.UpdateRowHeights public, add optional parameter "AEnforceCalcRowHeight".
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5257 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -248,7 +248,6 @@ type
|
|||||||
function TrimToCell(ACell: PCell): String;
|
function TrimToCell(ACell: PCell): String;
|
||||||
procedure UpdateColWidths(AStartIndex: Integer = 0);
|
procedure UpdateColWidths(AStartIndex: Integer = 0);
|
||||||
procedure UpdateRowHeight(ARow: Integer; AEnforceCalcRowHeight: Boolean = false);
|
procedure UpdateRowHeight(ARow: Integer; AEnforceCalcRowHeight: Boolean = false);
|
||||||
procedure UpdateRowHeights(AStartRow: Integer = -1);
|
|
||||||
|
|
||||||
{@@ Automatically recalculate formulas whenever a cell value changes. }
|
{@@ Automatically recalculate formulas whenever a cell value changes. }
|
||||||
property AutoCalc: Boolean read FAutoCalc write SetAutoCalc default false;
|
property AutoCalc: Boolean read FAutoCalc write SetAutoCalc default false;
|
||||||
@ -326,6 +325,9 @@ type
|
|||||||
const ALeftOuterStyle, ATopOuterStyle, ARightOuterStyle, ABottomOuterStyle,
|
const ALeftOuterStyle, ATopOuterStyle, ARightOuterStyle, ABottomOuterStyle,
|
||||||
AHorInnerStyle, AVertInnerStyle: TsCellBorderStyle);
|
AHorInnerStyle, AVertInnerStyle: TsCellBorderStyle);
|
||||||
|
|
||||||
|
{ Row height calculation }
|
||||||
|
procedure UpdateRowHeights(AStartRow: Integer = -1; AEnforceCalcRowHeight: Boolean = false);
|
||||||
|
|
||||||
{ Utilities related to Workbooks }
|
{ Utilities related to Workbooks }
|
||||||
procedure Convert_sFont_to_Font(sFont: TsFont; AFont: TFont);
|
procedure Convert_sFont_to_Font(sFont: TsFont; AFont: TFont);
|
||||||
procedure Convert_Font_to_sFont(AFont: TFont; sFont: TsFont);
|
procedure Convert_Font_to_sFont(AFont: TFont; sFont: TsFont);
|
||||||
@ -4833,6 +4835,9 @@ var
|
|||||||
h: Integer; // Row height, in pixels. Contains zoom factor.
|
h: Integer; // Row height, in pixels. Contains zoom factor.
|
||||||
doCalcRowHeight: Boolean;
|
doCalcRowHeight: Boolean;
|
||||||
begin
|
begin
|
||||||
|
if ARow < FHeaderCount then
|
||||||
|
exit;
|
||||||
|
|
||||||
h := 0;
|
h := 0;
|
||||||
if Worksheet <> nil then
|
if Worksheet <> nil then
|
||||||
begin
|
begin
|
||||||
@ -4891,7 +4896,8 @@ end;
|
|||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
Updates grid row heights by using the data from the TRow records.
|
Updates grid row heights by using the data from the TRow records.
|
||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
procedure TsCustomWorksheetGrid.UpdateRowHeights(AStartRow: Integer = -1);
|
procedure TsCustomWorksheetGrid.UpdateRowHeights(AStartRow: Integer = -1;
|
||||||
|
AEnforceCalcRowHeight: Boolean = false);
|
||||||
var
|
var
|
||||||
r, r1: Integer;
|
r, r1: Integer;
|
||||||
begin
|
begin
|
||||||
@ -4905,7 +4911,7 @@ begin
|
|||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
try
|
try
|
||||||
for r:=r1 to RowCount-1 do
|
for r:=r1 to RowCount-1 do
|
||||||
UpdateRowHeight(r);
|
UpdateRowHeight(r, AEnforceCalcRowHeight);
|
||||||
finally
|
finally
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user