fpspreadsheet: Split package laz_fpspreadsheet_visual into a runtime and designtime package.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6461 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-06-04 21:01:35 +00:00
parent a2efe76773
commit 06c3a04c78
17 changed files with 189 additions and 68 deletions

View File

@ -26,4 +26,3 @@ tsworkbookchartsource_200.png
tsworksheetchartsource.png
tsworksheetchartsource_150.png
tsworksheetchartsource_200.png
cur_dragcopy.cur

View File

@ -1,2 +0,0 @@
lazres ../../source/visual/fpspreadsheetctrls.lrs @list_visual.txt
lazres ../../source/export/fpsexportimg.lrs @list_export.txt

View File

@ -0,0 +1,3 @@
lazres ../../resource/fpsvisualreg.res @list_visual.txt
lazres ../../resource/fpsvisual.lrs cur_dragcopy.cur
lazres ../../resource/fpsvisualexportreg.res @list_export.txt

View File

@ -3,12 +3,12 @@
<Package Version="4">
<PathDelim Value="\"/>
<Name Value="laz_fpspreadsheet_visual"/>
<Type Value="RunAndDesignTime"/>
<Author Value="Felipe Monteiro de Carvalho and others"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="source"/>
<OtherUnitFiles Value="source\visual"/>
<UnitOutputDirectory Value="source\visual\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
@ -23,28 +23,24 @@ It provides graphical components like a grid and chart."/>
<Version Major="1" Minor="9"/>
<Files Count="5">
<Item1>
<Filename Value="source\visual\fpsactions.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="fpsActions"/>
<Filename Value="source\visual\fpspreadsheetchart.pas"/>
<UnitName Value="fpspreadsheetchart"/>
</Item1>
<Item2>
<Filename Value="source\visual\fpspreadsheetchart.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="fpspreadsheetchart"/>
<Filename Value="source\visual\fpspreadsheetctrls.pas"/>
<UnitName Value="fpspreadsheetctrls"/>
</Item2>
<Item3>
<Filename Value="source\visual\fpspreadsheetctrls.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="fpspreadsheetctrls"/>
<Filename Value="source\visual\fpspreadsheetgrid.pas"/>
<UnitName Value="fpspreadsheetgrid"/>
</Item3>
<Item4>
<Filename Value="source\visual\fpspreadsheetgrid.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="fpspreadsheetgrid"/>
</Item4>
<Item5>
<Filename Value="source\visual\fpsvisualutils.pas"/>
<UnitName Value="fpsvisualutils"/>
</Item4>
<Item5>
<Filename Value="source\visual\fpsactions.pas"/>
<UnitName Value="fpsActions"/>
</Item5>
</Files>
<RequiredPkgs Count="4">

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="4">
<PathDelim Value="\"/>
<Name Value="laz_fpspreadsheet_visual_dsgn"/>
<Type Value="RunAndDesignTime"/>
<Author Value="W. Pamler"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="source"/>
<OtherUnitFiles Value="source\design"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
</CompilerOptions>
<Description Value="laz_fpspreadsheet_visual_dsgn is the design-tim package for the visual fpspreadsheet components."/>
<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="9"/>
<Files Count="1">
<Item1>
<Filename Value="source\design\fpsvisualreg.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="fpsvisualreg"/>
</Item1>
</Files>
<RequiredPkgs Count="3">
<Item1>
<PackageName Value="laz_fpspreadsheet_visual"/>
</Item1>
<Item2>
<PackageName Value="laz_fpspreadsheet"/>
</Item2>
<Item3>
<PackageName Value="FCL"/>
</Item3>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
</Package>
</CONFIG>

View File

@ -9,7 +9,7 @@
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="source\export"/>
<OtherUnitFiles Value="source\export;source\design"/>
<UnitOutputDirectory Value="source\export\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
@ -32,7 +32,7 @@ It provides a graphical export component on the Data Export tab."/>
<UnitName Value="fpsexport"/>
</Item1>
<Item2>
<Filename Value="source\export\fpsexportreg.pas"/>
<Filename Value="source\design\fpsexportreg.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="fpsexportreg"/>
</Item2>

View File

