You've already forked lazarus-ccr
fpspreadsheet: Add actions for font and background color selection.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3727 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -4,7 +4,7 @@ object Form1: TForm1
|
|||||||
Top = 243
|
Top = 243
|
||||||
Width = 925
|
Width = 925
|
||||||
Caption = 'Form1'
|
Caption = 'Form1'
|
||||||
ClientHeight = 575
|
ClientHeight = 580
|
||||||
ClientWidth = 925
|
ClientWidth = 925
|
||||||
Menu = MainMenu
|
Menu = MainMenu
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
@ -12,7 +12,7 @@ object Form1: TForm1
|
|||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 36
|
Height = 36
|
||||||
Top = 28
|
Top = 26
|
||||||
Width = 925
|
Width = 925
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
@ -30,7 +30,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object CellIndicator: TsCellIndicator
|
object CellIndicator: TsCellIndicator
|
||||||
Left = 95
|
Left = 95
|
||||||
Height = 28
|
Height = 23
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 80
|
Width = 80
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -39,7 +39,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object CellEdit: TsCellEdit
|
object CellEdit: TsCellEdit
|
||||||
Left = 184
|
Left = 184
|
||||||
Height = 28
|
Height = 23
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 731
|
Width = 731
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
@ -50,8 +50,8 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object WorkbookTabControl: TsWorkbookTabControl
|
object WorkbookTabControl: TsWorkbookTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 511
|
Height = 518
|
||||||
Top = 64
|
Top = 62
|
||||||
Width = 672
|
Width = 672
|
||||||
TabIndex = 0
|
TabIndex = 0
|
||||||
Tabs.Strings = (
|
Tabs.Strings = (
|
||||||
@ -62,8 +62,8 @@ object Form1: TForm1
|
|||||||
WorkbookSource = WorkbookSource
|
WorkbookSource = WorkbookSource
|
||||||
object WorksheetGrid: TsWorksheetGrid
|
object WorksheetGrid: TsWorksheetGrid
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 481
|
Height = 493
|
||||||
Top = 28
|
Top = 23
|
||||||
Width = 668
|
Width = 668
|
||||||
FrozenCols = 0
|
FrozenCols = 0
|
||||||
FrozenRows = 0
|
FrozenRows = 0
|
||||||
@ -116,8 +116,8 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object InspectorTabControl: TTabControl
|
object InspectorTabControl: TTabControl
|
||||||
Left = 677
|
Left = 677
|
||||||
Height = 511
|
Height = 518
|
||||||
Top = 64
|
Top = 62
|
||||||
Width = 248
|
Width = 248
|
||||||
OnChange = InspectorTabControlChange
|
OnChange = InspectorTabControlChange
|
||||||
TabIndex = 0
|
TabIndex = 0
|
||||||
@ -131,8 +131,8 @@ object Form1: TForm1
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Inspector: TsSpreadsheetInspector
|
object Inspector: TsSpreadsheetInspector
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 481
|
Height = 493
|
||||||
Top = 28
|
Top = 23
|
||||||
Width = 244
|
Width = 244
|
||||||
Align = alClient
|
Align = alClient
|
||||||
RowCount = 25
|
RowCount = 25
|
||||||
@ -144,7 +144,7 @@ object Form1: TForm1
|
|||||||
'Options=boAutoCalc, boCalcBeforeSaving, boReadFormulas'
|
'Options=boAutoCalc, boCalcBeforeSaving, boReadFormulas'
|
||||||
'FormatSettings='
|
'FormatSettings='
|
||||||
' ThousandSeparator=.'
|
' ThousandSeparator=.'
|
||||||
' DecimalSeparator=,'
|
' DecimalSeparator=.'
|
||||||
' ListSeparator=;'
|
' ListSeparator=;'
|
||||||
' DateSeparator=.'
|
' DateSeparator=.'
|
||||||
' TimeSeparator=:'
|
' TimeSeparator=:'
|
||||||
@ -170,22 +170,22 @@ object Form1: TForm1
|
|||||||
WorkbookSource = WorkbookSource
|
WorkbookSource = WorkbookSource
|
||||||
Mode = imWorkbook
|
Mode = imWorkbook
|
||||||
ColWidths = (
|
ColWidths = (
|
||||||
109
|
111
|
||||||
110
|
112
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 672
|
Left = 672
|
||||||
Height = 511
|
Height = 518
|
||||||
Top = 64
|
Top = 62
|
||||||
Width = 5
|
Width = 5
|
||||||
Align = alRight
|
Align = alRight
|
||||||
ResizeAnchor = akRight
|
ResizeAnchor = akRight
|
||||||
end
|
end
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 28
|
Height = 26
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 925
|
Width = 925
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -196,181 +196,199 @@ object Form1: TForm1
|
|||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object ToolButton1: TToolButton
|
object ToolButton1: TToolButton
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcAddWorksheet
|
Action = AcAddWorksheet
|
||||||
end
|
end
|
||||||
object ToolButton2: TToolButton
|
object ToolButton2: TToolButton
|
||||||
Left = 24
|
Left = 24
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcDeleteWorksheet
|
Action = AcDeleteWorksheet
|
||||||
end
|
end
|
||||||
object ToolButton3: TToolButton
|
object ToolButton3: TToolButton
|
||||||
Left = 47
|
Left = 47
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = acRenameWorksheet
|
Action = acRenameWorksheet
|
||||||
end
|
end
|
||||||
object ToolButton4: TToolButton
|
object ToolButton4: TToolButton
|
||||||
Left = 75
|
Left = 75
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 0
|
||||||
Width = 3
|
Width = 3
|
||||||
Caption = 'ToolButton4'
|
Caption = 'ToolButton4'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
object ToolButton5: TToolButton
|
object ToolButton5: TToolButton
|
||||||
Left = 537
|
Left = 593
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcFileExit
|
Action = AcFileExit
|
||||||
end
|
end
|
||||||
object ToolButton6: TToolButton
|
object ToolButton6: TToolButton
|
||||||
Left = 78
|
Left = 101
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcFontBold
|
Action = AcFontBold
|
||||||
end
|
end
|
||||||
object ToolButton7: TToolButton
|
object ToolButton7: TToolButton
|
||||||
Left = 101
|
Left = 124
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcFontItalic
|
Action = AcFontItalic
|
||||||
end
|
end
|
||||||
object ToolButton8: TToolButton
|
object ToolButton8: TToolButton
|
||||||
Left = 124
|
Left = 147
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcFontUnderline
|
Action = AcFontUnderline
|
||||||
end
|
end
|
||||||
object ToolButton9: TToolButton
|
object ToolButton9: TToolButton
|
||||||
Left = 70
|
Left = 70
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
Caption = 'ToolButton9'
|
Caption = 'ToolButton9'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
object ToolButton10: TToolButton
|
object ToolButton10: TToolButton
|
||||||
Left = 170
|
Left = 193
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
Caption = 'ToolButton10'
|
Caption = 'ToolButton10'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
object ToolButton11: TToolButton
|
object ToolButton11: TToolButton
|
||||||
Left = 147
|
Left = 170
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcFontStrikeout
|
Action = AcFontStrikeout
|
||||||
end
|
end
|
||||||
object ToolButton12: TToolButton
|
object ToolButton12: TToolButton
|
||||||
Left = 175
|
Left = 198
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcHorAlignLeft
|
Action = AcHorAlignLeft
|
||||||
end
|
end
|
||||||
object ToolButton13: TToolButton
|
object ToolButton13: TToolButton
|
||||||
Left = 198
|
Left = 221
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcHorAlignCenter
|
Action = AcHorAlignCenter
|
||||||
end
|
end
|
||||||
object ToolButton14: TToolButton
|
object ToolButton14: TToolButton
|
||||||
Left = 221
|
Left = 244
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcHorAlignRight
|
Action = AcHorAlignRight
|
||||||
end
|
end
|
||||||
object ToolButton15: TToolButton
|
object ToolButton15: TToolButton
|
||||||
Left = 244
|
Left = 267
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
Caption = 'ToolButton15'
|
Caption = 'ToolButton15'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
object ToolButton16: TToolButton
|
object ToolButton16: TToolButton
|
||||||
Left = 249
|
Left = 272
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcVertAlignTop
|
Action = AcVertAlignTop
|
||||||
end
|
end
|
||||||
object ToolButton17: TToolButton
|
object ToolButton17: TToolButton
|
||||||
Left = 272
|
Left = 295
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcVertAlignCenter
|
Action = AcVertAlignCenter
|
||||||
end
|
end
|
||||||
object ToolButton18: TToolButton
|
object ToolButton18: TToolButton
|
||||||
Left = 295
|
Left = 318
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcVertAlignBottom
|
Action = AcVertAlignBottom
|
||||||
end
|
end
|
||||||
object ToolButton19: TToolButton
|
object ToolButton19: TToolButton
|
||||||
Left = 318
|
Left = 341
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
Caption = 'ToolButton19'
|
Caption = 'ToolButton19'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
object ToolButton20: TToolButton
|
object ToolButton20: TToolButton
|
||||||
Left = 323
|
Left = 374
|
||||||
Hint = 'Number format'
|
Hint = 'Number format'
|
||||||
Top = 2
|
Top = 0
|
||||||
Caption = 'ToolButton20'
|
Caption = 'ToolButton20'
|
||||||
DropdownMenu = PuNumFormat
|
DropdownMenu = PuNumFormat
|
||||||
ImageIndex = 15
|
ImageIndex = 15
|
||||||
Style = tbsDropDown
|
Style = tbsDropDown
|
||||||
end
|
end
|
||||||
object ToolButton21: TToolButton
|
object ToolButton21: TToolButton
|
||||||
Left = 381
|
Left = 432
|
||||||
Hint = 'Currency format'
|
Hint = 'Currency format'
|
||||||
Top = 2
|
Top = 0
|
||||||
Caption = 'ToolButton21'
|
Caption = 'ToolButton21'
|
||||||
DropdownMenu = PuCurrencyFormat
|
DropdownMenu = PuCurrencyFormat
|
||||||
ImageIndex = 17
|
ImageIndex = 17
|
||||||
Style = tbsDropDown
|
Style = tbsDropDown
|
||||||
end
|
end
|
||||||
object ToolButton22: TToolButton
|
object ToolButton22: TToolButton
|
||||||
Left = 358
|
Left = 409
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcNumFormatPercentage
|
Action = AcNumFormatPercentage
|
||||||
end
|
end
|
||||||
object ToolButton23: TToolButton
|
object ToolButton23: TToolButton
|
||||||
Left = 486
|
Left = 537
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
Caption = 'ToolButton23'
|
Caption = 'ToolButton23'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
object ToolButton24: TToolButton
|
object ToolButton24: TToolButton
|
||||||
Left = 416
|
Left = 467
|
||||||
Hint = 'Date format'
|
Hint = 'Date format'
|
||||||
Top = 2
|
Top = 0
|
||||||
Caption = 'ToolButton24'
|
Caption = 'ToolButton24'
|
||||||
DropdownMenu = PuDateFormat
|
DropdownMenu = PuDateFormat
|
||||||
ImageIndex = 18
|
ImageIndex = 18
|
||||||
Style = tbsDropDown
|
Style = tbsDropDown
|
||||||
end
|
end
|
||||||
object ToolButton25: TToolButton
|
object ToolButton25: TToolButton
|
||||||
Left = 451
|
Left = 502
|
||||||
Hint = 'Time format'
|
Hint = 'Time format'
|
||||||
Top = 2
|
Top = 0
|
||||||
Caption = 'ToolButton25'
|
Caption = 'ToolButton25'
|
||||||
DropdownMenu = PuTimeFormat
|
DropdownMenu = PuTimeFormat
|
||||||
ImageIndex = 19
|
ImageIndex = 19
|
||||||
Style = tbsDropDown
|
Style = tbsDropDown
|
||||||
end
|
end
|
||||||
object ToolButton26: TToolButton
|
object ToolButton26: TToolButton
|
||||||
Left = 491
|
Left = 542
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcDecDecimals
|
Action = AcDecDecimals
|
||||||
end
|
end
|
||||||
object ToolButton27: TToolButton
|
object ToolButton27: TToolButton
|
||||||
Left = 514
|
Left = 565
|
||||||
Top = 2
|
Top = 0
|
||||||
Action = AcIncDecimals
|
Action = AcIncDecimals
|
||||||
end
|
end
|
||||||
object ToolButton28: TToolButton
|
object ToolButton28: TToolButton
|
||||||
Left = 560
|
Left = 588
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
Caption = 'ToolButton28'
|
Caption = 'ToolButton28'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
|
object ToolButton29: TToolButton
|
||||||
|
Left = 78
|
||||||
|
Top = 0
|
||||||
|
Action = AcCellFont
|
||||||
|
end
|
||||||
|
object ToolButton30: TToolButton
|
||||||
|
Left = 346
|
||||||
|
Top = 0
|
||||||
|
Action = AcBackgroundColor
|
||||||
|
end
|
||||||
|
object ToolButton31: TToolButton
|
||||||
|
Left = 369
|
||||||
|
Height = 24
|
||||||
|
Top = 0
|
||||||
|
Width = 5
|
||||||
|
Caption = 'ToolButton31'
|
||||||
|
Style = tbsDivider
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object WorkbookSource: TsWorkbookSource
|
object WorkbookSource: TsWorkbookSource
|
||||||
AutoDetectFormat = False
|
AutoDetectFormat = False
|
||||||
@ -637,22 +655,57 @@ object Form1: TForm1
|
|||||||
object AcIncDecimals: TsDecimalsAction
|
object AcIncDecimals: TsDecimalsAction
|
||||||
Category = 'FPSpreadsheet'
|
Category = 'FPSpreadsheet'
|
||||||
WorkbookSource = WorkbookSource
|
WorkbookSource = WorkbookSource
|
||||||
Caption = 'Decimals'
|
|
||||||
ImageIndex = 21
|
ImageIndex = 21
|
||||||
end
|
end
|
||||||
object AcDecDecimals: TsDecimalsAction
|
object AcDecDecimals: TsDecimalsAction
|
||||||
Category = 'FPSpreadsheet'
|
Category = 'FPSpreadsheet'
|
||||||
WorkbookSource = WorkbookSource
|
WorkbookSource = WorkbookSource
|
||||||
Caption = 'Decimals'
|
|
||||||
ImageIndex = 20
|
ImageIndex = 20
|
||||||
Delta = -1
|
Delta = -1
|
||||||
end
|
end
|
||||||
|
object AcCellFont: TsFontAction
|
||||||
|
Category = 'FPSpreadsheet'
|
||||||
|
WorkbookSource = WorkbookSource
|
||||||
|
Caption = 'AcCellFont'
|
||||||
|
ImageIndex = 14
|
||||||
|
Dialog.MinFontSize = 0
|
||||||
|
Dialog.MaxFontSize = 0
|
||||||
|
end
|
||||||
|
object AcBackgroundColor: TsBackgroundColorAction
|
||||||
|
Category = 'FPSpreadsheet'
|
||||||
|
WorkbookSource = WorkbookSource
|
||||||
|
Caption = 'AcBackgroundColor'
|
||||||
|
ImageIndex = 22
|
||||||
|
Dialog.Color = clBlack
|
||||||
|
Dialog.CustomColors.Strings = (
|
||||||
|
'ColorA=000000'
|
||||||
|
'ColorB=000080'
|
||||||
|
'ColorC=008000'
|
||||||
|
'ColorD=008080'
|
||||||
|
'ColorE=800000'
|
||||||
|
'ColorF=800080'
|
||||||
|
'ColorG=808000'
|
||||||
|
'ColorH=808080'
|
||||||
|
'ColorI=C0C0C0'
|
||||||
|
'ColorJ=0000FF'
|
||||||
|
'ColorK=00FF00'
|
||||||
|
'ColorL=00FFFF'
|
||||||
|
'ColorM=FF0000'
|
||||||
|
'ColorN=FF00FF'
|
||||||
|
'ColorO=FFFF00'
|
||||||
|
'ColorP=FFFFFF'
|
||||||
|
'ColorQ=C0DCC0'
|
||||||
|
'ColorR=F0CAA6'
|
||||||
|
'ColorS=F0FBFF'
|
||||||
|
'ColorT=A4A0A0'
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object ImageList: TImageList
|
object ImageList: TImageList
|
||||||
left = 432
|
left = 432
|
||||||
top = 249
|
top = 249
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
4C69340000001000000010000000003F9300003F9300003F9300003F9424003F
|
4C69350000001000000010000000003F9300003F9300003F9300003F9424003F
|
||||||
948A003E93CC004095CC004095CC004095CC004095CC004095CC004095CC0040
|
948A003E93CC004095CC004095CC004095CC004095CC004095CC004095CC0040
|
||||||
95CC004095CC00409599003F9400003F9300003F9324003F938A0E4B9CD33F76
|
95CC004095CC00409599003F9400003F9300003F9324003F938A0E4B9CD33F76
|
||||||
C0EC5D90D4FF3365A9FFA0A0A0FFA9A9A9FFA9A9A9FFAAAAAAFFACACACFFAEAE
|
C0EC5D90D4FF3365A9FFA0A0A0FFA9A9A9FFA9A9A9FFAAAAAAFFACACACFFAEAE
|
||||||
@ -1356,6 +1409,38 @@ object Form1: TForm1
|
|||||||
010001010146010101CB010101CC00000048000000000000004E000000E40000
|
010001010146010101CB010101CC00000048000000000000004E000000E40000
|
||||||
00E900000053FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
00E900000053FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF006B6FFEFF6B6FFEFF6B6F
|
||||||
|
FEFFFFFFFF0073AAFFFF73AAFFFF73AAFFFFFFFFFF0067D5F0FF67D5F0FF67D5
|
||||||
|
F0FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF006B6FFEFF6B6FFEFF6B6F
|
||||||
|
FEFFFFFFFF0073AAFFFF73AAFFFF73AAFFFFFFFFFF0067D5F0FF67D5F0FF67D5
|
||||||
|
F0FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF006B6FFEFF6B6FFEFF6B6F
|
||||||
|
FEFFFFFFFF0073AAFFFF73AAFFFF73AAFFFFFFFFFF0067D5F0FF67D5F0FF67D5
|
||||||
|
F0FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B2EBD0FFB2EBD0FFB2EB
|
||||||
|
D0FFFFFFFF006DCC50FF6DCC50FF6DCC50FFFFFFFF00EBB060FFEBB060FFEBB0
|
||||||
|
60FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B2EBD0FFB2EBD0FFB2EB
|
||||||
|
D0FFFFFFFF006DCC50FF6DCC50FF6DCC50FFFFFFFF00EBB060FFEBB060FFEBB0
|
||||||
|
60FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B2EBD0FFB2EBD0FFB2EB
|
||||||
|
D0FFFFFFFF006DCC50FF6DCC50FF6DCC50FFFFFFFF00EBB060FFEBB060FFEBB0
|
||||||
|
60FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B07A58FFB07A58FFB07A
|
||||||
|
58FFFFFFFF00DD9BD9FFDD9BD9FFDD9BD9FFFFFFFF00B177FFFFB177FFFFB177
|
||||||
|
FFFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B07A58FFB07A58FFB07A
|
||||||
|
58FFFFFFFF00DD9BD9FFDD9BD9FFDD9BD9FFFFFFFF00B177FFFFB177FFFFB177
|
||||||
|
FFFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B07A58FFB07A58FFB07A
|
||||||
|
58FFFFFFFF00DD9BD9FFDD9BD9FFDD9BD9FFFFFFFF00B177FFFFB177FFFFB177
|
||||||
|
FFFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF007F7F554D7F7F55667F7F55667F7F55667F7F
|
FF00FFFFFF00FFFFFF00FFFFFF007F7F554D7F7F55667F7F55667F7F55667F7F
|
||||||
55667F7F55667F7F55667F7F55667F7F55667F7F55667F7F55667F7F55667F7F
|
55667F7F55667F7F55667F7F55667F7F55667F7F55667F7F55667F7F55667F7F
|
||||||
55667F7F55667F7F55667F7F554D7D7D5367FFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
55667F7F55667F7F55667F7F554D7D7D5367FFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
@ -92,6 +92,8 @@ type
|
|||||||
AcNumFormatTimeInterval: TsNumberFormatAction;
|
AcNumFormatTimeInterval: TsNumberFormatAction;
|
||||||
AcIncDecimals: TsDecimalsAction;
|
AcIncDecimals: TsDecimalsAction;
|
||||||
AcDecDecimals: TsDecimalsAction;
|
AcDecDecimals: TsDecimalsAction;
|
||||||
|
AcCellFont: TsFontAction;
|
||||||
|
AcBackgroundColor: TsBackgroundColorAction;
|
||||||
ToolButton11: TToolButton;
|
ToolButton11: TToolButton;
|
||||||
ToolButton12: TToolButton;
|
ToolButton12: TToolButton;
|
||||||
ToolButton13: TToolButton;
|
ToolButton13: TToolButton;
|
||||||
@ -122,7 +124,10 @@ type
|
|||||||
ToolButton26: TToolButton;
|
ToolButton26: TToolButton;
|
||||||
ToolButton27: TToolButton;
|
ToolButton27: TToolButton;
|
||||||
ToolButton28: TToolButton;
|
ToolButton28: TToolButton;
|
||||||
|
ToolButton29: TToolButton;
|
||||||
ToolButton3: TToolButton;
|
ToolButton3: TToolButton;
|
||||||
|
ToolButton30: TToolButton;
|
||||||
|
ToolButton31: TToolButton;
|
||||||
ToolButton4: TToolButton;
|
ToolButton4: TToolButton;
|
||||||
ToolButton5: TToolButton;
|
ToolButton5: TToolButton;
|
||||||
ToolButton6: TToolButton;
|
ToolButton6: TToolButton;
|
||||||
|
@ -3,7 +3,7 @@ unit fpsActions;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, Controls, ActnList,
|
SysUtils, Classes, Controls, Graphics, ActnList, StdActns, Dialogs,
|
||||||
fpspreadsheet, fpspreadsheetctrls;
|
fpspreadsheet, fpspreadsheetctrls;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -25,7 +25,6 @@ type
|
|||||||
property WorkbookSource: TsWorkbookSource read FWorkbookSource write FWorkbookSource;
|
property WorkbookSource: TsWorkbookSource read FWorkbookSource write FWorkbookSource;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ --- Actions related to worksheets --- }
|
{ --- Actions related to worksheets --- }
|
||||||
|
|
||||||
TsWorksheetAction = class(TsSpreadsheetAction)
|
TsWorksheetAction = class(TsSpreadsheetAction)
|
||||||
@ -97,6 +96,8 @@ type
|
|||||||
//
|
//
|
||||||
protected
|
protected
|
||||||
procedure ApplyFormatToCell(ACell: PCell); virtual;
|
procedure ApplyFormatToCell(ACell: PCell); virtual;
|
||||||
|
procedure ApplyFormatToRange(ARange: TsCellrange); virtual;
|
||||||
|
procedure ApplyFormatToSelection; virtual;
|
||||||
procedure ExtractFromCell(ACell: PCell); virtual;
|
procedure ExtractFromCell(ACell: PCell); virtual;
|
||||||
public
|
public
|
||||||
procedure ExecuteTarget(Target: TObject); override;
|
procedure ExecuteTarget(Target: TObject); override;
|
||||||
@ -246,14 +247,97 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ --- Actions like from TCommonDialogAction --- }
|
||||||
|
|
||||||
|
TsCommonDialogSpreadsheetAction = class(TsCellFormatAction)
|
||||||
|
private
|
||||||
|
FBeforeExecute: TNotifyEvent;
|
||||||
|
FExecuteResult: Boolean;
|
||||||
|
FOnAccept: TNotifyEvent;
|
||||||
|
FOnCancel: TNotifyEvent;
|
||||||
|
protected
|
||||||
|
FDialog: TCommonDialog;
|
||||||
|
procedure DoAccept; virtual;
|
||||||
|
procedure DoBeforeExecute; virtual;
|
||||||
|
procedure DoCancel; virtual;
|
||||||
|
function GetDialogClass: TCommonDialogClass; virtual;
|
||||||
|
procedure CreateDialog; virtual;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
procedure ExecuteTarget(Target: TObject); override;
|
||||||
|
property ExecuteResult: Boolean read FExecuteResult;
|
||||||
|
property BeforeExecute: TNotifyEvent read FBeforeExecute write FBeforeExecute;
|
||||||
|
property OnAccept: TNotifyEvent read FOnAccept write FOnAccept;
|
||||||
|
property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TsFontAction }
|
||||||
|
TsFontAction = class(TsCommonDialogSpreadsheetAction)
|
||||||
|
private
|
||||||
|
function GetDialog: TFontDialog;
|
||||||
|
protected
|
||||||
|
procedure ApplyFormatToCell(ACell: PCell); override;
|
||||||
|
procedure DoAccept; override;
|
||||||
|
procedure ExtractFromCell(ACell: PCell); override;
|
||||||
|
function GetDialogClass: TCommonDialogClass; override;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
published
|
||||||
|
property Caption;
|
||||||
|
property Dialog: TFontDialog read GetDialog;
|
||||||
|
property Enabled;
|
||||||
|
property HelpContext;
|
||||||
|
property HelpKeyword;
|
||||||
|
property HelpType;
|
||||||
|
property Hint;
|
||||||
|
property ImageIndex;
|
||||||
|
property ShortCut;
|
||||||
|
property SecondaryShortCuts;
|
||||||
|
property Visible;
|
||||||
|
// property BeforeExecute;
|
||||||
|
// property OnAccept;
|
||||||
|
// property OnCancel;
|
||||||
|
property OnHint;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TsBackgroundColorAction }
|
||||||
|
TsBackgroundColorAction = class(TsCommonDialogSpreadsheetAction)
|
||||||
|
private
|
||||||
|
FBackgroundColor: TsColor;
|
||||||
|
function GetDialog: TColorDialog;
|
||||||
|
protected
|
||||||
|
procedure ApplyFormatToCell(ACell: PCell); override;
|
||||||
|
procedure DoAccept; override;
|
||||||
|
procedure DoBeforeExecute; override;
|
||||||
|
procedure ExtractFromCell(ACell: PCell); override;
|
||||||
|
function GetDialogClass: TCommonDialogClass; override;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
published
|
||||||
|
property Caption;
|
||||||
|
property Dialog: TColorDialog read GetDialog;
|
||||||
|
property Enabled;
|
||||||
|
property HelpContext;
|
||||||
|
property HelpKeyword;
|
||||||
|
property HelpType;
|
||||||
|
property Hint;
|
||||||
|
property ImageIndex;
|
||||||
|
property ShortCut;
|
||||||
|
property SecondaryShortCuts;
|
||||||
|
property Visible;
|
||||||
|
// property BeforeExecute;
|
||||||
|
// property OnAccept;
|
||||||
|
// property OnCancel;
|
||||||
|
property OnHint;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Dialogs,
|
fpsutils, fpsVisualUtils;
|
||||||
fpsutils;
|
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
@ -261,7 +345,7 @@ begin
|
|||||||
// Worksheet-releated actions
|
// Worksheet-releated actions
|
||||||
TsWorksheetAddAction, TsWorksheetDeleteAction, TsWorksheetRenameAction,
|
TsWorksheetAddAction, TsWorksheetDeleteAction, TsWorksheetRenameAction,
|
||||||
// Cell or cell range formatting actions
|
// Cell or cell range formatting actions
|
||||||
TsFontStyleAction,
|
TsFontAction, TsFontStyleAction, TsBackgroundColorAction,
|
||||||
TsHorAlignmentAction, TsVertAlignmentAction,
|
TsHorAlignmentAction, TsVertAlignmentAction,
|
||||||
TsTextRotationAction, TsWordWrapAction,
|
TsTextRotationAction, TsWordWrapAction,
|
||||||
TsNumberFormatAction, TsDecimalsAction
|
TsNumberFormatAction, TsDecimalsAction
|
||||||
@ -463,24 +547,32 @@ begin
|
|||||||
Unused(ACell);
|
Unused(ACell);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TsCellFormatAction.ExecuteTarget(Target: TObject);
|
procedure TsCellFormatAction.ApplyFormatToRange(ARange: TsCellRange);
|
||||||
var
|
var
|
||||||
range: Integer;
|
r, c: Cardinal;
|
||||||
r,c: Cardinal;
|
|
||||||
sel: TsCellRangeArray;
|
|
||||||
cell: PCell;
|
cell: PCell;
|
||||||
begin
|
begin
|
||||||
if not HandlesTarget(Target) then
|
for r := ARange.Row1 to ARange.Row2 do
|
||||||
exit;
|
for c := ARange.Col1 to ARange.Col2 do
|
||||||
|
begin
|
||||||
|
cell := Worksheet.GetCell(r, c); // Use "GetCell" here to format empty cells as well
|
||||||
|
ApplyFormatToCell(cell); // no check for nil required because of "GetCell"
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsCellFormatAction.ApplyFormatToSelection;
|
||||||
|
var
|
||||||
|
sel: TsCellRangeArray;
|
||||||
|
range: Integer;
|
||||||
|
begin
|
||||||
sel := GetSelection;
|
sel := GetSelection;
|
||||||
for range := 0 to High(sel) do
|
for range := 0 to High(sel) do
|
||||||
for r := sel[range].Row1 to sel[range].Row2 do
|
ApplyFormatToRange(sel[range]);
|
||||||
for c := sel[range].Col1 to sel[range].Col2 do
|
end;
|
||||||
begin
|
|
||||||
cell := Worksheet.GetCell(r, c); // Use "GetCell", empty cells will be formatted!
|
procedure TsCellFormatAction.ExecuteTarget(Target: TObject);
|
||||||
if cell <> nil then
|
begin
|
||||||
ApplyFormatToCell(cell);
|
ApplyFormatToSelection;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Extracts the format item for which the action is responsible from the
|
{ Extracts the format item for which the action is responsible from the
|
||||||
@ -850,4 +942,169 @@ begin
|
|||||||
Hint := 'Less decimal places';
|
Hint := 'Less decimal places';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TsCommonDialogSpreadsheetAction }
|
||||||
|
|
||||||
|
constructor TsCommonDialogSpreadsheetAction.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(AOwner);
|
||||||
|
CreateDialog;
|
||||||
|
|
||||||
|
DisableIfNoHandler := False;
|
||||||
|
Enabled := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsCommonDialogSpreadsheetAction.CreateDialog;
|
||||||
|
var
|
||||||
|
DlgClass: TCommonDialogClass;
|
||||||
|
begin
|
||||||
|
DlgClass := GetDialogClass;
|
||||||
|
if Assigned(DlgClass) then
|
||||||
|
begin
|
||||||
|
FDialog := DlgClass.Create(Self);
|
||||||
|
FDialog.Name := DlgClass.ClassName;
|
||||||
|
FDialog.SetSubComponent(True);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsCommonDialogSpreadsheetAction.DoAccept;
|
||||||
|
begin
|
||||||
|
if Assigned(FOnAccept) then
|
||||||
|
FOnAccept(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsCommonDialogSpreadsheetAction.DoBeforeExecute;
|
||||||
|
begin
|
||||||
|
if Assigned(FBeforeExecute) then
|
||||||
|
FBeforeExecute(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsCommonDialogSpreadsheetAction.DoCancel;
|
||||||
|
begin
|
||||||
|
if Assigned(FOnCancel) then
|
||||||
|
FOnCancel(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TsCommonDialogSpreadsheetAction.GetDialogClass: TCommonDialogClass;
|
||||||
|
begin
|
||||||
|
result := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsCommonDialogSpreadsheetAction.ExecuteTarget(Target: TObject);
|
||||||
|
begin
|
||||||
|
DoBeforeExecute;
|
||||||
|
FExecuteResult := FDialog.Execute;
|
||||||
|
if FExecuteResult then
|
||||||
|
DoAccept
|
||||||
|
else
|
||||||
|
DoCancel;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TsFontAction }
|
||||||
|
|
||||||
|
constructor TsFontAction.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(AOwner);
|
||||||
|
Caption := 'Font';
|
||||||
|
Hint := 'Select cell font';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsFontAction.ApplyFormatToCell(ACell: PCell);
|
||||||
|
var
|
||||||
|
sfnt: TsFont;
|
||||||
|
begin
|
||||||
|
sfnt := TsFont.Create;
|
||||||
|
Convert_Font_to_sFont(Workbook, GetDialog.Font, sfnt);
|
||||||
|
Worksheet.WriteFont(ACell, Workbook.AddFont(sfnt));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsFontAction.DoAccept;
|
||||||
|
begin
|
||||||
|
ApplyFormatToSelection;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsFontAction.ExtractFromCell(ACell: PCell);
|
||||||
|
var
|
||||||
|
sfnt: TsFont;
|
||||||
|
fnt: TFont;
|
||||||
|
begin
|
||||||
|
fnt := TFont.Create;
|
||||||
|
try
|
||||||
|
if (ACell = nil) then
|
||||||
|
sfnt := Workbook.GetDefaultFont
|
||||||
|
else
|
||||||
|
if uffBold in ACell^.UsedFormattingFields then
|
||||||
|
sfnt := Workbook.GetFont(1)
|
||||||
|
else
|
||||||
|
if uffFont in ACell^.UsedFormattingFields then
|
||||||
|
sfnt := Workbook.GetFont(ACell^.FontIndex)
|
||||||
|
else
|
||||||
|
sfnt := Workbook.GetDefaultFont;
|
||||||
|
Convert_sFont_to_Font(Workbook, sfnt, fnt);
|
||||||
|
GetDialog.Font.Assign(fnt);
|
||||||
|
finally
|
||||||
|
fnt.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TsFontAction.GetDialog: TFontDialog;
|
||||||
|
begin
|
||||||
|
Result := TFontDialog(FDialog);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TsFontAction.GetDialogClass: TCommonDialogClass;
|
||||||
|
begin
|
||||||
|
Result := TFontDialog;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TsBackgroundColorAction }
|
||||||
|
|
||||||
|
constructor TsBackgroundColorAction.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(AOwner);
|
||||||
|
Caption := 'Backgroundcolor';
|
||||||
|
Hint := 'Modify background color';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsBackgroundColorAction.ApplyFormatToCell(ACell: PCell);
|
||||||
|
begin
|
||||||
|
Worksheet.WritebackgroundColor(ACell, FBackgroundColor);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsBackgroundColorAction.DoAccept;
|
||||||
|
begin
|
||||||
|
FBackgroundColor := Workbook.AddColorToPalette(TsColorValue(Dialog.Color));
|
||||||
|
ApplyFormatToSelection;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsBackgroundColorAction.DoBeforeExecute;
|
||||||
|
var
|
||||||
|
cell: PCell;
|
||||||
|
begin
|
||||||
|
cell := Worksheet.FindCell(Worksheet.ActiveCellRow, Worksheet.ActiveCellCol);
|
||||||
|
if (cell = nil) or not (uffBackgroundColor in cell^.UsedFormattingFields) then
|
||||||
|
FBackgroundColor := scNotDefined
|
||||||
|
else
|
||||||
|
FBackgroundColor := cell^.BackgroundColor;
|
||||||
|
Dialog.Color := Workbook.GetPaletteColor(FBackgroundColor);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TsBackgroundColorAction.ExtractFromCell(ACell: PCell);
|
||||||
|
begin
|
||||||
|
//
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TsBackgroundColorAction.GetDialog: TColorDialog;
|
||||||
|
begin
|
||||||
|
Result := TColorDialog(FDialog);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TsBackgroundColorAction.GetDialogClass: TCommonDialogClass;
|
||||||
|
begin
|
||||||
|
Result := TColorDialog;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -561,7 +561,8 @@ procedure Register;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Types, LCLType, LCLIntf, Math, fpCanvas, fpsUtils;
|
Types, LCLType, LCLIntf, Math,
|
||||||
|
fpCanvas, fpsUtils, fpsVisualUtils;
|
||||||
|
|
||||||
const
|
const
|
||||||
{@@ Translation of the fpspreadsheet type of horizontal text alignment to that
|
{@@ Translation of the fpspreadsheet type of horizontal text alignment to that
|
||||||
@ -643,83 +644,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{@@ ----------------------------------------------------------------------------
|
|
||||||
Wraps text by inserting line ending characters so that the lines are not
|
|
||||||
longer than AMaxWidth.
|
|
||||||
|
|
||||||
@param ACanvas Canvas on which the text will be drawn
|
|
||||||
@param AText Text to be drawn
|
|
||||||
@param AMaxWidth Maximimum line width (in pixels)
|
|
||||||
@return Text with inserted line endings such that the lines are shorter than
|
|
||||||
AMaxWidth.
|
|
||||||
|
|
||||||
@note Based on ocde posted by user "taazz" in the Lazarus forum
|
|
||||||
http://forum.lazarus.freepascal.org/index.php/topic,21305.msg124743.html#msg124743
|
|
||||||
-------------------------------------------------------------------------------}
|
|
||||||
function WrapText(ACanvas: TCanvas; const AText: string; AMaxWidth: integer): string;
|
|
||||||
var
|
|
||||||
DC: HDC;
|
|
||||||
textExtent: TSize = (cx:0; cy:0);
|
|
||||||
S, P, E: PChar;
|
|
||||||
line: string;
|
|
||||||
isFirstLine: boolean;
|
|
||||||
begin
|
|
||||||
Result := '';
|
|
||||||
DC := ACanvas.Handle;
|
|
||||||
isFirstLine := True;
|
|
||||||
P := PChar(AText);
|
|
||||||
while P^ = ' ' do
|
|
||||||
Inc(P);
|
|
||||||
while P^ <> #0 do begin
|
|
||||||
S := P;
|
|
||||||
E := nil;
|
|
||||||
while (P^ <> #0) and (P^ <> #13) and (P^ <> #10) do begin
|
|
||||||
LCLIntf.GetTextExtentPoint(DC, S, P - S + 1, textExtent);
|
|
||||||
if (textExtent.CX > AMaxWidth) and (E <> nil) then begin
|
|
||||||
if (P^ <> ' ') and (P^ <> ^I) then begin
|
|
||||||
while (E >= S) do
|
|
||||||
case E^ of
|
|
||||||
'.', ',', ';', '?', '!', '-', ':',
|
|
||||||
')', ']', '}', '>', '/', '\', ' ':
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
Dec(E);
|
|
||||||
end;
|
|
||||||
if E < S then
|
|
||||||
E := P - 1;
|
|
||||||
end;
|
|
||||||
Break;
|
|
||||||
end;
|
|
||||||
E := P;
|
|
||||||
Inc(P);
|
|
||||||
end;
|
|
||||||
if E <> nil then begin
|
|
||||||
while (E >= S) and (E^ = ' ') do
|
|
||||||
Dec(E);
|
|
||||||
end;
|
|
||||||
if E <> nil then
|
|
||||||
SetString(Line, S, E - S + 1)
|
|
||||||
else
|
|
||||||
SetLength(Line, 0);
|
|
||||||
if (P^ = #13) or (P^ = #10) then begin
|
|
||||||
Inc(P);
|
|
||||||
if (P^ <> (P - 1)^) and ((P^ = #13) or (P^ = #10)) then
|
|
||||||
Inc(P);
|
|
||||||
if P^ = #0 then
|
|
||||||
line := line + LineEnding;
|
|
||||||
end
|
|
||||||
else if P^ <> ' ' then
|
|
||||||
P := E + 1;
|
|
||||||
while P^ = ' ' do
|
|
||||||
Inc(P);
|
|
||||||
if isFirstLine then begin
|
|
||||||
Result := Line;
|
|
||||||
isFirstLine := False;
|
|
||||||
end else
|
|
||||||
Result := Result + LineEnding + line;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
Calculates a background color for selected cells. The procedures takes the
|
Calculates a background color for selected cells. The procedures takes the
|
||||||
original background color and dims or brightens it by adding the value ADelta
|
original background color and dims or brightens it by adding the value ADelta
|
||||||
@ -1075,16 +999,7 @@ end;
|
|||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
procedure TsCustomWorksheetGrid.Convert_sFont_to_Font(sFont: TsFont; AFont: TFont);
|
procedure TsCustomWorksheetGrid.Convert_sFont_to_Font(sFont: TsFont; AFont: TFont);
|
||||||
begin
|
begin
|
||||||
if Assigned(AFont) and Assigned(sFont) then begin
|
fpsVisualUtils.Convert_sFont_to_Font(Workbook, sFont, Font);
|
||||||
AFont.Name := sFont.FontName;
|
|
||||||
AFont.Size := round(sFont.Size);
|
|
||||||
AFont.Style := [];
|
|
||||||
if fssBold in sFont.Style then AFont.Style := AFont.Style + [fsBold];
|
|
||||||
if fssItalic in sFont.Style then AFont.Style := AFont.Style + [fsItalic];
|
|
||||||
if fssUnderline in sFont.Style then AFont.Style := AFont.Style + [fsUnderline];
|
|
||||||
if fssStrikeout in sFont.Style then AFont.Style := AFont.Style + [fsStrikeout];
|
|
||||||
AFont.Color := Workbook.GetPaletteColor(sFont.Color);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
@ -1096,16 +1011,7 @@ end;
|
|||||||
procedure TsCustomWorksheetGrid.Convert_Font_to_sFont(AFont: TFont;
|
procedure TsCustomWorksheetGrid.Convert_Font_to_sFont(AFont: TFont;
|
||||||
sFont: TsFont);
|
sFont: TsFont);
|
||||||
begin
|
begin
|
||||||
if Assigned(AFont) and Assigned(sFont) then begin
|
fpsVisualUtils.Convert_Font_to_sFont(Workbook, AFont, sFont);
|
||||||
sFont.FontName := AFont.Name;
|
|
||||||
sFont.Size := AFont.Size;
|
|
||||||
sFont.Style := [];
|
|
||||||
if fsBold in AFont.Style then Include(sFont.Style, fssBold);
|
|
||||||
if fsItalic in AFont.Style then Include(sFont.Style, fssItalic);
|
|
||||||
if fsUnderline in AFont.Style then Include(sFont.Style, fssUnderline);
|
|
||||||
if fsStrikeout in AFont.Style then Include(sFont.Style, fssStrikeout);
|
|
||||||
sFont.Color := FindNearestPaletteIndex(AFont.Color);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
@ -2035,93 +1941,10 @@ end;
|
|||||||
@param AColor Color index into the workbook's palette
|
@param AColor Color index into the workbook's palette
|
||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
function TsCustomWorksheetGrid.FindNearestPaletteIndex(AColor: TColor): TsColor;
|
function TsCustomWorksheetGrid.FindNearestPaletteIndex(AColor: TColor): TsColor;
|
||||||
|
|
||||||
procedure ColorToHSL(RGB: TColor; out H, S, L : double);
|
|
||||||
// Taken from https://code.google.com/p/thtmlviewer/source/browse/trunk/source/HSLUtils.pas?r=277
|
|
||||||
// The procedure in GraphUtils crashes for some colors in Laz < 1.3
|
|
||||||
var
|
|
||||||
R, G, B, D, Cmax, Cmin: double;
|
|
||||||
begin
|
|
||||||
R := GetRValue(RGB) / 255;
|
|
||||||
G := GetGValue(RGB) / 255;
|
|
||||||
B := GetBValue(RGB) / 255;
|
|
||||||
Cmax := Max(R, Max(G, B));
|
|
||||||
Cmin := Min(R, Min(G, B));
|
|
||||||
|
|
||||||
// calculate luminosity
|
|
||||||
L := (Cmax + Cmin) / 2;
|
|
||||||
|
|
||||||
if Cmax = Cmin then begin // it's grey
|
|
||||||
H := 0; // it's actually undefined
|
|
||||||
S := 0
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
D := Cmax - Cmin;
|
|
||||||
|
|
||||||
// calculate Saturation
|
|
||||||
if L < 0.5 then
|
|
||||||
S := D / (Cmax + Cmin)
|
|
||||||
else
|
|
||||||
S := D / (2 - Cmax - Cmin);
|
|
||||||
|
|
||||||
// calculate Hue
|
|
||||||
if R = Cmax then
|
|
||||||
H := (G - B) / D
|
|
||||||
else
|
|
||||||
if G = Cmax then
|
|
||||||
H := 2 + (B - R) /D
|
|
||||||
else
|
|
||||||
H := 4 + (R - G) / D;
|
|
||||||
|
|
||||||
H := H / 6;
|
|
||||||
if H < 0 then
|
|
||||||
H := H + 1
|
|
||||||
end
|
|
||||||
end;
|
|
||||||
|
|
||||||
function ColorDistance(color1, color2: TColor): Double;
|
|
||||||
var
|
|
||||||
H1,S1,L1, H2,S2,L2: Double;
|
|
||||||
begin
|
|
||||||
ColorToHSL(color1, H1, S1, L1);
|
|
||||||
ColorToHSL(color2, H2, S2, L2);
|
|
||||||
Result := sqr(H1-H2) + sqr(S1-S2) + sqr(L1-L2);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{
|
|
||||||
// To be activated when Lazarus 1.4 is available. (RgbToHLS bug in Laz < 1.3)
|
|
||||||
|
|
||||||
function ColorDistance(color1, color2: TColor): Integer;
|
|
||||||
type
|
|
||||||
TRGBA = packed record R, G, B, A: Byte end;
|
|
||||||
var
|
|
||||||
H1,L1,S1, H2,L2,S2: Byte;
|
|
||||||
begin
|
|
||||||
ColorToHLS(color1, H1,L1,S1);
|
|
||||||
ColorToHLS(color2, H2,L2,S2);
|
|
||||||
result := sqr(Integer(H1)-H2) + sqr(Integer(L1)-L2) + sqr(Integer(S1)-S2);
|
|
||||||
end;
|
|
||||||
}
|
|
||||||
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
dist, mindist: Double;
|
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := fpsVisualUtils.FindNearestPaletteIndex(Workbook, AColor);
|
||||||
if Workbook <> nil then
|
|
||||||
begin
|
|
||||||
mindist := 1E308;
|
|
||||||
for i:=0 to Workbook.GetPaletteSize-1 do
|
|
||||||
begin
|
|
||||||
dist := ColorDistance(AColor, TColor(Workbook.GetPaletteColor(i)));
|
|
||||||
if dist < mindist then
|
|
||||||
begin
|
|
||||||
mindist := dist;
|
|
||||||
Result := i;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(*
|
(*
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
Notification by the workbook link that a cell has been modified. --> Repaint.
|
Notification by the workbook link that a cell has been modified. --> Repaint.
|
||||||
|
227
components/fpspreadsheet/fpsvisualutils.pas
Normal file
227
components/fpspreadsheet/fpsvisualutils.pas
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
unit fpsvisualutils;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Graphics,
|
||||||
|
fpspreadsheet;
|
||||||
|
|
||||||
|
procedure Convert_sFont_to_Font(AWorkbook: TsWorkbook; sFont: TsFont; AFont: TFont);
|
||||||
|
procedure Convert_Font_to_sFont(AWorkbook: TsWorkbook; AFont: TFont; sFont: TsFont);
|
||||||
|
function FindNearestPaletteIndex(AWorkbook: TsWorkbook; AColor: TColor): TsColor;
|
||||||
|
function WrapText(ACanvas: TCanvas; const AText: string; AMaxWidth: integer): string;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
Types, LCLType, LCLIntf, Math;
|
||||||
|
|
||||||
|
{@@ ----------------------------------------------------------------------------
|
||||||
|
Converts a spreadsheet font to a font used for painting (TCanvas.Font).
|
||||||
|
|
||||||
|
@param AWorkbook Workbook in which the font is used
|
||||||
|
@param sFont Font as used by fpspreadsheet (input)
|
||||||
|
@param AFont Font as used by TCanvas for painting (output)
|
||||||
|
-------------------------------------------------------------------------------}
|
||||||
|
procedure Convert_sFont_to_Font(AWorkbook: TsWorkbook; sFont: TsFont; AFont: TFont);
|
||||||
|
begin
|
||||||
|
if Assigned(AFont) and Assigned(sFont) then begin
|
||||||
|
AFont.Name := sFont.FontName;
|
||||||
|
AFont.Size := round(sFont.Size);
|
||||||
|
AFont.Style := [];
|
||||||
|
if fssBold in sFont.Style then AFont.Style := AFont.Style + [fsBold];
|
||||||
|
if fssItalic in sFont.Style then AFont.Style := AFont.Style + [fsItalic];
|
||||||
|
if fssUnderline in sFont.Style then AFont.Style := AFont.Style + [fsUnderline];
|
||||||
|
if fssStrikeout in sFont.Style then AFont.Style := AFont.Style + [fsStrikeout];
|
||||||
|
AFont.Color := AWorkbook.GetPaletteColor(sFont.Color);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{@@ ----------------------------------------------------------------------------
|
||||||
|
Converts a font used for painting (TCanvas.Font) to a spreadsheet font.
|
||||||
|
|
||||||
|
@param AFont Font as used by TCanvas for painting (input)
|
||||||
|
@param sFont Font as used by fpspreadsheet (output)
|
||||||
|
-------------------------------------------------------------------------------}
|
||||||
|
procedure Convert_Font_to_sFont(AWorkbook: TsWorkbook; AFont: TFont; sFont: TsFont);
|
||||||
|
begin
|
||||||
|
if Assigned(AFont) and Assigned(sFont) then begin
|
||||||
|
sFont.FontName := AFont.Name;
|
||||||
|
sFont.Size := AFont.Size;
|
||||||
|
sFont.Style := [];
|
||||||
|
if fsBold in AFont.Style then Include(sFont.Style, fssBold);
|
||||||
|
if fsItalic in AFont.Style then Include(sFont.Style, fssItalic);
|
||||||
|
if fsUnderline in AFont.Style then Include(sFont.Style, fssUnderline);
|
||||||
|
if fsStrikeout in AFont.Style then Include(sFont.Style, fssStrikeout);
|
||||||
|
sFont.Color := FindNearestPaletteIndex(AWorkbook, AFont.Color);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function FindNearestPaletteIndex(AWorkbook: TsWorkbook; AColor: TColor): TsColor;
|
||||||
|
|
||||||
|
procedure ColorToHSL(RGB: TColor; out H, S, L : double);
|
||||||
|
// Taken from https://code.google.com/p/thtmlviewer/source/browse/trunk/source/HSLUtils.pas?r=277
|
||||||
|
// The procedure in GraphUtils crashes for some colors in Laz < 1.3
|
||||||
|
var
|
||||||
|
R, G, B, D, Cmax, Cmin: double;
|
||||||
|
begin
|
||||||
|
R := GetRValue(RGB) / 255;
|
||||||
|
G := GetGValue(RGB) / 255;
|
||||||
|
B := GetBValue(RGB) / 255;
|
||||||
|
Cmax := Max(R, Max(G, B));
|
||||||
|
Cmin := Min(R, Min(G, B));
|
||||||
|
|
||||||
|
// calculate luminosity
|
||||||
|
L := (Cmax + Cmin) / 2;
|
||||||
|
|
||||||
|
if Cmax = Cmin then begin // it's grey
|
||||||
|
H := 0; // it's actually undefined
|
||||||
|
S := 0
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
D := Cmax - Cmin;
|
||||||
|
|
||||||
|
// calculate Saturation
|
||||||
|
if L < 0.5 then
|
||||||
|
S := D / (Cmax + Cmin)
|
||||||
|
else
|
||||||
|
S := D / (2 - Cmax - Cmin);
|
||||||
|
|
||||||
|
// calculate Hue
|
||||||
|
if R = Cmax then
|
||||||
|
H := (G - B) / D
|
||||||
|
else
|
||||||
|
if G = Cmax then
|
||||||
|
H := 2 + (B - R) /D
|
||||||
|
else
|
||||||
|
H := 4 + (R - G) / D;
|
||||||
|
|
||||||
|
H := H / 6;
|
||||||
|
if H < 0 then
|
||||||
|
H := H + 1
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
|
function ColorDistance(color1, color2: TColor): Double;
|
||||||
|
var
|
||||||
|
H1,S1,L1, H2,S2,L2: Double;
|
||||||
|
begin
|
||||||
|
ColorToHSL(color1, H1, S1, L1);
|
||||||
|
ColorToHSL(color2, H2, S2, L2);
|
||||||
|
Result := sqr(H1-H2) + sqr(S1-S2) + sqr(L1-L2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
{
|
||||||
|
// To be activated when Lazarus 1.4 is available. (RgbToHLS bug in Laz < 1.3)
|
||||||
|
|
||||||
|
function ColorDistance(color1, color2: TColor): Integer;
|
||||||
|
type
|
||||||
|
TRGBA = packed record R, G, B, A: Byte end;
|
||||||
|
var
|
||||||
|
H1,L1,S1, H2,L2,S2: Byte;
|
||||||
|
begin
|
||||||
|
ColorToHLS(color1, H1,L1,S1);
|
||||||
|
ColorToHLS(color2, H2,L2,S2);
|
||||||
|
result := sqr(Integer(H1)-H2) + sqr(Integer(L1)-L2) + sqr(Integer(S1)-S2);
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
dist, mindist: Double;
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
if AWorkbook <> nil then
|
||||||
|
begin
|
||||||
|
mindist := 1E308;
|
||||||
|
for i:=0 to AWorkbook.GetPaletteSize-1 do
|
||||||
|
begin
|
||||||
|
dist := ColorDistance(AColor, TColor(AWorkbook.GetPaletteColor(i)));
|
||||||
|
if dist < mindist then
|
||||||
|
begin
|
||||||
|
mindist := dist;
|
||||||
|
Result := i;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{@@ ----------------------------------------------------------------------------
|
||||||
|
Wraps text by inserting line ending characters so that the lines are not
|
||||||
|
longer than AMaxWidth.
|
||||||
|
|
||||||
|
@param ACanvas Canvas on which the text will be drawn
|
||||||
|
@param AText Text to be drawn
|
||||||
|
@param AMaxWidth Maximimum line width (in pixels)
|
||||||
|
@return Text with inserted line endings such that the lines are shorter than
|
||||||
|
AMaxWidth.
|
||||||
|
|
||||||
|
@note Based on ocde posted by user "taazz" in the Lazarus forum
|
||||||
|
http://forum.lazarus.freepascal.org/index.php/topic,21305.msg124743.html#msg124743
|
||||||
|
-------------------------------------------------------------------------------}
|
||||||
|
function WrapText(ACanvas: TCanvas; const AText: string; AMaxWidth: integer): string;
|
||||||
|
var
|
||||||
|
DC: HDC;
|
||||||
|
textExtent: TSize = (cx:0; cy:0);
|
||||||
|
S, P, E: PChar;
|
||||||
|
line: string;
|
||||||
|
isFirstLine: boolean;
|
||||||
|
begin
|
||||||
|
Result := '';
|
||||||
|
DC := ACanvas.Handle;
|
||||||
|
isFirstLine := True;
|
||||||
|
P := PChar(AText);
|
||||||
|
while P^ = ' ' do
|
||||||
|
Inc(P);
|
||||||
|
while P^ <> #0 do begin
|
||||||
|
S := P;
|
||||||
|
E := nil;
|
||||||
|
while (P^ <> #0) and (P^ <> #13) and (P^ <> #10) do begin
|
||||||
|
LCLIntf.GetTextExtentPoint(DC, S, P - S + 1, textExtent);
|
||||||
|
if (textExtent.CX > AMaxWidth) and (E <> nil) then begin
|
||||||
|
if (P^ <> ' ') and (P^ <> ^I) then begin
|
||||||
|
while (E >= S) do
|
||||||
|
case E^ of
|
||||||
|
'.', ',', ';', '?', '!', '-', ':',
|
||||||
|
')', ']', '}', '>', '/', '\', ' ':
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
Dec(E);
|
||||||
|
end;
|
||||||
|
if E < S then
|
||||||
|
E := P - 1;
|
||||||
|
end;
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
E := P;
|
||||||
|
Inc(P);
|
||||||
|
end;
|
||||||
|
if E <> nil then begin
|
||||||
|
while (E >= S) and (E^ = ' ') do
|
||||||
|
Dec(E);
|
||||||
|
end;
|
||||||
|
if E <> nil then
|
||||||
|
SetString(Line, S, E - S + 1)
|
||||||
|
else
|
||||||
|
SetLength(Line, 0);
|
||||||
|
if (P^ = #13) or (P^ = #10) then begin
|
||||||
|
Inc(P);
|
||||||
|
if (P^ <> (P - 1)^) and ((P^ = #13) or (P^ = #10)) then
|
||||||
|
Inc(P);
|
||||||
|
if P^ = #0 then
|
||||||
|
line := line + LineEnding;
|
||||||
|
end
|
||||||
|
else if P^ <> ' ' then
|
||||||
|
P := E + 1;
|
||||||
|
while P^ = ' ' do
|
||||||
|
Inc(P);
|
||||||
|
if isFirstLine then begin
|
||||||
|
Result := Line;
|
||||||
|
isFirstLine := False;
|
||||||
|
end else
|
||||||
|
Result := Result + LineEnding + line;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
@ -20,7 +20,7 @@
|
|||||||
It provides graphical components like a grid and chart."/>
|
It provides graphical components like a grid and chart."/>
|
||||||
<License Value="LGPL with static linking exception. This is the same license as is used in the LCL (Lazarus Component Library)."/>
|
<License Value="LGPL with static linking exception. This is the same license as is used in the LCL (Lazarus Component Library)."/>
|
||||||
<Version Major="1" Minor="2"/>
|
<Version Major="1" Minor="2"/>
|
||||||
<Files Count="4">
|
<Files Count="5">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="fpspreadsheetctrls.pas"/>
|
<Filename Value="fpspreadsheetctrls.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
@ -41,6 +41,10 @@ It provides graphical components like a grid and chart."/>
|
|||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="fpsActions"/>
|
<UnitName Value="fpsActions"/>
|
||||||
</Item4>
|
</Item4>
|
||||||
|
<Item5>
|
||||||
|
<Filename Value="fpsvisualutils.pas"/>
|
||||||
|
<UnitName Value="fpsvisualutils"/>
|
||||||
|
</Item5>
|
||||||
</Files>
|
</Files>
|
||||||
<Type Value="RunAndDesignTime"/>
|
<Type Value="RunAndDesignTime"/>
|
||||||
<RequiredPkgs Count="4">
|
<RequiredPkgs Count="4">
|
||||||
|
@ -8,7 +8,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
fpspreadsheetctrls, fpspreadsheetgrid, fpspreadsheetchart, fpsActions,
|
fpspreadsheetctrls, fpspreadsheetgrid, fpspreadsheetchart, fpsActions,
|
||||||
LazarusPackageIntf;
|
fpsvisualutils, LazarusPackageIntf;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ begin
|
|||||||
RegisterUnit('fpspreadsheetctrls', @fpspreadsheetctrls.Register);
|
RegisterUnit('fpspreadsheetctrls', @fpspreadsheetctrls.Register);
|
||||||
RegisterUnit('fpspreadsheetgrid', @fpspreadsheetgrid.Register);
|
RegisterUnit('fpspreadsheetgrid', @fpspreadsheetgrid.Register);
|
||||||
RegisterUnit('fpspreadsheetchart', @fpspreadsheetchart.Register);
|
RegisterUnit('fpspreadsheetchart', @fpspreadsheetchart.Register);
|
||||||
RegisterUnit('fpsactions', @fpsactions.Register);
|
RegisterUnit('fpsActions', @fpsActions.Register);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
Reference in New Issue
Block a user