You've already forked lazarus-ccr
fpspreadsheet: Less compiler hints and warnings. Some clean-up.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3760 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -52,6 +52,10 @@ object Form1: TForm1
|
||||
Top = 0
|
||||
Width = 676
|
||||
OnChange = TabControlChange
|
||||
TabIndex = 0
|
||||
Tabs.Strings = (
|
||||
'Sheet 1'
|
||||
)
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
end
|
||||
|
@ -84,6 +84,7 @@ end;
|
||||
procedure TForm1.BtnNewClick(Sender: TObject);
|
||||
begin
|
||||
TabControl.Tabs.Clear;
|
||||
TabControl.Tabs.Add('Sheet1');
|
||||
Grid.NewWorkbook(26, 100);
|
||||
end;
|
||||
|
||||
@ -135,11 +136,8 @@ begin
|
||||
]);
|
||||
|
||||
// Collect the sheet names in the Tabs of the TabControl for switching sheets.
|
||||
if Grid.Workbook.FileFormat <> sfExcel2 then
|
||||
begin
|
||||
Grid.GetSheets(TabControl.Tabs);
|
||||
TabControl.TabIndex := 0;
|
||||
end;
|
||||
Grid.GetSheets(TabControl.Tabs);
|
||||
TabControl.TabIndex := 0;
|
||||
except
|
||||
on E:Exception do begin
|
||||
// Empty worksheet instead of the loaded one
|
||||
|
@ -688,12 +688,14 @@ end;
|
||||
|
||||
procedure TsCopyFormatAction.ExecuteTarget(Target: TObject);
|
||||
begin
|
||||
Unused(Target);
|
||||
Checked := true;
|
||||
WorkbookSource.SetPendingOperation(poCopyFormat, Worksheet.GetSelection);
|
||||
end;
|
||||
|
||||
procedure TsCopyFormatAction.UpdateTarget(Target: TObject);
|
||||
begin
|
||||
Unused(Target);
|
||||
if WorkbookSource.PendingOperation = poNone then Checked := false;
|
||||
end;
|
||||
|
||||
@ -703,6 +705,7 @@ end;
|
||||
|
||||
procedure TsAutoFormatAction.ExecuteTarget(Target: TObject);
|
||||
begin
|
||||
Unused(Target);
|
||||
ApplyFormatToSelection;
|
||||
end;
|
||||
|
||||
@ -1044,9 +1047,7 @@ procedure TsCellBorderAction.ApplyFormatToRange(ARange: TsCellRange);
|
||||
|
||||
var
|
||||
r, c: LongInt;
|
||||
ls: TsLineStyle;
|
||||
bs: TsCellBorderStyle;
|
||||
cell: PCell;
|
||||
begin
|
||||
// Top edges
|
||||
Borders.North.ApplyStyle(Workbook, bs);
|
||||
@ -1091,6 +1092,7 @@ end;
|
||||
|
||||
procedure TsCellBorderAction.ExecuteTarget(Target: TObject);
|
||||
begin
|
||||
Unused(Target);
|
||||
ApplyFormatToSelection;
|
||||
end;
|
||||
|
||||
@ -1116,6 +1118,7 @@ end;
|
||||
|
||||
procedure TsNoCellBordersAction.ExecuteTarget(Target: TObject);
|
||||
begin
|
||||
Unused(Target);
|
||||
ApplyFormatToSelection;
|
||||
end;
|
||||
|
||||
@ -1205,6 +1208,7 @@ end;
|
||||
|
||||
procedure TsCommonDialogSpreadsheetAction.ExecuteTarget(Target: TObject);
|
||||
begin
|
||||
Unused(Target);
|
||||
DoBeforeExecute;
|
||||
FExecuteResult := FDialog.Execute;
|
||||
if FExecuteResult then
|
||||
|
@ -6317,6 +6317,8 @@ var
|
||||
i: Integer;
|
||||
ok: Boolean;
|
||||
begin
|
||||
buf[0] := 0; // Silence the compiler...
|
||||
|
||||
Result := false;
|
||||
stream := TFileStream.Create(AFileName, fmOpenRead + fmShareDenyNone);
|
||||
try
|
||||
|
@ -517,7 +517,7 @@ procedure TsWorkbookSource.ExecutePendingOperation;
|
||||
var
|
||||
destSelection: TsCellRangeArray;
|
||||
srcCell, destCell: PCell; // Pointers to source and destination cells
|
||||
i, j, k: Integer;
|
||||
i, j, k: Cardinal;
|
||||
ofsRow, ofsCol: LongInt;
|
||||
|
||||
function DistinctRanges(R1, R2: TsCellRange): Boolean;
|
||||
@ -1053,7 +1053,6 @@ procedure TsWorkbookTabControl.ListenerNotification(
|
||||
AChangedItems: TsNotificationItems; AData: Pointer = nil);
|
||||
var
|
||||
i: Integer;
|
||||
t: Integer;
|
||||
begin
|
||||
Unused(AData);
|
||||
|
||||
@ -1062,9 +1061,7 @@ begin
|
||||
begin
|
||||
inc(FLockCount); // avoid WorkbookSelect message when adding each tab
|
||||
GetSheetList(Tabs);
|
||||
t := TabIndex;
|
||||
TabIndex := Tabs.Count-1;
|
||||
t := TabIndex;
|
||||
dec(FLockCount);
|
||||
end;
|
||||
|
||||
@ -1075,8 +1072,6 @@ begin
|
||||
if i <> TabIndex then
|
||||
TabIndex := i;
|
||||
end;
|
||||
|
||||
t := TabIndex;
|
||||
end;
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
@ -1417,6 +1412,7 @@ end;
|
||||
-------------------------------------------------------------------------------}
|
||||
procedure TsCellCombobox.ApplyFormatToCell(ACell: PCell);
|
||||
begin
|
||||
Unused(ACell);
|
||||
end;
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
@ -1425,6 +1421,7 @@ end;
|
||||
-------------------------------------------------------------------------------}
|
||||
procedure TsCellCombobox.ExtractFromCell(ACell: PCell);
|
||||
begin
|
||||
Unused(ACell);
|
||||
end;
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
|
@ -999,7 +999,7 @@ end;
|
||||
-------------------------------------------------------------------------------}
|
||||
procedure TsCustomWorksheetGrid.Convert_sFont_to_Font(sFont: TsFont; AFont: TFont);
|
||||
begin
|
||||
fpsVisualUtils.Convert_sFont_to_Font(Workbook, sFont, Font);
|
||||
fpsVisualUtils.Convert_sFont_to_Font(Workbook, sFont, AFont);
|
||||
end;
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user