You've already forked lazarus-ccr
fpspreadsheet: Put numerical data of the TCell record into a variant record --> further reduction of memory consumption per cell (now by 70% of original TCell).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3898 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -38,11 +38,14 @@ object Form1: TForm1
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object LblCancel: TLabel
|
object LblCancel: TLabel
|
||||||
Left = 208
|
Left = 184
|
||||||
Height = 30
|
Height = 39
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 309
|
Width = 576
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoSize = False
|
||||||
Caption = 'Press ESC to cancel when current file is completely written.'#13#10'This may take some time...'
|
Caption = 'Press ESC to cancel when current file is completely written.'#13#10'This may take some time...'
|
||||||
|
Layout = tlCenter
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
|
@@ -37,8 +37,8 @@ type
|
|||||||
|
|
||||||
{@@ Cell structure for TsWorksheet
|
{@@ Cell structure for TsWorksheet
|
||||||
The cell record contains information on the location of the cell (row and
|
The cell record contains information on the location of the cell (row and
|
||||||
column index), on the value contained (number, date, text, ...), and on
|
column index), on the value contained (number, date, text, ...), on
|
||||||
formatting.
|
formatting, etc.
|
||||||
|
|
||||||
Never suppose that all *Value fields are valid,
|
Never suppose that all *Value fields are valid,
|
||||||
only one of the ContentTypes is valid. For other fields
|
only one of the ContentTypes is valid. For other fields
|
||||||
@@ -46,9 +46,11 @@ type
|
|||||||
|
|
||||||
@see ReadAsUTF8Text }
|
@see ReadAsUTF8Text }
|
||||||
TCell = record
|
TCell = record
|
||||||
|
{ Location of the cell }
|
||||||
Worksheet: TsWorksheet;
|
Worksheet: TsWorksheet;
|
||||||
Col: Cardinal; // zero-based
|
Col: Cardinal; // zero-based
|
||||||
Row: Cardinal; // zero-based
|
Row: Cardinal; // zero-based
|
||||||
|
(*
|
||||||
ContentType: TCellContentType;
|
ContentType: TCellContentType;
|
||||||
{ Possible values for the cells }
|
{ Possible values for the cells }
|
||||||
FormulaValue: string;
|
FormulaValue: string;
|
||||||
@@ -57,12 +59,25 @@ type
|
|||||||
DateTimeValue: TDateTime;
|
DateTimeValue: TDateTime;
|
||||||
BoolValue: Boolean;
|
BoolValue: Boolean;
|
||||||
ErrorValue: TsErrorValue;
|
ErrorValue: TsErrorValue;
|
||||||
SharedFormulaBase: PCell; // Cell containing the shared formula
|
*)
|
||||||
MergeBase: PCell; // Upper left cell if a merged range
|
|
||||||
{ Index of format record }
|
{ Index of format record }
|
||||||
FormatIndex: Integer;
|
FormatIndex: Integer;
|
||||||
{ Status flags }
|
{ Status flags }
|
||||||
CalcState: TsCalcState;
|
CalcState: TsCalcState;
|
||||||
|
{ Special information }
|
||||||
|
SharedFormulaBase: PCell; // Cell containing the shared formula
|
||||||
|
MergeBase: PCell; // Upper left cell of a merged range
|
||||||
|
{ Cell content }
|
||||||
|
UTF8StringValue: String; // strings cannot be part of a variant record
|
||||||
|
FormulaValue: String;
|
||||||
|
case ContentType: TCellContentType of // must be at the end of the declaration
|
||||||
|
cctEmpty : (); // has no data at all
|
||||||
|
cctFormula : (); // UTF8StringValue is outside the variant record
|
||||||
|
cctNumber : (Numbervalue: Double);
|
||||||
|
cctUTF8String : (); // FormulaValue is outside the variant record
|
||||||
|
cctDateTime : (DateTimevalue: TDateTime);
|
||||||
|
cctBool : (BoolValue: boolean);
|
||||||
|
cctError : (ErrorValue: TsErrorValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{@@ The record TRow contains information about a spreadsheet row:
|
{@@ The record TRow contains information about a spreadsheet row:
|
||||||
|
Reference in New Issue
Block a user