@ -0,0 +1,15 @@
LazarusResources.Add('cur_dragcopy','CUR',[
#0#0#2#0#1#0' '#0#0#0#0#0#0'0'#1#0#0#22#0#0#0'('#0#0#0' '#0#0#0'@'#0#0#0#1#0
+#1#0#0#0#0#0#0#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#21'T'#0#0#8#2
+#0#0#16#0#0#0#8#2#0#0#16#128#0#0#8#194#0#0#21#148#0#0#9#170#0#0#3#0#0#0'C'#0
+#0#0'f'#0#0#0'~'#0#0#0'~'#0#0#0#127#192'p'#0#127#128'P'#0#127#0'P'#0'~'#0'P'
+#0'|'#7#223#0'x'#4#1#0'p'#7#223#0'`'#0'P'#0'@'#0'P'#0#0#0'P'#0#0#0'p'#0#255
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+#255#255#255#255#255#255#255#255#234#170#255#255#224#1#255#255#231#252#255
+#255#231#253#255#255#231'|'#255#255#230#29#255#255#230#28#255#255#224'!'#255
+#255'd'#0#255#255'8'#127#255#255#24#127#255#255#0#255#255#255#0#255#255#255#0
+#15#255#255#0#31#143#255#0'?'#143#255#0#127#143#255#0#255#143#255#1#248#0#255
+#3#248#0#255#7#248#0#255#15#255#143#255#31#255#143#255'?'#255#143#255#127#255
+#143#255
]);

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,34 @@
{
Registration for fpsexport into the Lazarus component palette
This requires package lazdbexport for property editors etc
}
unit fpsexportreg;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LazarusPackageIntf, lresources;
procedure Register;
implementation
uses
fpsexport;
{@@ ----------------------------------------------------------------------------
Registers the export component in the Lazarus component palette,
page "Data Export".
-------------------------------------------------------------------------------}
procedure Register;
begin
RegisterComponents('Data Export', [TFPSExport]);
end;
initialization
{$I fpsexportimg.lrs}
end.

View File

@ -0,0 +1,65 @@
unit fpsvisualreg;
{$mode objfpc}{$H+}
{$R ../../resource\fpsvisualreg.res}
interface
uses
Classes, SysUtils, fpsallformats;
procedure Register;
implementation
uses
LResources, ActnList,
fpspreadsheetctrls, fpspreadsheetgrid, fpspreadsheetchart, fpsactions;
{@@ ----------------------------------------------------------------------------
Registers the visual spreadsheet components in the Lazarus component palette,
page "FPSpreadsheet".
-------------------------------------------------------------------------------}
procedure Register;
begin
RegisterComponents('FPSpreadsheet', [
TsWorkbookSource,
TsWorkbookTabControl,
TsWorksheetGrid,
TsCellEdit, TsCellIndicator, TsCellCombobox,
TsSpreadsheetInspector
]);
RegisterComponents('Chart', [
TsWorksheetChartSource,
TsWorkbookChartSource
]);
RegisterActions('FPSpreadsheet', [
// Worksheet-releated actions
TsWorksheetAddAction, TsWorksheetDeleteAction, TsWorksheetRenameAction,
TsWorksheetZoomAction,
// Cell or cell range formatting actions
TsCopyAction,
TsFontStyleAction, TsFontDialogAction, TsBackgroundColorDialogAction,
TsHorAlignmentAction, TsVertAlignmentAction,
TsTextRotationAction, TsWordWrapAction,
TsNumberFormatAction, TsDecimalsAction,
TsCellProtectionAction,
TsCellBorderAction, TsNoCellBordersAction,
TsCellCommentAction, TsCellHyperlinkAction,
TsMergeAction
], nil);
end;
initialization
RegisterPropertyToSkip(TsSpreadsheetInspector, 'RowHeights',
'For compatibility with older Laz versions.', '');
RegisterPropertyToSkip(TsSpreadsheetInspector, 'ColWidths',
'For compatibility with older Laz versions.', '');
end.

View File

@ -47,5 +47,3 @@
{.$DEFINE NO_RAWBYTESTRING}

View File

