fpspreadsheet: Some improvements in Laz 1.0 compatibility, still issues. Fix style error in wikitable writer.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3885 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2015-01-14 15:34:20 +00:00
parent fd627c1fa1
commit 80c2ec255c
25 changed files with 408 additions and 690 deletions

View File

@ -2,21 +2,21 @@ object Form1: TForm1
Left = 354
Height = 634
Top = 132
Width = 875
Width = 877
Caption = 'Form1'
ClientHeight = 634
ClientWidth = 875
ClientWidth = 877
OnCreate = FormCreate
LCLVersion = '1.3'
LCLVersion = '1.5'
object Panel1: TPanel
Left = 0
Height = 40
Top = 0
Width = 875
Width = 877
Align = alTop
BevelOuter = bvNone
ClientHeight = 40
ClientWidth = 875
ClientWidth = 877
TabOrder = 0
object Button1: TButton
Left = 8
@ -40,13 +40,13 @@ object Form1: TForm1
Left = 0
Height = 3
Top = 37
Width = 875
Width = 877
Align = alBottom
Shape = bsBottomLine
end
end
object Splitter1: TSplitter
Left = 870
Left = 872
Height = 594
Top = 40
Width = 5
@ -57,7 +57,7 @@ object Form1: TForm1
Left = 6
Height = 582
Top = 46
Width = 388
Width = 390
TabIndex = 0
Tabs.Strings = (
'Sheet1'
@ -70,7 +70,7 @@ object Form1: TForm1
Left = 2
Height = 557
Top = 23
Width = 384
Width = 386
FrozenCols = 0
FrozenRows = 0
ReadFormulas = False
@ -91,7 +91,7 @@ object Form1: TForm1
end
end
object Panel2: TPanel
Left = 400
Left = 402
Height = 594
Top = 40
Width = 470

View File

@ -2,10 +2,10 @@ object FPSChartForm: TFPSChartForm
Left = 259
Height = 382
Top = 146
Width = 699
Width = 697
Caption = 'FPSpreadsheet Chart Example'
ClientHeight = 382
ClientWidth = 699
ClientWidth = 697
OnCreate = FormCreate
LCLVersion = '1.5'
object MyChart: TChart
@ -26,6 +26,7 @@ object FPSChartForm: TFPSChartForm
Marks.Style = smsLabel
Minors = <>
end>
BackColor = clWhite
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Title.Brush.Color = clBtnFace

View File

@ -66,5 +66,9 @@ begin
editSourceFile.Text := 't1.xls';
end;
initialization
// Property Text is not published in older versions of Lazarus
RegisterPropertyToSkip(TFileNameEdit, 'Text', 'Not used in Laz 1.0', '');
end.

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@ -40,6 +40,9 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</Item2>
</BuildModes>
@ -97,6 +100,9 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">

View File

@ -2,18 +2,18 @@ object Form1: TForm1
Left = 495
Height = 600
Top = 132
Width = 941
Width = 929
Caption = 'Form1'
ClientHeight = 580
ClientWidth = 941
ClientWidth = 929
Menu = MainMenu
ShowHint = True
LCLVersion = '1.3'
LCLVersion = '1.5'
object WorkbookTabControl: TsWorkbookTabControl
Left = 0
Height = 497
Top = 83
Width = 683
Width = 671
TabIndex = 0
Tabs.Strings = (
'Sheet1'
@ -25,7 +25,7 @@ object Form1: TForm1
Left = 2
Height = 472
Top = 23
Width = 679
Width = 667
FrozenCols = 0
FrozenRows = 0
ReadFormulas = False
@ -48,7 +48,7 @@ object Form1: TForm1
end
end
object InspectorTabControl: TTabControl
Left = 688
Left = 676
Height = 497
Top = 83
Width = 253
@ -104,37 +104,14 @@ object Form1: TForm1
)
WorkbookSource = WorkbookSource
Mode = imWorkbook
RowHeights = (
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
ColWidths = (
114
114
)
end
end
object Splitter1: TSplitter
Left = 683
Left = 671
Height = 497
Top = 83
Width = 5
@ -145,7 +122,7 @@ object Form1: TForm1
Left = 0
Height = 26
Top = 24
Width = 941
Width = 929
AutoSize = True
ButtonHeight = 26
ButtonWidth = 24
@ -413,7 +390,7 @@ object Form1: TForm1
Left = 0
Height = 24
Top = 0
Width = 941
Width = 929
AutoSize = True
ButtonHeight = 24
ButtonWidth = 24
@ -533,7 +510,7 @@ object Form1: TForm1
Left = 0
Height = 28
Top = 50
Width = 941
Width = 929
AutoSize = True
Caption = 'ToolBar3'
Constraints.MinHeight = 28
@ -564,7 +541,7 @@ object Form1: TForm1
Left = 144
Height = 24
Top = 0
Width = 797
Width = 785
Align = alClient
BorderSpacing.Bottom = 2
TabOrder = 1
@ -583,7 +560,7 @@ object Form1: TForm1
Left = 0
Height = 5
Top = 78
Width = 941
Width = 929
Align = alTop
ResizeAnchor = akTop
end

View File

@ -66,11 +66,6 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<IgnoredMessages idx11031="True" idx11030="True"/>
</CompilerMessages>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">

View File

@ -2,22 +2,22 @@ object Form1: TForm1
Left = 361
Height = 528
Top = 177
Width = 874
Width = 878
Caption = 'Form1'
ClientHeight = 503
ClientWidth = 874
ClientHeight = 508
ClientWidth = 878
Menu = MainMenu
OnCreate = FormCreate
LCLVersion = '1.3'
LCLVersion = '1.5'
object Panel1: TPanel
Left = 0
Height = 74
Top = 24
Width = 874
Width = 878
Align = alTop
BevelOuter = bvNone
ClientHeight = 74
ClientWidth = 874
ClientWidth = 878
TabOrder = 0
object BtnLoad: TButton
Left = 280
@ -126,10 +126,10 @@ object Form1: TForm1
end
object CbLoader: TComboBox
Left = 104
Height = 28
Height = 23
Top = 8
Width = 148
ItemHeight = 20
ItemHeight = 15
ItemIndex = 1
Items.Strings = (
'Workbook'
@ -142,16 +142,16 @@ object Form1: TForm1
end
object Label1: TLabel
Left = 13
Height = 20
Height = 15
Top = 11
Width = 73
Width = 58
Caption = 'Loaded by:'
ParentColor = False
end
end
object InspectorTabControl: TTabControl
Left = 577
Height = 405
Left = 581
Height = 410
Top = 98
Width = 297
OnChange = InspectorTabControlChange
@ -166,8 +166,8 @@ object Form1: TForm1
TabOrder = 1
end
object Splitter1: TSplitter
Left = 572
Height = 405
Left = 576
Height = 410
Top = 98
Width = 5
Align = alRight
@ -177,7 +177,7 @@ object Form1: TForm1
Left = 0
Height = 24
Top = 0
Width = 874
Width = 878
AutoSize = True
Caption = 'ToolBar1'
Images = ImageList1

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@ -74,6 +74,9 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="5">

View File

@ -2,21 +2,21 @@ object Form1: TForm1
Left = 409
Height = 649
Top = 248
Width = 895
Width = 894
Caption = 'fpsGrid'
ClientHeight = 649
ClientWidth = 895
ClientWidth = 894
ShowHint = True
LCLVersion = '1.3'
LCLVersion = '1.5'
object Panel1: TPanel
Left = 0
Height = 41
Top = 608
Width = 895
Width = 894
Align = alBottom
BevelOuter = bvNone
ClientHeight = 41
ClientWidth = 895
ClientWidth = 894
TabOrder = 0
object BtnOpen: TButton
Left = 96
@ -50,7 +50,7 @@ object Form1: TForm1
Left = 0
Height = 572
Top = 36
Width = 895
Width = 894
FrozenCols = 0
FrozenRows = 0
ReadFormulas = False
@ -62,119 +62,16 @@ object Form1: TForm1
RowCount = 101
TabOrder = 1
TitleStyle = tsNative
RowHeights = (
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
)
end
object Panel2: TPanel
Left = 0
Height = 36
Top = 0
Width = 895
Width = 894
Align = alTop
BevelOuter = bvNone
ClientHeight = 36
ClientWidth = 895
ClientWidth = 894
TabOrder = 2
object Label1: TLabel
Left = 8
@ -188,7 +85,7 @@ object Form1: TForm1
Left = 72
Height = 23
Top = 4
Width = 819
Width = 818
Anchors = [akTop, akLeft, akRight]
ItemHeight = 15
ItemIndex = 0

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@ -40,6 +40,9 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</Item2>
</BuildModes>
@ -95,6 +98,9 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">

View File

@ -1,22 +1,22 @@
object Form1: TForm1
Left = 340
Height = 413
Height = 420
Top = 154
Width = 676
Width = 680
Caption = 'Form1'
ClientHeight = 413
ClientWidth = 676
ClientHeight = 420
ClientWidth = 680
OnCreate = FormCreate
LCLVersion = '1.3'
LCLVersion = '1.5'
object ButtonPanel: TPanel
Left = 0
Height = 38
Top = 375
Width = 676
Top = 382
Width = 680
Align = alBottom
BevelOuter = bvNone
ClientHeight = 38
ClientWidth = 676
ClientWidth = 680
TabOrder = 0
object BtnNew: TButton
Left = 8
@ -48,9 +48,9 @@ object Form1: TForm1
end
object TabControl: TTabControl
Left = 0
Height = 375
Height = 382
Top = 0
Width = 676
Width = 680
OnChange = TabControlChange
TabIndex = 0
Tabs.Strings = (

View File

@ -2,24 +2,24 @@ object MainFrm: TMainFrm
Left = 409
Height = 639
Top = 258
Width = 884
Width = 885
Caption = 'spready'
ClientHeight = 619
ClientWidth = 884
ClientWidth = 885
Menu = MainMenu
OnActivate = FormActivate
OnCreate = FormCreate
ShowHint = True
LCLVersion = '1.3'
LCLVersion = '1.5'
object Panel1: TPanel
Left = 0
Height = 82
Top = 537
Width = 884
Width = 885
Align = alBottom
BevelOuter = bvNone
ClientHeight = 82
ClientWidth = 884
ClientWidth = 885
TabOrder = 6
object EdFrozenCols: TSpinEdit
Left = 429
@ -106,7 +106,7 @@ object MainFrm: TMainFrm
Left = 0
Height = 26
Top = 0
Width = 884
Width = 885
ButtonHeight = 24
Caption = 'ToolBar1'
EdgeBorders = []
@ -186,7 +186,7 @@ object MainFrm: TMainFrm
Left = 0
Height = 27
Top = 26
Width = 884
Width = 885
ButtonHeight = 23
Caption = 'FormatToolBar'
Images = ImageList
@ -368,7 +368,7 @@ object MainFrm: TMainFrm
Left = 0
Height = 26
Top = 53
Width = 884
Width = 885
Caption = 'FormulaToolBar'
Constraints.MinHeight = 26
TabOrder = 2
@ -382,7 +382,7 @@ object MainFrm: TMainFrm
Left = 176
Height = 24
Top = 2
Width = 708
Width = 709
Align = alClient
OnEditingDone = MemoFormulaEditingDone
TabOrder = 1
@ -412,7 +412,7 @@ object MainFrm: TMainFrm
end
end
object InspectorSplitter: TSplitter
Left = 638
Left = 639
Height = 453
Top = 84
Width = 5
@ -420,7 +420,7 @@ object MainFrm: TMainFrm
ResizeAnchor = akRight
end
object InspectorPageControl: TPageControl
Left = 643
Left = 644
Height = 453
Top = 84
Width = 241
@ -464,22 +464,9 @@ object MainFrm: TMainFrm
''
''
)
RowHeights = (
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
ColWidths = (
114
115
)
end
end
@ -494,7 +481,7 @@ object MainFrm: TMainFrm
Left = 0
Height = 453
Top = 84
Width = 638
Width = 639
OnChange = TabControlChange
Align = alClient
TabOrder = 3
@ -502,7 +489,7 @@ object MainFrm: TMainFrm
Left = 2
Height = 448
Top = 3
Width = 634
Width = 635
FrozenCols = 0
FrozenRows = 0
ReadFormulas = False
@ -517,109 +504,6 @@ object MainFrm: TMainFrm
TitleStyle = tsNative
OnHeaderClick = WorksheetGridHeaderClick
OnSelection = WorksheetGridSelection
RowHeights = (
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
)
end
end
object Splitter1: TSplitter
@ -627,7 +511,7 @@ object MainFrm: TMainFrm
Left = 0
Height = 5
Top = 79
Width = 884
Width = 885
Align = alTop
ResizeAnchor = akTop
end

View File

@ -8,3 +8,6 @@ Technically, WikiTableMaker is a moderately stripped-down version of the
spready demo. The worksheet grid, however, is created at run-time. Therefore,
it is not necessary to install the laz_fpspreadsheet package to run this
sample project.
If compiled with Lazarus version you have to accept missing properties in the
lfm file related to SynEdit.

View File

@ -299,33 +299,33 @@ constructor TSynWikiTableSyn.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FCommentAttri := TSynHighlighterAttributes.Create(@SYNS_AttrComment, SYNS_XML_AttrComment);
FCommentAttri := TSynHighlighterAttributes.Create(SYNS_AttrComment, SYNS_XML_AttrComment);
FCommentAttri.Style := [fsItalic];
FCommentAttri.Foreground := clTeal;
AddAttribute(FCommentAttri);
FNumberAttri := TSynHighlighterAttributes.Create(@SYNS_AttrNumber, SYNS_XML_AttrNumber);
FNumberAttri := TSynHighlighterAttributes.Create(SYNS_AttrNumber, SYNS_XML_AttrNumber);
FNumberAttri.Foreground := clBlue;
AddAttribute(fNumberAttri);
FSpaceAttri := TSynHighlighterAttributes.Create(@SYNS_AttrSpace, SYNS_XML_AttrSpace);
FSpaceAttri := TSynHighlighterAttributes.Create(SYNS_AttrSpace, SYNS_XML_AttrSpace);
AddAttribute(FSpaceAttri);
FSymbolAttri := TSynHighlighterAttributes.Create(@SYNS_AttrSymbol, SYNS_XML_AttrSymbol);
FSymbolAttri := TSynHighlighterAttributes.Create(SYNS_AttrSymbol, SYNS_XML_AttrSymbol);
FSymbolAttri.Style := [fsBold];
FSymbolAttri.Foreground := clPurple;
AddAttribute(fSymbolAttri);
FIdentifierAttri := TSynHighlighterAttributes.Create(@SYNS_AttrIdentifier, SYNS_XML_AttrIdentifier);
FIdentifierAttri := TSynHighlighterAttributes.Create(SYNS_AttrIdentifier, SYNS_XML_AttrIdentifier);
FIdentifierAttri.Foreground := clNavy;
FIdentifierAttri.Style := [fsBold];
AddAttribute(fIdentifierAttri);
FStringAttri := TSynHighlighterAttributes.Create(@SYNS_AttrString, SYNS_XML_AttrString);
FStringAttri := TSynHighlighterAttributes.Create(SYNS_AttrString, SYNS_XML_AttrString);
FStringAttri.Foreground := clOlive;
AddAttribute(FStringAttri);
(*
fKeyAttri := TSynHighlighterAttributes.Create(@SYNS_AttrKey, SYNS_XML_AttrKey);
fKeyAttri := TSynHighlighterAttributes.Create(SYNS_AttrKey, SYNS_XML_AttrKey);
fKeyAttri.Style := [fsBold];
AddAttribute(fKeyAttri);

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@ -39,6 +39,9 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</Item2>
<Item3 Name="Release">
@ -74,6 +77,9 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</Item3>
</BuildModes>
@ -144,6 +150,9 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="5">

View File

@ -1,5 +1,5 @@
object MainFrm: TMainFrm
Left = 512
Left = 506
Height = 639
Top = 144
Width = 884
@ -11,15 +11,15 @@ object MainFrm: TMainFrm
OnCreate = FormCreate
ShowHint = True
LCLVersion = '1.5'
object ToolBar1: TToolBar
object MainToolBar: TToolBar
Left = 0
Height = 28
Top = 0
Width = 884
ButtonHeight = 24
ButtonWidth = 24
Caption = 'ToolBar1'
EdgeBorders = []
Caption = 'MainToolBar'
EdgeBorders = [ebBottom]
Images = ImageList
TabOrder = 0
object ToolButton1: TToolButton
@ -51,238 +51,240 @@ object MainFrm: TMainFrm
Action = AcNew
end
end
object FormatToolBar: TToolBar
Left = 0
Height = 28
Top = 56
Width = 884
AutoSize = True
ButtonHeight = 24
ButtonWidth = 25
Caption = 'FormatToolBar'
Constraints.MinHeight = 28
EdgeBorders = []
Images = ImageList
TabOrder = 1
object TbLeftAlign: TToolButton
Left = 336
Top = 0
Action = AcLeftAlign
Wrap = True
end
object TbHorCenterAlign: TToolButton
Left = 361
Top = 0
Action = AcHorCenterAlign
end
object TbRightAlign: TToolButton
Left = 386
Top = 0
Action = AcRightAlign
end
object FontComboBox: TComboBox
Left = 56
Height = 23
Top = 0
Width = 127
ItemHeight = 15
OnSelect = FontComboBoxSelect
TabOrder = 0
end
object FontSizeComboBox: TComboBox
Left = 183
Height = 23
Top = 0
Width = 48
ItemHeight = 15
Items.Strings = (
'8'
'9'
'10'
'11'
'12'
'14'
'16'
'18'
'20'
'24'
)
OnSelect = FontSizeComboBoxSelect
TabOrder = 1
end
object TbFontBold: TToolButton
Left = 231
Top = 0
Action = AcFontBold
end
object TbFontItalic: TToolButton
Left = 256
Top = 0
Action = AcFontItalic
end
object TbFontUnderline: TToolButton
Left = 281
Top = 0
Action = AcFontUnderline
end
object TbFontStrikeout: TToolButton
Left = 306
Top = 0
Action = AcFontStrikeout
end
object ToolButton14: TToolButton
Left = 331
Height = 24
Top = 0
Width = 5
Caption = 'ToolButton14'
Style = tbsDivider
Wrap = True
end
object ToolButton15: TToolButton
Left = 411
Height = 24
Top = 0
Width = 5
Caption = 'ToolButton15'
Style = tbsDivider
Wrap = True
end
object TbVAlignTop: TToolButton
Left = 416
Top = 0
Action = AcVAlignTop
Wrap = True
end
object TbVAlignCenter: TToolButton
Left = 441
Top = 0
Action = AcVAlignCenter
end
object TbVAlignBottom: TToolButton
Left = 466
Top = 0
Action = AcVAlignBottom
end
object ToolButton19: TToolButton
Left = 491
Height = 24
Top = 0
Width = 5
Caption = 'ToolButton19'
Style = tbsDivider
Wrap = True
end
object TbBorders: TToolButton
Left = 496
Top = 0
Action = AcBorderNone
DropdownMenu = BordersPopupMenu
Style = tbsDropDown
Wrap = True
end
object CbBackgroundColor: TColorBox
Left = 558
Height = 26
Top = 0
Width = 149
NoneColorColor = clDefault
Style = [cbPrettyNames, cbCustomColors]
OnGetColors = CbBackgroundColorGetColors
ItemHeight = 20
OnSelect = CbBackgroundColorSelect
TabOrder = 2
end
object TbDefaultFont: TToolButton
Left = 31
Top = 0
Action = AcDefaultFont
end
object ToolButton26: TToolButton
Left = 26
Height = 24
Top = 0
Width = 5
Caption = 'ToolButton26'
Style = tbsDivider
Wrap = True
end
object TbCopyFormat: TToolButton
Left = 1
Top = 0
Action = AcCopyFormat
end
object TbMergeCells: TToolButton
Left = 533
Top = 0
Action = AcMergeCells
end
object TbAddColumn: TToolButton
Left = 707
Top = 0
Action = AcAddColumn
end
object TbDeleteColumn: TToolButton
Left = 732
Top = 0
Action = AcDeleteColumn
end
object TbAddRow: TToolButton
Left = 762
Top = 0
Action = AcAddRow
end
object TbDeleteRow: TToolButton
Left = 787
Top = 0
Action = AcDeleteRow
end
object ToolButton33: TToolButton
Left = 757
Height = 24
Top = 0
Width = 5
Caption = 'ToolButton33'
Style = tbsDivider
end
end
object PageControl: TPageControl
Left = 0
Height = 532
Top = 87
Height = 587
Top = 32
Width = 884
ActivePage = PgTable
Align = alClient
BorderSpacing.Top = 4
Images = ImageList
TabIndex = 0
TabOrder = 2
TabOrder = 1
OnChange = PageControlChange
object PgTable: TTabSheet
Caption = 'Table'
ClientHeight = 504
ClientHeight = 559
ClientWidth = 876
ImageIndex = 31
object TabControl: TTabControl
Left = 0
Height = 504
Top = 0
Height = 531
Top = 28
Width = 876
OnChange = TabControlChange
TabPosition = tpBottom
Align = alClient
TabOrder = 0
end
object FormatToolBar: TToolBar
Left = 0
Height = 28
Top = 0
Width = 876
AutoSize = True
ButtonHeight = 26
ButtonWidth = 25
Caption = 'FormatToolBar'
Constraints.MinHeight = 28
EdgeBorders = []
Images = ImageList
TabOrder = 1
Transparent = True
object TbLeftAlign: TToolButton
Left = 336
Top = 0
Action = AcLeftAlign
Wrap = True
end
object TbHorCenterAlign: TToolButton
Left = 361
Top = 0
Action = AcHorCenterAlign
end
object TbRightAlign: TToolButton
Left = 386
Top = 0
Action = AcRightAlign
end
object FontComboBox: TComboBox
Left = 56
Height = 23
Top = 0
Width = 127
ItemHeight = 15
OnSelect = FontComboBoxSelect
TabOrder = 0
end
object FontSizeComboBox: TComboBox
Left = 183
Height = 23
Top = 0
Width = 48
ItemHeight = 15
Items.Strings = (
'8'
'9'
'10'
'11'
'12'
'14'
'16'
'18'
'20'
'24'
)
OnSelect = FontSizeComboBoxSelect
TabOrder = 1
end
object TbFontBold: TToolButton
Left = 231
Top = 0
Action = AcFontBold
end
object TbFontItalic: TToolButton
Left = 256
Top = 0
Action = AcFontItalic
end
object TbFontUnderline: TToolButton
Left = 281
Top = 0
Action = AcFontUnderline
end
object TbFontStrikeout: TToolButton
Left = 306
Top = 0
Action = AcFontStrikeout
end
object ToolButton14: TToolButton
Left = 331
Height = 26
Top = 0
Width = 5
Caption = 'ToolButton14'
Style = tbsDivider
Wrap = True
end
object ToolButton15: TToolButton
Left = 411
Height = 26
Top = 0
Width = 5
Caption = 'ToolButton15'
Style = tbsDivider
Wrap = True
end
object TbVAlignTop: TToolButton
Left = 416
Top = 0
Action = AcVAlignTop
Wrap = True
end
object TbVAlignCenter: TToolButton
Left = 441
Top = 0
Action = AcVAlignCenter
end
object TbVAlignBottom: TToolButton
Left = 466
Top = 0
Action = AcVAlignBottom
end
object ToolButton19: TToolButton
Left = 491
Height = 26
Top = 0
Width = 5
Caption = 'ToolButton19'
Style = tbsDivider
Wrap = True
end
object TbBorders: TToolButton
Left = 496
Top = 0
Action = AcBorderNone
DropdownMenu = BordersPopupMenu
Style = tbsDropDown
Wrap = True
end
object CbBackgroundColor: TColorBox
Left = 558
Height = 26
Top = 0
Width = 149
NoneColorColor = clDefault
Style = [cbPrettyNames, cbCustomColors]
OnGetColors = CbBackgroundColorGetColors
ItemHeight = 20
OnSelect = CbBackgroundColorSelect
TabOrder = 2
end
object TbDefaultFont: TToolButton
Left = 31
Top = 0
Action = AcDefaultFont
end
object ToolButton26: TToolButton
Left = 26
Height = 26
Top = 0
Width = 5
Caption = 'ToolButton26'
Style = tbsDivider
Wrap = True
end
object TbCopyFormat: TToolButton
Left = 1
Top = 0
Action = AcCopyFormat
end
object TbMergeCells: TToolButton
Left = 533
Top = 0
Action = AcMergeCells
end
object TbAddColumn: TToolButton
Left = 707
Top = 0
Action = AcAddColumn
end
object TbDeleteColumn: TToolButton
Left = 732
Top = 0
Action = AcDeleteColumn
end
object TbAddRow: TToolButton
Left = 762
Top = 0
Action = AcAddRow
end
object TbDeleteRow: TToolButton
Left = 787
Top = 0
Action = AcDeleteRow
end
object ToolButton33: TToolButton
Left = 757
Height = 26
Top = 0
Width = 5
Caption = 'ToolButton33'
Style = tbsDivider
end
end
end
object PgCode: TTabSheet
Caption = 'Code'
ClientHeight = 504
ClientWidth = 876
ClientHeight = 559
ClientWidth = 882
ImageIndex = 3
inline SynEdit: TSynEdit
Left = 0
Height = 504
Top = 0
Width = 876
Height = 531
Top = 28
Width = 882
Align = alClient
Font.Height = -13
Font.Name = 'Courier New'
@ -291,7 +293,7 @@ object MainFrm: TMainFrm
ParentColor = False
ParentFont = False
TabOrder = 0
Gutter.Width = 57
Gutter.Width = 0
Gutter.MouseActions = <>
RightGutter.Width = 0
RightGutter.MouseActions = <>
@ -749,72 +751,31 @@ object MainFrm: TMainFrm
LineHighlightColor.Foreground = clNone
LineHighlightColor.FrameEdges = sfeAround
inline SynLeftGutterPartList1: TSynGutterPartList
object SynGutterMarks1: TSynGutterMarks
Width = 24
MouseActions = <>
end
object SynGutterLineNumber1: TSynGutterLineNumber
Width = 17
MouseActions = <>
MarkupInfo.Background = clBtnFace
MarkupInfo.Foreground = clNone
MarkupInfo.FrameEdges = sfeAround
DigitCount = 2
ShowOnlyLineNumbersMultiplesOf = 1
ZeroStart = False
LeadingZeros = False
end
object SynGutterChanges1: TSynGutterChanges
Width = 4
MouseActions = <>
ModifiedColor = 59900
SavedColor = clGreen
end
object SynGutterSeparator1: TSynGutterSeparator
Width = 2
MouseActions = <>
MarkupInfo.Background = clWhite
MarkupInfo.Foreground = clGray
MarkupInfo.FrameEdges = sfeAround
end
object SynGutterCodeFolding1: TSynGutterCodeFolding
MouseActions = <>
MarkupInfo.Background = clNone
MarkupInfo.Foreground = clGray
MarkupInfo.FrameEdges = sfeAround
MouseActionsExpanded = <>
MouseActionsCollapsed = <>
end
end
end
object CodeToolBar: TToolBar
Left = 0
Height = 28
Top = 0
Width = 882
AutoSize = True
ButtonHeight = 26
ButtonWidth = 25
Caption = 'CodeToolBar'
EdgeBorders = [ebBottom]
Images = ImageList
List = True
ShowCaptions = True
TabOrder = 1
Transparent = True
object ToolButton4: TToolButton
Left = 1
Top = 0
Action = AcCopyToClipboard
end
end
end
end
object CodeToolBar: TToolBar
Left = 0
Height = 28
Top = 28
Width = 884
Caption = 'CodeToolBar'
EdgeBorders = []
Images = ImageList
List = True
ShowCaptions = True
TabOrder = 3
Visible = False
object ToolButton4: TToolButton
Left = 1
Top = 0
Action = AcCopyToClipboard
end
end
object ToolbarBevel: TBevel
Left = 0
Height = 3
Top = 84
Width = 884
Align = alTop
Shape = bsTopLine
end
object OpenDialog: TOpenDialog
DefaultExt = '.xls'
Filter = 'Excel spreadsheet (*.xls)|*.xls|Excel XML spreadsheet (*.xlsx)|*.xlsx|LibreOffice/OpenOffice spreadsheet (*.ods)|*.ods|Wikitable (pipes) (.wikitable_pipes)|.wikitable_pipes|All files (*.*)|*.*'
@ -3759,57 +3720,4 @@ object MainFrm: TMainFrm
}
end
end
object SynMultiSyn1: TSynMultiSyn
Enabled = False
Schemes = <
item
Highlighter = SynHTMLSyn1
MarkerAttri.FrameEdges = sfeAround
end
item
Highlighter = SynCssSyn1
MarkerAttri.FrameEdges = sfeAround
end>
DefaultHighlighter = SynCssSyn1
left = 532
top = 126
end
object SynHTMLSyn1: TSynHTMLSyn
DefaultFilter = 'HTML Document (*.htm,*.html)|*.htm;*.html'
Enabled = False
AndAttri.FrameEdges = sfeAround
ASPAttri.FrameEdges = sfeAround
CDATAAttri.FrameEdges = sfeAround
DOCTYPEAttri.FrameEdges = sfeAround
CommentAttri.Foreground = clTeal
CommentAttri.FrameEdges = sfeAround
CommentAttri.Style = [fsItalic]
IdentifierAttri.FrameEdges = sfeAround
KeyAttri.FrameEdges = sfeAround
SpaceAttri.FrameEdges = sfeAround
SymbolAttri.FrameEdges = sfeAround
TextAttri.Foreground = clBlue
TextAttri.FrameEdges = sfeAround
UndefKeyAttri.FrameEdges = sfeAround
ValueAttri.FrameEdges = sfeAround
left = 531
top = 189
end
object SynCssSyn1: TSynCssSyn
DefaultFilter = 'Cascading Stylesheets (*.css)|*.css'
Enabled = False
CommentAttri.FrameEdges = sfeAround
IdentifierAttri.Foreground = clOlive
IdentifierAttri.FrameEdges = sfeAround
IdentifierAttri.Style = [fsBold]
KeyAttri.FrameEdges = sfeAround
NumberAttri.Foreground = clFuchsia
NumberAttri.FrameEdges = sfeAround
SpaceAttri.FrameEdges = sfeAround
StringAttri.Foreground = clBlue
StringAttri.FrameEdges = sfeAround
SymbolAttri.FrameEdges = sfeAround
left = 529
top = 243
end
end

View File

@ -6,10 +6,11 @@ interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Menus, ExtCtrls, ComCtrls, ActnList, Grids, ColorBox,
SynEdit, SynEditHighlighter,
SynHighlighterHTML, SynHighlighterMulti, SynHighlighterCss,
fpspreadsheetgrid, fpspreadsheet, {%H-}fpsallformats;
StdCtrls, Menus, ExtCtrls, ComCtrls, ActnList, Grids, ColorBox, SynEdit,
SynEditHighlighter, SynHighlighterHTML, SynHighlighterMulti,
SynHighlighterCss, SynGutterBase, SynGutterMarks, SynGutterLineNumber,
SynGutterChanges, SynGutter, SynGutterCodeFolding, fpspreadsheetgrid,
fpspreadsheet, fpsallformats;
type
@ -60,6 +61,8 @@ type
AcVAlignCenter: TAction;
AcVAlignBottom: TAction;
ActionList: TActionList;
MainToolBar: TToolBar;
MenuItem17: TMenuItem;
MnuBorderBottom: TMenuItem;
MnuBorderBottomDbl: TMenuItem;
MnuBorderBottomThick: TMenuItem;
@ -83,7 +86,6 @@ type
MnuNew: TMenuItem;
MnuNoBorders: TMenuItem;
MnuTableSeparator1: TMenuItem;
ToolbarBevel: TBevel;
CbBackgroundColor: TColorBox;
FontComboBox: TComboBox;
FontDialog: TFontDialog;
@ -124,10 +126,7 @@ type
BordersPopupMenu: TPopupMenu;
PageControl: TPageControl;
SaveDialog: TSaveDialog;
SynCssSyn1: TSynCssSyn;
SynEdit: TSynEdit;
SynHTMLSyn1: TSynHTMLSyn;
SynMultiSyn1: TSynMultiSyn;
TabControl: TTabControl;
PgTable: TTabSheet;
PgCode: TTabSheet;
@ -151,6 +150,17 @@ type
TbFontBold: TToolButton;
TbFontItalic: TToolButton;
TbFontUnderline: TToolButton;
ToolButton1: TToolButton;
ToolButton14: TToolButton;
ToolButton15: TToolButton;
ToolButton19: TToolButton;
ToolButton2: TToolButton;
ToolButton22: TToolButton;
ToolButton26: TToolButton;
ToolButton3: TToolButton;
ToolButton33: TToolButton;
ToolButton4: TToolButton;
ToolButton5: TToolButton;
procedure AcAddColumnExecute(Sender: TObject);
procedure AcAddRowExecute(Sender: TObject);
procedure AcBorderExecute(Sender: TObject);
@ -205,7 +215,7 @@ var
implementation
uses
TypInfo, LCLIntf, LCLType, clipbrd, fpcanvas,
TypInfo, LCLIntf, LCLType, LCLVersion, clipbrd, fpcanvas,
SynHighlighterWikiTable,
fpsutils;
@ -624,7 +634,9 @@ begin
FontSizeCombobox.DropDownCount := DROPDOWN_COUNT;
CbBackgroundColor.DropDownCount := DROPDOWN_COUNT;
// CbBackgroundColor.ItemHeight := FontCombobox.ItemHeight;
{$IF LCL_FullVersion >= 1020000}
CbBackgroundColor.ColorRectWidth := CbBackgroundColor.ItemHeight - 6; // to get a square box...
{$ENDIF}
// Initialize a new empty workbook
AcNewExecute(nil);
@ -638,11 +650,6 @@ procedure TMainFrm.PageControlChange(Sender: TObject);
var
stream: TMemoryStream;
begin
// Switch toolbars according to the selection of the pagecontrol
CodeToolbar.Visible := PageControl.ActivePage = PgCode;
FormatToolbar.Visible := PageControl.ActivePage = PgTable;
ToolbarBevel.Top := Height;
if (WorksheetGrid = nil) or (WorksheetGrid.Workbook = nil) then
exit;
@ -678,7 +685,7 @@ begin
end;
// Update user interface
Caption := Format('spready - %s (%s)', [
Caption := Format('wikitable maker - %s (%s)', [
AFilename,
GetFileFormatName(WorksheetGrid.Workbook.FileFormat)
]);
@ -821,5 +828,8 @@ end;
initialization
{$I wtmain.lrs}
// RegisterPropertyToSkip(TColorbox, 'ColorRectWidth', 'Not available in Laz 1.0', '');
// RegisterPropertyToSkip(TSynEdit, 'MouseTextActions', 'Not available in Laz 1.0', '');
end.

View File

@ -18,7 +18,7 @@ implementation
uses
Math, lazutf8, StrUtils, DateUtils,
xlsconst, fpsPatches, fpsUtils, fpsexprparser;
xlsconst, {%H-}fpsPatches, fpsUtils, fpsexprparser;
{------------------------------------------------------------------------------}

View File

@ -43,7 +43,6 @@ type
FPointsNumber: Integer;
FXSelectionDirection: TsSelectionDirection;
FYSelectionDirection: TsSelectionDirection;
// FWorksheetGrid: TsWorksheetGrid;
FXFirstCellCol: Cardinal;
FXFirstCellRow: Cardinal;
FYFirstCellCol: Cardinal;
@ -60,6 +59,7 @@ type
FCurItem: TChartDataItem;
function GetCount: Integer; override;
function GetItem(AIndex: Integer): PChartDataItem; override;
procedure SetYCount(AValue: Cardinal); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@ -67,7 +67,6 @@ type
public
procedure LoadFromWorksheetGrid(const AValue: TsWorksheetGrid);
published
// property WorksheetGrid: TsWorksheetGrid read FWorksheetGrid write SetWorksheetGrid;
property PointsNumber: Integer read FPointsNumber write SetPointsNumber default 0;
property XFirstCellCol: Cardinal read FXFirstCellCol write SetXFirstCellCol default 0;
property XFirstCellRow: Cardinal read FXFirstCellRow write SetXFirstCellRow default 0;
@ -293,6 +292,11 @@ begin
FPointsNumber := lXCount;
end;
procedure TsWorksheetChartSource.SetYCount(AValue: Cardinal);
begin
FYCount := AValue;
end;
{------------------------------------------------------------------------------}
{ TsWorkbookChartSource }
@ -662,7 +666,7 @@ end;
{@@ ----------------------------------------------------------------------------
Inherited ChartSource method telling the series how many y values are used.
Currently we support only single valued data (YCount = 1).
Currently we support only single valued data (YCount = 1, by default).
-------------------------------------------------------------------------------}
procedure TsWorkbookChartSource.SetYCount(AValue: Cardinal);
begin

View File

@ -2383,8 +2383,13 @@ begin
inherited Create(AOwner);
DisplayOptions := DisplayOptions - [doKeyColFixed];
FixedCols := 0;
TitleCaptions.Add('Properties');
TitleCaptions.Add('Values');
with (TitleCaptions as TStringList) do begin
OnChange := nil; // This fixes an issue with Laz 1.0
Clear;
Add('Properties');
Add('Values');
OnChange := @TitlesChanged;
end;
end;
{@@ ----------------------------------------------------------------------------
@ -2772,9 +2777,13 @@ begin
end;
initialization
{$I fpspreadsheetctrls.lrs}
CellClipboard := TsCellList.Create;
{$I fpspreadsheetctrls.lrs}
RegisterPropertyToSkip(TsSpreadsheetInspector, 'RowHeights', 'For compatibility with older Laz versions.', '');
RegisterPropertyToSkip(TsSpreadsheetInspector, 'ColWidths', 'For compatibility with older Laz versions.', '');
finalization
CellClipboard.Free;

View File

@ -17,8 +17,10 @@
</SyntaxOptions>
</Parsing>
<Other>
<CompilerMessages>
<IgnoredMessages idx4055="True"/>
</CompilerMessages>
<CustomOptions Value="$(IDEBuildOptions)"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Description Value="laz_fpspreadsheet is a non-visual component that allows you to use the fpspreadsheet package to read/write spreadsheet files in .xls (BIFF/Excel), .ods OpenDocument (LibreOffice/OpenOffice) and .xlsx Open XML (Excel) formats.

View File

@ -902,7 +902,7 @@ begin
ExcludeAttr:=0;
end;
//Hint non portable conversion, it should work, but not tested.
LHandle:=PFileRecLocal(Rlst.FindHandle);
LHandle:={%H-}PFileRecLocal(PtrUInt(Rlst.FindHandle));
FindL:=TVirtualLayer_FolderList(LHandle^.FL);
if Assigned(FindL) Then begin
if FindL.Count>0 Then begin
@ -925,7 +925,7 @@ var
LHandle: PFileRecLocal;
begin
//Hint: non portable conversion. Not tested but it should work.
LHandle:=PFileRecLocal(Rlst.FindHandle);
LHandle:={%H-}PFileRecLocal(PtrUInt(Rlst.FindHandle));
FindL:=TVirtualLayer_FolderList(LHandle^.FL);
if Assigned(FindL) Then FindL.Free;
FreeMem(LHandle);

View File

@ -380,7 +380,7 @@ procedure TsWikiTableWriter.WriteToStrings_WikiMedia(AStrings: TStrings);
clr := ACell^.BorderStyles[ABorder].Color;
Result := Format('border-%s:%s', [BORDERNAMES[ABorder], LINESTYLES[ls]]);
if clr <> scBlack then
Result := Result + ' ' + FWorkbook.GetPaletteColorAsHTMLStr(clr);
Result := Result + ' ' + FWorkbook.GetPaletteColorAsHTMLStr(clr) + '; ';
end;
const

View File

@ -407,7 +407,7 @@ implementation
uses
AVL_Tree, Math, Variants,
fpspatches, xlsConst, fpsNumFormatParser, fpsrpn, fpsExprParser;
{%H-}fpspatches, xlsConst, fpsNumFormatParser, fpsrpn, fpsExprParser;
const
{ Helper table for rpn formulas:

View File

@ -176,7 +176,7 @@ implementation
uses
variants, fileutil, strutils, math, lazutf8,
fpsPatches, fpsStrings, fpsStreams, fpsNumFormatParser;
{%H-}fpsPatches, fpsStrings, fpsStreams, fpsNumFormatParser;
const
{ OOXML general XML constants }