diff --git a/components/fpspreadsheet/fpsactions.pas b/components/fpspreadsheet/fpsactions.pas
index 2605e1e85..472b502f7 100644
--- a/components/fpspreadsheet/fpsactions.pas
+++ b/components/fpspreadsheet/fpsactions.pas
@@ -1141,6 +1141,7 @@ var
begin
if (ACell = nil) or not (uffBorder in ACell^.UsedFormattingFields) then
begin
+ EmptyCell.Row := 0; // silence the compiler...
InitCell(EmptyCell);
FBorders.ExtractFromCell(Workbook, @EmptyCell);
end else
diff --git a/components/fpspreadsheet/fpspreadsheet.chm b/components/fpspreadsheet/fpspreadsheet.chm
index da8fcfb87..7b5202ae9 100755
Binary files a/components/fpspreadsheet/fpspreadsheet.chm and b/components/fpspreadsheet/fpspreadsheet.chm differ
diff --git a/components/fpspreadsheet/fpspreadsheet.pas b/components/fpspreadsheet/fpspreadsheet.pas
index 58703c9ad..c5d78dabc 100755
--- a/components/fpspreadsheet/fpspreadsheet.pas
+++ b/components/fpspreadsheet/fpspreadsheet.pas
@@ -1325,7 +1325,7 @@ function GetFileFormatName(AFormat: TsSpreadsheetFormat): String;
procedure MakeLEPalette(APalette: PsPalette; APaletteSize: Integer);
function SameCellBorders(ACell1, ACell2: PCell): Boolean;
-procedure InitCell(var ACell: TCell); overload;
+procedure InitCell(out ACell: TCell); overload;
procedure InitCell(ARow, ACol: Cardinal; out ACell: TCell); overload;
function HasFormula(ACell: PCell): Boolean;
@@ -1577,7 +1577,7 @@ end;
Initalizes a new cell.
@return New cell record
-------------------------------------------------------------------------------}
-procedure InitCell(var ACell: TCell);
+procedure InitCell(out ACell: TCell);
begin
ACell.FormulaValue := '';
ACell.UTF8StringValue := '';
diff --git a/components/fpspreadsheet/fpspreadsheetctrls.pas b/components/fpspreadsheet/fpspreadsheetctrls.pas
index 29a5769c6..68a22f990 100644
--- a/components/fpspreadsheet/fpspreadsheetctrls.pas
+++ b/components/fpspreadsheet/fpspreadsheetctrls.pas
@@ -450,7 +450,7 @@ type
function GetCell(AIndex: Integer): PCell;
procedure SetCell(AIndex: Integer; ACell: PCell);
public
- destructor Destroy;
+ destructor Destroy; override;
function Add(ACell: PCell): Integer;
function AddCell(ACell: PCell): Integer;
function AddEmptyCell(ARow, ACol: Cardinal): Integer;
@@ -1175,13 +1175,13 @@ begin
cell := CellClipboard.CellByIndex[i];
case AItem of
coCopyCell:
- FWorksheet.CopyCell(cell^.Row, cell^.Col, cell^.Row + dr, cell^.Col + dc);
+ FWorksheet.CopyCell(cell^.Row, cell^.Col, LongInt(cell^.Row) + dr, LongInt(cell^.Col) + dc);
coCopyValue:
- FWorksheet.CopyValue(cell, cell^.Row + dr, cell^.Col + dc);
+ FWorksheet.CopyValue(cell, LongInt(cell^.Row) + dr, LongInt(cell^.Col) + dc);
coCopyFormat:
- FWorksheet.CopyFormat(cell, cell^.Row + dr, cell^.Col + dc);
+ FWorksheet.CopyFormat(cell, LongInt(cell^.Row) + dr, LongInt(cell^.Col) + dc);
coCopyFormula:
- FWorksheet.CopyFormula(cell, cell^.Row + dr, cell^.Col + dc);
+ FWorksheet.CopyFormula(cell, LongInt(cell^.Row) + dr, LongInt(cell^.Col) + dc);
end;
end;
@@ -1755,7 +1755,6 @@ procedure TsCellCombobox.ApplyFormatToCell(ACell: PCell);
var
fnt: TsFont;
clr: TColor;
- sclr: TsColor;
begin
if (Worksheet = nil) then
exit;
diff --git a/components/fpspreadsheet/fpspreadsheetgrid.pas b/components/fpspreadsheet/fpspreadsheetgrid.pas
index 3817311e8..49301514b 100644
--- a/components/fpspreadsheet/fpspreadsheetgrid.pas
+++ b/components/fpspreadsheet/fpspreadsheetgrid.pas
@@ -228,10 +228,6 @@ type
{ Interfacing with WorkbookLink }
procedure ListenerNotification(AChangedItems: TsNotificationItems;
AData: Pointer = nil);
-// procedure CellChanged(ACell: PCell);
-// procedure CellSelected(ASheetRow, ASheetCol: Cardinal);
-// procedure WorkbookChanged;
-// procedure WorksheetChanged;
{ public properties }
{@@ Link to the workbook }
@@ -340,6 +336,7 @@ type
{$ENDIF}
end;
+
{ TsWorksheetGrid }
{@@
@@ -558,7 +555,6 @@ type
property OnContextPopup;
end;
-//procedure Register;
implementation
@@ -671,16 +667,7 @@ begin
then TRGBA(Result).B := TRGBA(c).B + ADelta
else TRGBA(Result).B := TRGBA(c).B - ADelta;
end;
- (*
-{@@ ----------------------------------------------------------------------------
- Registers the worksheet grid in the Lazarus component palette,
- page "FPSpreadsheet".
--------------------------------------------------------------------------------}
-procedure Register;
-begin
- RegisterComponents('FPSpreadsheet', [TsWorksheetGrid]);
-end;
- *)
+
{*******************************************************************************
* TsCustomWorksheetGrid *
@@ -3247,18 +3234,7 @@ begin
if Workbook <> nil then
Workbook.WriteToFile(AFileName, AOverwriteExisting);
end;
- (*
-{@@ ----------------------------------------------------------------------------
- A different cell has been selected. Notifies the WorkbookLink of the change.
--------------------------------------------------------------------------------}
-function TsCustomWorksheetGrid.SelectCell(AGridCol, AGridRow: Integer): Boolean;
-begin
- Result := inherited SelectCell(AGridCol, AGridRow);
- if Result and (WorkbookSource <> nil) and ((AGridRow <> Row) or (AGridCol <> Col))
- then
- WorkbookSource.SelectCell(GetWorksheetRow(AGridRow), GetWorksheetCol(AGridCol));
-end;
- *)
+
{@@ ----------------------------------------------------------------------------
Standard method inherited from TCustomGrid: Is called when editing starts.
Is overridden here to store the old text just in case that the user presses
diff --git a/components/fpspreadsheet/fpsutils.pas b/components/fpspreadsheet/fpsutils.pas
index 9fd9aefe2..563e36c03 100644
--- a/components/fpspreadsheet/fpsutils.pas
+++ b/components/fpspreadsheet/fpsutils.pas
@@ -1506,7 +1506,6 @@ var
testSepPos: Integer;
lastDigitPos: Integer;
isPercent: Boolean;
- isExp: Boolean;
fs: TFormatSettings;
done: Boolean;
begin
@@ -1532,7 +1531,6 @@ begin
testSep := #0; // Separator candidate to be tested
testSepPos := 0; // Position of this separator candidate in the string
lastDigitPos := 0; // Position of the last numerical digit
- isExp := false; // Flag for exponential format
isPercent := false; // Flag for percentage format
i := Length(AText); // Start at end...
@@ -1544,7 +1542,7 @@ begin
lastDigitPos := i;
'e', 'E':
- isExp := true;
+ ;
'%':
begin
diff --git a/components/fpspreadsheet/laz_fpspreadsheet.lpk b/components/fpspreadsheet/laz_fpspreadsheet.lpk
index b73296a83..33bf2407d 100644
--- a/components/fpspreadsheet/laz_fpspreadsheet.lpk
+++ b/components/fpspreadsheet/laz_fpspreadsheet.lpk
@@ -9,7 +9,6 @@
-
@@ -25,7 +24,7 @@
This package is all you need if you don't want graphical components (like grids and charts)."/>
-
+
diff --git a/components/fpspreadsheet/laz_fpspreadsheet_visual.lpk b/components/fpspreadsheet/laz_fpspreadsheet_visual.lpk
index e725fe5ca..84b9b3dd1 100644
--- a/components/fpspreadsheet/laz_fpspreadsheet_visual.lpk
+++ b/components/fpspreadsheet/laz_fpspreadsheet_visual.lpk
@@ -3,12 +3,12 @@
+
-
@@ -19,7 +19,7 @@
It provides graphical components like a grid and chart."/>
-
+
@@ -45,7 +45,6 @@ It provides graphical components like a grid and chart."/>
-
diff --git a/components/fpspreadsheet/laz_fpspreadsheetexport_visual.lpk b/components/fpspreadsheet/laz_fpspreadsheetexport_visual.lpk
index 7e787c0fd..fd80dfa91 100644
--- a/components/fpspreadsheet/laz_fpspreadsheetexport_visual.lpk
+++ b/components/fpspreadsheet/laz_fpspreadsheetexport_visual.lpk
@@ -3,6 +3,7 @@
+
@@ -23,7 +24,7 @@
It provides a graphical export component on the Data Export tab."/>
-
+
@@ -35,7 +36,6 @@ It provides a graphical export component on the Data Export tab."/>
-
diff --git a/components/fpspreadsheet/tests/spreadtestcli.lpi b/components/fpspreadsheet/tests/spreadtestcli.lpi
index f723acb90..eb3fa9d5b 100644
--- a/components/fpspreadsheet/tests/spreadtestcli.lpi
+++ b/components/fpspreadsheet/tests/spreadtestcli.lpi
@@ -69,7 +69,7 @@
-
+
@@ -146,8 +146,17 @@
-
+
+
+
+
+
+
+
+
+
+
diff --git a/components/fpspreadsheet/tests/spreadtestcli.lpr b/components/fpspreadsheet/tests/spreadtestcli.lpr
index 150498b8a..b4e6f5837 100644
--- a/components/fpspreadsheet/tests/spreadtestcli.lpr
+++ b/components/fpspreadsheet/tests/spreadtestcli.lpr
@@ -12,9 +12,9 @@ uses
{the actual tests}
datetests, manualtests, stringtests, internaltests, testsutility, testutils,
- formattests, colortests, emptycelltests, insertdeletetests,
- errortests, numberstests, fonttests, formulatests, numformatparsertests,
- optiontests, virtualmodetests, dbexporttests, sortingtests;
+ formattests, colortests, emptycelltests, insertdeletetests, errortests,
+ numberstests, fonttests, formulatests, numformatparsertests, optiontests,
+ virtualmodetests, dbexporttests, sortingtests, copytests, celltypetests;
const
ShortOpts = 'ac:dhlpr:x';