@ -552,8 +552,6 @@ type
property Dialog: TColorDialog read GetDialog;
end;
procedure Register;
implementation
@ -561,26 +559,7 @@ uses
StdCtrls, ExtCtrls, Buttons, Forms,
fpsUtils, fpsNumFormat, fpsVisualUtils, fpSpreadsheetGrid;
procedure Register;
begin
RegisterActions('FPSpreadsheet', [
// Worksheet-releated actions
TsWorksheetAddAction, TsWorksheetDeleteAction, TsWorksheetRenameAction,
TsWorksheetZoomAction,
// Cell or cell range formatting actions
TsCopyAction,
TsFontStyleAction, TsFontDialogAction, TsBackgroundColorDialogAction,
TsHorAlignmentAction, TsVertAlignmentAction,
TsTextRotationAction, TsWordWrapAction,
TsNumberFormatAction, TsDecimalsAction,
TsCellProtectionAction,
TsCellBorderAction, TsNoCellBordersAction,
TsCellCommentAction, TsCellHyperlinkAction,
TsMergeAction
], nil);
end;
{ TsSpreadsheetAction }
{ Copies the format item for which the action is responsible to the

View File

@ -121,7 +121,7 @@ type
end;
procedure Register;
//procedure Register;
implementation
@ -129,12 +129,12 @@ implementation
uses
Math;
{
procedure Register;
begin
RegisterComponents('Chart', [TsWorksheetChartSource, TsWorkbookChartSource]);
end;
}
{ TsWorksheetChartSource }

View File

@ -581,8 +581,6 @@ type
function SpreadsheetFormatInClipboard: Boolean;
procedure Register;
implementation
@ -602,18 +600,6 @@ var
cfOpenDocumentFormat: Integer = 0;
cfStarObjectDescriptor: Integer = 0; }
{@@ ----------------------------------------------------------------------------
Registers the spreadsheet components in the Lazarus component palette,
page "FPSpreadsheet".
-------------------------------------------------------------------------------}
procedure Register;
begin
RegisterComponents('FPSpreadsheet', [
TsWorkbookSource, TsWorkbookTabControl,
TsCellEdit, TsCellIndicator, TsCellCombobox,
TsSpreadsheetInspector
]);
end;
{@@ ----------------------------------------------------------------------------
Returns TRUE if the clipboard contains a format good for pasting into a
@ -3937,6 +3923,7 @@ begin
end;
initialization
(*
{$I fpspreadsheetctrls.lrs}
RegisterPropertyToSkip(TsSpreadsheetInspector, 'RowHeights',
@ -3944,7 +3931,7 @@ initialization
RegisterPropertyToSkip(TsSpreadsheetInspector, 'ColWidths',
'For compatibility with older Laz versions.', '');
*)
{ Clipboard formats }
cfBiff8Format := RegisterclipboardFormat('Biff8');
cfBiff5Format := RegisterClipboardFormat('Biff5');

View File

@ -13,7 +13,7 @@
unit fpspreadsheetgrid;
{$mode objfpc}{$H+}
{$I ..\fps.inc}
{$I fps.inc}
{.$DEFINE GRID_DEBUG}
@ -827,7 +827,7 @@ var
{@@ Cursor for copy operation during drag and drop }
crDragCopy: Integer;
procedure Register;
//procedure Register;
implementation
@ -6984,7 +6984,7 @@ begin
end;
end;
(*
{@@ ----------------------------------------------------------------------------
Registers the worksheet grid in the Lazarus component palette,
page "FPSpreadsheet".
@ -6992,16 +6992,18 @@ end;
procedure Register;
begin
RegisterComponents('FPSpreadsheet', [TsWorksheetGrid]);
end;
end; *)
initialization
{$I ../../resource/fpsvisual.lrs}
fpsutils.ScreenPixelsPerInch := Screen.PixelsPerInch;
FillPatternStyle := fsNoFill;
(*
RegisterPropertyToSkip(TsCustomWorksheetGrid, 'ColWidths', 'taken from worksheet', '');
RegisterPropertyToSkip(TsCustomWorksheetGrid, 'RowHeights', 'taken from worksheet', '');
*)
crDragCopy := 1; //201705;
Screen.Cursors[crDragCopy] := LoadCursorFromLazarusResource('cur_dragcopy');