You've already forked lazarus-ccr
RxFPC:fix export to spreadsheet
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4185 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -55,12 +55,14 @@
|
||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||
</Item5>
|
||||
</RequiredPackages>
|
||||
<Units Count="106">
|
||||
<Units Count="114">
|
||||
<Unit0>
|
||||
<Filename Value="RxDBGridDemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<CursorPos X="9" Y="16"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<CursorPos X="47" Y="18"/>
|
||||
<UsageCount Value="100"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
@ -69,7 +71,6 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGridMainUnit"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<CursorPos X="37" Y="11"/>
|
||||
<UsageCount Value="100"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -95,7 +96,7 @@
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="3475"/>
|
||||
<CursorPos Y="3495"/>
|
||||
<UsageCount Value="17"/>
|
||||
@ -103,7 +104,6 @@
|
||||
<Item0 Y="2573" ID="2"/>
|
||||
<Item1 Y="3776" ID="1"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../../../lcl/lresources.pp"/>
|
||||
@ -430,23 +430,21 @@
|
||||
<Unit58>
|
||||
<Filename Value="../../../../lcl/dbgrids.pas"/>
|
||||
<UnitName Value="DBGrids"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="213"/>
|
||||
<CursorPos X="3" Y="216"/>
|
||||
<UsageCount Value="19"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit58>
|
||||
<Unit59>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="10079"/>
|
||||
<CursorPos X="25" Y="10111"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="23" Y="7562" ID="3"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit59>
|
||||
<Unit60>
|
||||
<Filename Value="../../../../../../install/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||
@ -563,11 +561,10 @@
|
||||
<Unit78>
|
||||
<Filename Value="../../../../lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2211"/>
|
||||
<CursorPos X="15" Y="2233"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit78>
|
||||
<Unit79>
|
||||
<Filename Value="../../../../lcl/stdctrls.pp"/>
|
||||
@ -665,9 +662,11 @@
|
||||
</Unit94>
|
||||
<Unit95>
|
||||
<Filename Value="../../rx.inc"/>
|
||||
<TopLine Value="42"/>
|
||||
<CursorPos Y="63"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="31"/>
|
||||
<CursorPos X="3" Y="62"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit95>
|
||||
<Unit96>
|
||||
<Filename Value="../../../../../../install/source/fpcsrc/rtl/objpas/classes/classes.inc"/>
|
||||
@ -714,9 +713,12 @@
|
||||
<Unit103>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
||||
<TopLine Value="185"/>
|
||||
<CursorPos X="12" Y="203"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="172"/>
|
||||
<CursorPos Y="187"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit103>
|
||||
<Unit104>
|
||||
<Filename Value="../../../fpspreadsheet/fpsexprparser.pas"/>
|
||||
@ -732,127 +734,175 @@
|
||||
<CursorPos X="15" Y="491"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit105>
|
||||
<Unit106>
|
||||
<Filename Value="/home/alexs/install/src/fixes_2_6/rtl/objpas/sysutils/sysinth.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="121"/>
|
||||
<CursorPos X="58" Y="137"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit106>
|
||||
<Unit107>
|
||||
<Filename Value="../../../fpspreadsheet/fpolestorage.pas"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<TopLine Value="25"/>
|
||||
<CursorPos X="6" Y="48"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit107>
|
||||
<Unit108>
|
||||
<Filename Value="../../../fpspreadsheet/fpsutils.pas"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit108>
|
||||
<Unit109>
|
||||
<Filename Value="../../../fpspreadsheet/fpstypes.pas"/>
|
||||
<UnitName Value="fpsTypes"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="16" Y="28"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit109>
|
||||
<Unit110>
|
||||
<Filename Value="/home/alexs/install/src/fixes_2_6/packages/fcl-image/src/fpimage.pp"/>
|
||||
<UnitName Value="FPimage"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="7"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit110>
|
||||
<Unit111>
|
||||
<Filename Value="../../../fpspreadsheet/fpsallformats.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit111>
|
||||
<Unit112>
|
||||
<Filename Value="../../../fpspreadsheet/fpscsv.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit112>
|
||||
<Unit113>
|
||||
<Filename Value="../../../fpspreadsheet/fpsheaderfooterparser.pas"/>
|
||||
<UnitName Value="fpsHeaderFooterParser"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit113>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="539" Column="30" TopLine="520"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="414" Column="14" TopLine="406"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="11456" Column="18" TopLine="11424"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="11484" Column="38" TopLine="11452"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="437" Column="5" TopLine="406"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="594" Column="17" TopLine="574"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="11456" Column="18" TopLine="11424"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="129" Column="47" TopLine="104"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="10954" Column="3" TopLine="10952"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="130" Column="45" TopLine="105"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="11414" Column="3" TopLine="11411"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="177" Column="43" TopLine="152"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="529" Column="15" TopLine="510"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="178" Column="43" TopLine="153"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="539" Column="30" TopLine="498"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="268" Column="45" TopLine="243"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="11456" Column="18" TopLine="11424"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="269" Column="45" TopLine="244"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="11484" Column="38" TopLine="11461"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="308" Column="41" TopLine="282"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="588" Column="26" TopLine="568"/>
|
||||
<Filename Value="../../../fpspreadsheet/fpolestorage.pas"/>
|
||||
<Caret Line="48" Column="6" TopLine="25"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="808" Column="33" TopLine="777"/>
|
||||
<Filename Value="../../../fpspreadsheet/fpsutils.pas"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="657" Column="26" TopLine="624"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="311" Column="43" TopLine="283"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="808" Column="33" TopLine="777"/>
|
||||
<Filename Value="../../rx.inc"/>
|
||||
<Caret Line="60" Column="35" TopLine="29"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="7569" Column="3" TopLine="7565"/>
|
||||
<Filename Value="../../../fpspreadsheet/fpsheaderfooterparser.pas"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="258" Column="14" TopLine="242"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="34" Column="8" TopLine="38"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="427" Column="29" TopLine="395"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="138" TopLine="108"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="440" Column="40" TopLine="408"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="127" Column="18" TopLine="97"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="446" Column="54" TopLine="414"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="132" Column="45" TopLine="107"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="465" Column="37" TopLine="433"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="117" Column="42" TopLine="109"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="5197" Column="46" TopLine="5165"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="132" Column="45" TopLine="109"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="5207" Column="60" TopLine="5175"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="134" Column="45" TopLine="109"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="5267" Column="29" TopLine="5235"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="182" Column="43" TopLine="158"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3475" Column="5" TopLine="3475"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="183" Column="43" TopLine="158"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="4114" Column="3" TopLine="4109"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="185" Column="43" TopLine="160"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="7570" Column="16" TopLine="7538"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="278" Column="71" TopLine="252"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="8218" Column="17" TopLine="8186"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="281" Column="45" TopLine="255"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="10" Column="3"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="337" Column="10" TopLine="307"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="11" Column="10"/>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="131" Column="32" TopLine="117"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
|
@ -8,12 +8,14 @@ uses
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms,
|
||||
sysutils,
|
||||
RxDBGridMainUnit;
|
||||
|
||||
{$R RxDBGridDemo.res}
|
||||
|
||||
begin
|
||||
LocalizeApp;
|
||||
DefaultFormatSettings.ThousandSeparator:=' ';
|
||||
//
|
||||
Application.Title:='RxDBGrid demo';
|
||||
Application.Initialize;
|
||||
|
@ -58,3 +58,5 @@
|
||||
{$ENDIF}
|
||||
|
||||
{.$DEFINE RxDBGridDepricatedProps}
|
||||
|
||||
{.$DEFINE OLD_fpSPREADSHEET}
|
||||
|
@ -104,7 +104,9 @@ var
|
||||
C : TRxColumn;
|
||||
CT : TRxColumnTitle;
|
||||
CC : TColor;
|
||||
{$IFDEF OLD_fpSPREADSHEET}
|
||||
scColor : TsColor;
|
||||
{$ENDIF}
|
||||
CB:TsCellBorders;
|
||||
FMaxTitleHeight : integer;
|
||||
P: TMLCaptionItem;
|
||||
@ -125,8 +127,12 @@ begin
|
||||
CC:=C.Title.Color;
|
||||
if (CC and SYS_COLOR_BASE) = 0 then
|
||||
begin
|
||||
{$IFDEF OLD_fpSPREADSHEET}
|
||||
scColor:=FWorkbook.AddColorToPalette(CC);
|
||||
FWorksheet.WriteBackgroundColor(FCurRow, FCurCol, scColor);
|
||||
{$ELSE}
|
||||
FWorksheet.WriteBackgroundColor(FCurRow, FCurCol, CC);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
CB:=[cbNorth, cbWest, cbEast, cbSouth];
|
||||
@ -172,8 +178,12 @@ begin
|
||||
CC:=C.Title.Color;
|
||||
if (CC and SYS_COLOR_BASE) = 0 then
|
||||
begin
|
||||
{$IFDEF OLD_fpSPREADSHEET}
|
||||
scColor:=FWorkbook.AddColorToPalette(CC);
|
||||
FWorksheet.WriteBackgroundColor( FCurRow, FCurCol, scColor);
|
||||
{$ELSE}
|
||||
FWorksheet.WriteBackgroundColor( FCurRow, FCurCol, CC);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
FWorksheet.WriteBorders(FCurRow,FCurCol, [cbNorth, cbWest, cbEast, cbSouth]);
|
||||
@ -262,8 +272,12 @@ begin
|
||||
RxDBGrid.OnGetCellProps(RxDBGrid, C.Field, F, CC);
|
||||
if (CC and SYS_COLOR_BASE) = 0 then
|
||||
begin
|
||||
{$IFDEF OLD_fpSPREADSHEET}
|
||||
scColor:=FWorkbook.AddColorToPalette(CC);
|
||||
FWorksheet.WriteBackgroundColor(FCurRow,FCurCol, scColor);
|
||||
{$ELSE}
|
||||
FWorksheet.WriteBackgroundColor(FCurRow,FCurCol, CC);
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -289,7 +303,9 @@ var
|
||||
C : TRxColumn;
|
||||
CT : TRxColumnTitle;
|
||||
CC : TColor;
|
||||
{$IFDEF OLD_fpSPREADSHEET}
|
||||
scColor : TsColor;
|
||||
{$ENDIF}
|
||||
begin
|
||||
CC:=FRxDBGrid.FooterOptions.Color;
|
||||
FCurCol:=0;
|
||||
@ -301,8 +317,12 @@ begin
|
||||
begin
|
||||
if (CC and SYS_COLOR_BASE) = 0 then
|
||||
begin
|
||||
{$IFDEF OLD_fpSPREADSHEET}
|
||||
scColor:=FWorkbook.AddColorToPalette(CC);
|
||||
FWorksheet.WriteBackgroundColor(FCurRow,FCurCol, scColor);
|
||||
FWorksheet.WriteBackgroundColor(FCurRow,FCurCol, scColor);}
|
||||
{$ELSE}
|
||||
FWorksheet.WriteBackgroundColor(FCurRow,FCurCol, CC);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
if (C.Footer.ValueType <> fvtNon) then
|
||||
@ -367,7 +387,8 @@ begin
|
||||
FWorkbook := TsWorkbook.Create;
|
||||
FWorksheet := FWorkbook.AddWorksheet(FPageName);
|
||||
try
|
||||
scColorBlack:=FWorkbook.AddColorToPalette(FRxDBGrid.GridLineColor);
|
||||
// scColorBlack:=FWorkbook.AddColorToPalette(FRxDBGrid.GridLineColor);
|
||||
scColorBlack:=FRxDBGrid.GridLineColor;
|
||||
FCurRow:=0;
|
||||
|
||||
if ressExportTitle in FOptions then
|
||||
|
Reference in New Issue
Block a user