spready: Add support for new worksheet option soAutoDetectCellType

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7060 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-07-20 10:23:34 +00:00
parent e71408fc19
commit 42ad68b2bc
3 changed files with 29 additions and 6 deletions

View File

@ -13,7 +13,7 @@ object MainForm: TMainForm
OnDropFiles = FormDropFiles
OnShow = FormShow
ShowHint = True
LCLVersion = '1.9.0.0'
LCLVersion = '2.1.0.0'
object WorkbookTabControl: TsWorkbookTabControl
Left = 0
Height = 609
@ -98,11 +98,11 @@ object MainForm: TMainForm
'Options=boAutoCalc, boCalcBeforeSaving, boReadFormulas'
'(-) FormatSettings='
' ThousandSeparator=.'
' DecimalSeparator=.'
' DecimalSeparator=,'
' ListSeparator=;'
' DateSeparator=.'
' TimeSeparator=:'
' ShortDateFormat=MM.yy'
' ShortDateFormat=dd.MM.yyyy'
' LongDateFormat=dddd, d. MMMM yyyy'
' ShortTimeFormat=hh:nn'
' LongTimeFormat=hh:nn:ss'
@ -349,7 +349,7 @@ object MainForm: TMainForm
Width = 130
WorkbookSource = WorkbookSource
DropDownCount = 24
ItemIndex = 49
ItemIndex = 69
TabOrder = 0
Text = 'Arial'
end
@ -1931,6 +1931,7 @@ object MainForm: TMainForm
Category = 'Settings'
AutoCheck = True
Caption = 'Update row heights after loading'
Hint = 'Automatically update the row heights'
OnExecute = AcSettingsAutoUpdateRowheightsExecute
end
object AcWorksheetShowGrid: TAction
@ -1955,6 +1956,14 @@ object MainForm: TMainForm
Hint = 'Zoom worksheet'
OnExecute = AcZoomMoreExecute
end
object AcSettingsAutoDetectCellType: TAction
Category = 'Settings'
AutoCheck = True
Caption = 'Automatically detect cell type'
Checked = True
Hint = 'Automatically detect the type of the cell content.'
OnExecute = AcSettingsAutoDetectCellTypeExecute
end
end
object ImageList: TImageList
left = 176
@ -4848,6 +4857,10 @@ object MainForm: TMainForm
Action = AcSettingsAutoUpdateRowheights
AutoCheck = True
end
object MenuItem197: TMenuItem
Action = AcSettingsAutoDetectCellType
AutoCheck = True
end
end
object MnuHelp: TMenuItem
Caption = 'Help'

View File

@ -39,6 +39,7 @@ type
AcColWidth: TAction;
AcSettingsReadFormulas: TAction;
AcSettingsAutoUpdateRowheights: TAction;
AcSettingsAutoDetectCellType: TAction;
AcWorksheetShowHeaders: TAction;
AcWorksheetShowGrid: TAction;
AcWorksheetProtection: TAction;
@ -101,6 +102,7 @@ type
MenuItem194: TMenuItem;
MenuItem195: TMenuItem;
MenuItem196: TMenuItem;
MenuItem197: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
@ -456,6 +458,7 @@ type
procedure AcRowAddExecute(Sender: TObject);
procedure AcRowDeleteExecute(Sender: TObject);
procedure AcRowHeightExecute(Sender: TObject);
procedure AcSettingsAutoDetectCellTypeExecute(Sender: TObject);
procedure AcSettingsAutoUpdateRowheightsExecute(Sender: TObject);
procedure AcSettingsReadFormulasExecute(Sender: TObject);
procedure AcSortColAscExecute(Sender: TObject);
@ -799,6 +802,11 @@ begin
SearchForm.Execute(WorkbookSource.Workbook);
end;
procedure TMainForm.AcSettingsAutoDetectCellTypeExecute(Sender: TObject);
begin
WorksheetGrid.AutoDetectCellType := AcSettingsautoDetectCellType.Checked;
end;
procedure TMainForm.AcSettingsCSVParamsExecute(Sender: TObject);
var
F: TCSVParamsForm;

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="spready"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>