You've already forked lazarus-ccr
RxFPC:TRxDBGridExportPDF - fix errors
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5097 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -24,16 +24,25 @@
|
|||||||
<FormatVersion Value="1"/>
|
<FormatVersion Value="1"/>
|
||||||
</local>
|
</local>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="3">
|
<RequiredPackages Count="6">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="FCL"/>
|
<PackageName Value="rxdbgrid_print"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
<Item2>
|
<Item2>
|
||||||
<PackageName Value="rxnew"/>
|
<PackageName Value="rxdbgrid_export_spreadsheet"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
<Item3>
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="lazreport"/>
|
||||||
</Item3>
|
</Item3>
|
||||||
|
<Item4>
|
||||||
|
<PackageName Value="FCL"/>
|
||||||
|
</Item4>
|
||||||
|
<Item5>
|
||||||
|
<PackageName Value="rxnew"/>
|
||||||
|
</Item5>
|
||||||
|
<Item6>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item6>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="2">
|
<Units Count="2">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
<ProjectSession>
|
<ProjectSession>
|
||||||
<Version Value="9"/>
|
<Version Value="9"/>
|
||||||
<BuildModes Active="Default"/>
|
<BuildModes Active="Default"/>
|
||||||
<Units Count="82">
|
<Units Count="84">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="project1.lpr"/>
|
<Filename Value="project1.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<CursorPos X="81" Y="12"/>
|
<CursorPos X="81" Y="12"/>
|
||||||
<UsageCount Value="108"/>
|
<UsageCount Value="117"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
@ -19,9 +19,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="Unit1"/>
|
<UnitName Value="Unit1"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="110"/>
|
<CursorPos X="7" Y="21"/>
|
||||||
<CursorPos Y="125"/>
|
<UsageCount Value="117"/>
|
||||||
<UsageCount Value="108"/>
|
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -29,19 +28,16 @@
|
|||||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||||
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="143"/>
|
<TopLine Value="154"/>
|
||||||
<CursorPos X="31" Y="32"/>
|
<CursorPos X="8" Y="145"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="3"/>
|
||||||
<TopLine Value="5626"/>
|
<TopLine Value="3486"/>
|
||||||
<CursorPos Y="5653"/>
|
<CursorPos X="3" Y="3503"/>
|
||||||
<UsageCount Value="28"/>
|
<UsageCount Value="32"/>
|
||||||
<Bookmarks Count="1">
|
|
||||||
<Item0 X="89" Y="5603" ID="1"/>
|
|
||||||
</Bookmarks>
|
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
@ -55,9 +51,9 @@
|
|||||||
<Unit5>
|
<Unit5>
|
||||||
<Filename Value="../../rxdconst.pas"/>
|
<Filename Value="../../rxdconst.pas"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="161"/>
|
<TopLine Value="170"/>
|
||||||
<CursorPos X="18" Y="177"/>
|
<CursorPos X="43" Y="197"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="12"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/classes/reader.inc"/>
|
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/classes/reader.inc"/>
|
||||||
@ -92,14 +88,15 @@
|
|||||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<UnitName Value="RxDBGridExportPdf"/>
|
<UnitName Value="RxDBGridExportPdf"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="485"/>
|
<TopLine Value="772"/>
|
||||||
<CursorPos Y="491"/>
|
<CursorPos Y="781"/>
|
||||||
<UsageCount Value="52"/>
|
<UsageCount Value="56"/>
|
||||||
<Bookmarks Count="4">
|
<Bookmarks Count="5">
|
||||||
<Item0 X="3" Y="456" ID="2"/>
|
<Item0 X="3" Y="457" ID="2"/>
|
||||||
<Item1 Y="417" ID="3"/>
|
<Item1 Y="421" ID="3"/>
|
||||||
<Item2 X="18" Y="566" ID="4"/>
|
<Item2 Y="594" ID="4"/>
|
||||||
<Item3 X="15" Y="329" ID="5"/>
|
<Item3 X="15" Y="334" ID="5"/>
|
||||||
|
<Item4 X="12" Y="631" ID="1"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
@ -206,8 +203,6 @@
|
|||||||
<Filename Value="../../../lazutils/fileutil.pas"/>
|
<Filename Value="../../../lazutils/fileutil.pas"/>
|
||||||
<UnitName Value="FileUtil"/>
|
<UnitName Value="FileUtil"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="220"/>
|
|
||||||
<CursorPos X="17" Y="235"/>
|
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit24>
|
</Unit24>
|
||||||
<Unit25>
|
<Unit25>
|
||||||
@ -244,9 +239,9 @@
|
|||||||
<Filename Value="../../../lazreport/source/lr_class.pas"/>
|
<Filename Value="../../../lazreport/source/lr_class.pas"/>
|
||||||
<UnitName Value="LR_Class"/>
|
<UnitName Value="LR_Class"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="3503"/>
|
<TopLine Value="3782"/>
|
||||||
<CursorPos X="3" Y="3506"/>
|
<CursorPos X="13" Y="3780"/>
|
||||||
<UsageCount Value="4"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit29>
|
</Unit29>
|
||||||
<Unit30>
|
<Unit30>
|
||||||
<Filename Value="C:/lazarus/components/lazutils/easylazfreetype.pas"/>
|
<Filename Value="C:/lazarus/components/lazutils/easylazfreetype.pas"/>
|
||||||
@ -401,8 +396,8 @@
|
|||||||
<Filename Value="../../../../lcl/grids.pas"/>
|
<Filename Value="../../../../lcl/grids.pas"/>
|
||||||
<UnitName Value="Grids"/>
|
<UnitName Value="Grids"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="11194"/>
|
<TopLine Value="4258"/>
|
||||||
<CursorPos Y="11210"/>
|
<CursorPos X="3" Y="4247"/>
|
||||||
<UsageCount Value="14"/>
|
<UsageCount Value="14"/>
|
||||||
</Unit50>
|
</Unit50>
|
||||||
<Unit51>
|
<Unit51>
|
||||||
@ -463,10 +458,12 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="RxDBGridExportPdfSetupUnit"/>
|
<UnitName Value="RxDBGridExportPdfSetupUnit"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="2"/>
|
||||||
<TopLine Value="57"/>
|
<TopLine Value="43"/>
|
||||||
<CursorPos X="23" Y="81"/>
|
<CursorPos X="11" Y="66"/>
|
||||||
<UsageCount Value="19"/>
|
<UsageCount Value="21"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit58>
|
</Unit58>
|
||||||
<Unit59>
|
<Unit59>
|
||||||
<Filename Value="../../rxdbgridexportspreadsheet_paramsunit.pas"/>
|
<Filename Value="../../rxdbgridexportspreadsheet_paramsunit.pas"/>
|
||||||
@ -477,7 +474,7 @@
|
|||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="31"/>
|
<TopLine Value="31"/>
|
||||||
<CursorPos X="3" Y="46"/>
|
<CursorPos X="3" Y="46"/>
|
||||||
<UsageCount Value="6"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit59>
|
</Unit59>
|
||||||
<Unit60>
|
<Unit60>
|
||||||
<Filename Value="../../../../lcl/controls.pp"/>
|
<Filename Value="../../../../lcl/controls.pp"/>
|
||||||
@ -490,17 +487,16 @@
|
|||||||
<Unit61>
|
<Unit61>
|
||||||
<Filename Value="/home/OPTORG/alexs/1/1/testfppdf.lpr"/>
|
<Filename Value="/home/OPTORG/alexs/1/1/testfppdf.lpr"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<UsageCount Value="34"/>
|
<UsageCount Value="38"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit61>
|
</Unit61>
|
||||||
<Unit62>
|
<Unit62>
|
||||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-pdf/src/fppdf.pp"/>
|
<Filename Value="/home/install/source/fpcsrc/packages/fcl-pdf/src/fppdf.pp"/>
|
||||||
<UnitName Value="fpPDF"/>
|
<UnitName Value="fpPDF"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="755"/>
|
<TopLine Value="3194"/>
|
||||||
<CursorPos X="27" Y="770"/>
|
<CursorPos X="3" Y="3196"/>
|
||||||
<UsageCount Value="28"/>
|
<UsageCount Value="32"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit62>
|
</Unit62>
|
||||||
<Unit63>
|
<Unit63>
|
||||||
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||||
@ -547,11 +543,10 @@
|
|||||||
<Unit69>
|
<Unit69>
|
||||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-pdf/src/fpttf.pp"/>
|
<Filename Value="/home/install/source/fpcsrc/packages/fcl-pdf/src/fpttf.pp"/>
|
||||||
<UnitName Value="fpTTF"/>
|
<UnitName Value="fpTTF"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="17"/>
|
<TopLine Value="17"/>
|
||||||
<CursorPos X="29" Y="21"/>
|
<CursorPos X="29" Y="21"/>
|
||||||
<UsageCount Value="24"/>
|
<UsageCount Value="25"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit69>
|
</Unit69>
|
||||||
<Unit70>
|
<Unit70>
|
||||||
<Filename Value="../../../../lcl/include/canvas.inc"/>
|
<Filename Value="../../../../lcl/include/canvas.inc"/>
|
||||||
@ -628,10 +623,10 @@
|
|||||||
<Unit80>
|
<Unit80>
|
||||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-image/src/fpimage.pp"/>
|
<Filename Value="/home/install/source/fpcsrc/packages/fcl-image/src/fpimage.pp"/>
|
||||||
<UnitName Value="FPimage"/>
|
<UnitName Value="FPimage"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="5"/>
|
||||||
<TopLine Value="10"/>
|
<TopLine Value="10"/>
|
||||||
<CursorPos X="3" Y="25"/>
|
<CursorPos X="3" Y="25"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit80>
|
</Unit80>
|
||||||
<Unit81>
|
<Unit81>
|
||||||
@ -642,127 +637,146 @@
|
|||||||
<CursorPos X="15" Y="33"/>
|
<CursorPos X="15" Y="33"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit81>
|
</Unit81>
|
||||||
|
<Unit82>
|
||||||
|
<Filename Value="../../rxdbgridprintgrid_setupunit.pas"/>
|
||||||
|
<ComponentName Value="RxDBGridPrintGrid_SetupForm"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="RxDBGridPrintGrid_SetupUnit"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="17"/>
|
||||||
|
<CursorPos Y="99"/>
|
||||||
|
<UsageCount Value="12"/>
|
||||||
|
</Unit82>
|
||||||
|
<Unit83>
|
||||||
|
<Filename Value="../../../../lcl/include/customcombobox.inc"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="927"/>
|
||||||
|
<CursorPos Y="946"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit83>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="29" HistoryIndex="28">
|
<JumpHistory Count="29" HistoryIndex="28">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="1897" Column="41" TopLine="1872"/>
|
<Caret Line="592" TopLine="578"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="1899" Column="41" TopLine="1874"/>
|
<Caret Line="569" TopLine="556"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="2600" Column="16" TopLine="2575"/>
|
<Caret Line="571" TopLine="556"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="2615" Column="23" TopLine="2585"/>
|
<Caret Line="569" TopLine="556"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="2607" TopLine="2601"/>
|
<Caret Line="572" TopLine="550"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="2617" Column="54" TopLine="2601"/>
|
<Caret Line="569" TopLine="550"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="2620" Column="64" TopLine="2601"/>
|
<Caret Line="575" Column="25" TopLine="555"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="3026" Column="67" TopLine="3000"/>
|
<Caret Line="569" TopLine="555"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="3029" Column="68" TopLine="3002"/>
|
<Caret Line="570" TopLine="555"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="3033" Column="65" TopLine="3005"/>
|
<Caret Line="569" TopLine="555"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="3063" Column="42" TopLine="3036"/>
|
<Caret Line="581" Column="32" TopLine="555"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="3518" Column="58" TopLine="3490"/>
|
<Caret Line="569" TopLine="555"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="3801" Column="40" TopLine="3772"/>
|
<Caret Line="570" TopLine="555"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="4190" Column="65" TopLine="4162"/>
|
<Caret Line="572" TopLine="555"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="4249" Column="82" TopLine="4222"/>
|
<Caret Line="574" TopLine="555"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="4286" Column="38" TopLine="4257"/>
|
<Caret Line="573" TopLine="555"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="4339" Column="36" TopLine="4313"/>
|
<Caret Line="574" TopLine="555"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="5618" Column="89" TopLine="5589"/>
|
<Caret Line="573" TopLine="555"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="101" Column="22" TopLine="80"/>
|
<Caret Line="574" TopLine="555"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="5633" Column="20" TopLine="5620"/>
|
<Caret Line="573" TopLine="555"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="5634" Column="29" TopLine="5620"/>
|
<Caret Line="575" TopLine="555"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
|
<Caret Line="567" TopLine="555"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="681" Column="31" TopLine="657"/>
|
<Caret Line="569" TopLine="555"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="4811" Column="45" TopLine="4786"/>
|
<Caret Line="570" TopLine="555"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="5446" Column="46" TopLine="5421"/>
|
<Caret Line="574" Column="13" TopLine="567"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
<Caret Line="5452" Column="47" TopLine="5427"/>
|
<Caret Line="3503" Column="3" TopLine="3486"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="5633" Column="29" TopLine="5609"/>
|
<Caret Line="192" Column="66" TopLine="169"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
|
||||||
<Caret Line="5634" Column="29" TopLine="5610"/>
|
<Caret Line="58" Column="5" TopLine="43"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="5635" Column="29" TopLine="5611"/>
|
<Caret Line="780" TopLine="772"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<BreakPoints Count="2">
|
<BreakPoints Count="3">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Kind Value="bpkSource"/>
|
<Kind Value="bpkSource"/>
|
||||||
<WatchScope Value="wpsLocal"/>
|
<WatchScope Value="wpsLocal"/>
|
||||||
@ -777,6 +791,13 @@
|
|||||||
<Source Value="/home/install/source/fpcsrc/packages/fcl-pdf/src/fpttf.pp"/>
|
<Source Value="/home/install/source/fpcsrc/packages/fcl-pdf/src/fpttf.pp"/>
|
||||||
<Line Value="320"/>
|
<Line Value="320"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<Kind Value="bpkSource"/>
|
||||||
|
<WatchScope Value="wpsLocal"/>
|
||||||
|
<WatchKind Value="wpkWrite"/>
|
||||||
|
<Source Value="../../rxdbgridexportpdf.pas"/>
|
||||||
|
<Line Value="780"/>
|
||||||
|
</Item3>
|
||||||
</BreakPoints>
|
</BreakPoints>
|
||||||
<Watches Count="1">
|
<Watches Count="1">
|
||||||
<Item1>
|
<Item1>
|
||||||
|
@ -115,6 +115,7 @@ object Form1: TForm1
|
|||||||
Value = 'Максимум:'
|
Value = 'Максимум:'
|
||||||
ValueType = fvtStaticText
|
ValueType = fvtStaticText
|
||||||
end>
|
end>
|
||||||
|
WordWrap = True
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Title.Alignment = taCenter
|
Title.Alignment = taCenter
|
||||||
@ -176,7 +177,7 @@ object Form1: TForm1
|
|||||||
Alignment = taCenter
|
Alignment = taCenter
|
||||||
Title.Alignment = taCenter
|
Title.Alignment = taCenter
|
||||||
Title.Orientation = toHorizontal
|
Title.Orientation = toHorizontal
|
||||||
Title.Caption = 'Страна'
|
Title.Caption = 'Адрес|Страна'
|
||||||
Width = 200
|
Width = 200
|
||||||
FieldName = 'Country'
|
FieldName = 'Country'
|
||||||
EditButtons = <>
|
EditButtons = <>
|
||||||
@ -189,7 +190,7 @@ object Form1: TForm1
|
|||||||
item
|
item
|
||||||
Title.Alignment = taCenter
|
Title.Alignment = taCenter
|
||||||
Title.Orientation = toHorizontal
|
Title.Orientation = toHorizontal
|
||||||
Title.Caption = 'Город'
|
Title.Caption = 'Адрес|Город'
|
||||||
Width = 200
|
Width = 200
|
||||||
FieldName = 'Sity'
|
FieldName = 'Sity'
|
||||||
EditButtons = <>
|
EditButtons = <>
|
||||||
@ -259,7 +260,7 @@ object Form1: TForm1
|
|||||||
FooterOptions.Color = clYellow
|
FooterOptions.Color = clYellow
|
||||||
FooterOptions.RowCount = 3
|
FooterOptions.RowCount = 3
|
||||||
FooterOptions.DrawFullLine = True
|
FooterOptions.DrawFullLine = True
|
||||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter, rdgAllowToolMenu, rdgWordWrapTitles]
|
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter, rdgAllowToolMenu, rdgWordWrap]
|
||||||
FooterColor = clYellow
|
FooterColor = clYellow
|
||||||
FooterRowCount = 3
|
FooterRowCount = 3
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -415,12 +416,12 @@ object Form1: TForm1
|
|||||||
RxDBGrid = RxDBGrid1
|
RxDBGrid = RxDBGrid1
|
||||||
Caption = 'Export to PDF file'
|
Caption = 'Export to PDF file'
|
||||||
FileName = 'test111.pdf'
|
FileName = 'test111.pdf'
|
||||||
Options = [repExportTitle, repExportColors, repExportFooter, repOverwriteExisting]
|
Options = [repExportTitle, repExportColors, repExportFooter, repOverwriteExisting, repExportImages]
|
||||||
PdfOptions.PaperOrientation = ppoLandscape
|
PdfOptions.PaperOrientation = ppoLandscape
|
||||||
PdfOptions.Options = [poCompressText, poCompressFonts, poCompressImages, poUseRawJPEG]
|
PdfOptions.Options = [poCompressText, poCompressFonts, poCompressImages, poUseRawJPEG]
|
||||||
OpenAfterExport = True
|
OpenAfterExport = True
|
||||||
AuthorPdf = 'Лагунов А.А.'
|
AuthorPdf = 'Lagunov A.A.'
|
||||||
ProducerPdf = 'alexs'
|
ProducerPdf = 'Test project'
|
||||||
PageMargin.Left = 40
|
PageMargin.Left = 40
|
||||||
PageMargin.Top = 40
|
PageMargin.Top = 40
|
||||||
PageMargin.Right = 40
|
PageMargin.Right = 40
|
||||||
@ -531,4 +532,24 @@ object Form1: TForm1
|
|||||||
0000000000000000000000000000
|
0000000000000000000000000000
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
object frReport1: TfrReport
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
Options = []
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbHelp, pbExit]
|
||||||
|
DataType = dtDataSet
|
||||||
|
left = 304
|
||||||
|
top = 88
|
||||||
|
end
|
||||||
|
object RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet
|
||||||
|
Caption = 'Экспорт в электронную таблицу'
|
||||||
|
Options = []
|
||||||
|
left = 304
|
||||||
|
top = 154
|
||||||
|
end
|
||||||
|
object RxDBGridPrint1: TRxDBGridPrint
|
||||||
|
Caption = 'Печать списка'
|
||||||
|
Options = [rxpoShowTitle, rxpoShowFooter, rxpoShowGridColor, rxpoShowFooterColor, rxpoShowReportTitle]
|
||||||
|
left = 346
|
||||||
|
top = 154
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,9 +5,9 @@ unit Unit1;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, rxmemds, rxdbgrid,
|
Classes, SysUtils, FileUtil, rxmemds, rxdbgrid, RxDBGridExportPdf,
|
||||||
RxDBGridExportPdf, Forms, Controls, Graphics,
|
RxDBGridExportSpreadSheet, RxDBGridPrintGrid, LR_Class, Forms, Controls,
|
||||||
Dialogs, ExtCtrls, StdCtrls, ComCtrls, Spin, db;
|
Graphics, Dialogs, ExtCtrls, StdCtrls, ComCtrls, Spin, db;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -16,12 +16,15 @@ type
|
|||||||
TForm1 = class(TForm)
|
TForm1 = class(TForm)
|
||||||
Button1: TButton;
|
Button1: TButton;
|
||||||
DataSource1: TDataSource;
|
DataSource1: TDataSource;
|
||||||
|
frReport1: TfrReport;
|
||||||
ImageList1: TImageList;
|
ImageList1: TImageList;
|
||||||
Memo1: TMemo;
|
Memo1: TMemo;
|
||||||
PageControl1: TPageControl;
|
PageControl1: TPageControl;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
RxDBGrid1: TRxDBGrid;
|
RxDBGrid1: TRxDBGrid;
|
||||||
RxDBGridExportPDF1: TRxDBGridExportPDF;
|
RxDBGridExportPDF1: TRxDBGridExportPDF;
|
||||||
|
RxDBGridExportSpreadSheet1: TRxDBGridExportSpreadSheet;
|
||||||
|
RxDBGridPrint1: TRxDBGridPrint;
|
||||||
RxMemoryData1: TRxMemoryData;
|
RxMemoryData1: TRxMemoryData;
|
||||||
RxMemoryData1Country: TStringField;
|
RxMemoryData1Country: TStringField;
|
||||||
RxMemoryData1FLAG: TLongintField;
|
RxMemoryData1FLAG: TLongintField;
|
||||||
|
@ -41,6 +41,7 @@ cp ../rx.inc rx.inc
|
|||||||
--input=../boxprocs.pas --descr=boxprocs.xml \
|
--input=../boxprocs.pas --descr=boxprocs.xml \
|
||||||
--input=../rxspin.pas --descr=rxspin \
|
--input=../rxspin.pas --descr=rxspin \
|
||||||
--input=../vclutils.pas --descr=vclutils.xml \
|
--input=../vclutils.pas --descr=vclutils.xml \
|
||||||
|
--input=../rxdbgridexportpdf.pas --descr=rxdbgridexportpdf.xml \
|
||||||
--input=../rxinipropstorage.pas --descr=rxinipropstorage.xml
|
--input=../rxinipropstorage.pas --descr=rxinipropstorage.xml
|
||||||
|
|
||||||
|
|
||||||
|
22
components/rx/trunk/docs/rxdbgridexportpdf.xml
Normal file
22
components/rx/trunk/docs/rxdbgridexportpdf.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<fpdoc-descriptions><package name="rxnew"><module name="RxDBGridExportPdf"><element name="TRxDBGridExportPDF"><short>Инструмент экспорта данных из RxDBGrid в PDF файл</short>
|
||||||
|
</element><element name="TRxDBGridExportPDF.FileName"><short>Имя файла для экспорта</short>
|
||||||
|
</element><element name="TRxDBGridExportPDF.Options"><short>Параметры экспорта</short>
|
||||||
|
</element><element name="TRxDBGridExportPDF.PdfOptions"><short>Параметры создаваемого PDF файла</short>
|
||||||
|
</element><element name="TRxDBGridExportPDF.OpenAfterExport"><short>Открыть сформированный файл после завершения экспорта</short>
|
||||||
|
</element><element name="TRxDBGridExportPDF.AuthorPdf"><short>Автор PDF файла</short>
|
||||||
|
</element><element name="TRxDBGridExportPDF.PageMargin"><short>Отступы на на странице в PDF файле</short>
|
||||||
|
</element><element name="TRxDBGridExportPDF.TitleColor"><short>Цвет, используемый для заливки заголовков колонок</short>
|
||||||
|
</element><element name="TPdfExportOptions.PaperType"><short>Размер бумаги в PDF файле</short>
|
||||||
|
</element><element name="TPdfExportOptions.PaperOrientation"><short>Ориентация бумаги в PDF файле</short>
|
||||||
|
</element><element name="TPdfExportOptions.Options"><short>Параметры формирования файла</short>
|
||||||
|
</element><element name="TRxDBGridExportPdfOptions"><short>Параметры формирования PDF файла</short>
|
||||||
|
</element><element name="TRxDBGridExportPdfOption.repExportColors"><short>Использовать раскраску сетки таблицы</short>
|
||||||
|
</element><element name="TRxDBGridExportPdfOption.repExportTitle"><short>Экспортровать заголовки таблицы</short>
|
||||||
|
</element><element name="TRxDBGridExportPdfOption.repExportFooter"><short>Экспортировать итоги таблицы</short>
|
||||||
|
</element><element name="TRxDBGridExportPdfOption.repOverwriteExisting"><short>Перезаписывать существующий файл</short>
|
||||||
|
</element><element name="TRxDBGridExportPdfOption.repExportImages"><short>Экспортировать изображения</short>
|
||||||
|
</element>
|
||||||
|
</module>
|
||||||
|
</package>
|
||||||
|
</fpdoc-descriptions>
|
@ -307,6 +307,10 @@ msgstr ""
|
|||||||
msgid "Page name"
|
msgid "Page name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.spapertype
|
||||||
|
msgid "Paper type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.spasswordchanged
|
#: rxdconst.spasswordchanged
|
||||||
msgid "Password changed"
|
msgid "Password changed"
|
||||||
msgstr "Clave cambiada"
|
msgstr "Clave cambiada"
|
||||||
|
@ -293,6 +293,10 @@ msgstr ""
|
|||||||
msgid "Page name"
|
msgid "Page name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.spapertype
|
||||||
|
msgid "Paper type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.spasswordchanged
|
#: rxdconst.spasswordchanged
|
||||||
msgid "Password changed"
|
msgid "Password changed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -293,6 +293,10 @@ msgstr "Отступы на странице"
|
|||||||
msgid "Page name"
|
msgid "Page name"
|
||||||
msgstr "Имя страницы"
|
msgstr "Имя страницы"
|
||||||
|
|
||||||
|
#: rxdconst.spapertype
|
||||||
|
msgid "Paper type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.spasswordchanged
|
#: rxdconst.spasswordchanged
|
||||||
msgid "Password changed"
|
msgid "Password changed"
|
||||||
msgstr "Пароль изменён"
|
msgstr "Пароль изменён"
|
||||||
|
@ -305,6 +305,10 @@ msgstr "Межі сторінки"
|
|||||||
msgid "Page name"
|
msgid "Page name"
|
||||||
msgstr "Назва сторінки"
|
msgstr "Назва сторінки"
|
||||||
|
|
||||||
|
#: rxdconst.spapertype
|
||||||
|
msgid "Paper type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.spasswordchanged
|
#: rxdconst.spasswordchanged
|
||||||
msgid "Password changed"
|
msgid "Password changed"
|
||||||
msgstr "Пароль змінено"
|
msgstr "Пароль змінено"
|
||||||
|
@ -235,7 +235,7 @@ type
|
|||||||
TMLCaptionItem = class
|
TMLCaptionItem = class
|
||||||
Caption: string;
|
Caption: string;
|
||||||
Width: integer;
|
Width: integer;
|
||||||
Hegth: integer;
|
Height: integer;
|
||||||
Next: TMLCaptionItem;
|
Next: TMLCaptionItem;
|
||||||
Prior: TMLCaptionItem;
|
Prior: TMLCaptionItem;
|
||||||
FInvalidDraw:integer;
|
FInvalidDraw:integer;
|
||||||
@ -2812,18 +2812,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
W1 := tmpCanvas.TextWidth(MLRec1.Caption) + 2;
|
W1 := tmpCanvas.TextWidth(MLRec1.Caption) + 2;
|
||||||
if W1 > W then
|
if W1 > W then
|
||||||
MLRec1.Hegth := Min(W1 div Max(W, 1) + 1, UTF8Length(MLRec1.Caption))
|
MLRec1.Height := Min(W1 div Max(W, 1) + 1, UTF8Length(MLRec1.Caption))
|
||||||
else
|
else
|
||||||
MLRec1.Hegth := 1;
|
MLRec1.Height := 1;
|
||||||
|
|
||||||
P := MLRec1.Next;
|
P := MLRec1.Next;
|
||||||
while Assigned(P) do
|
while Assigned(P) do
|
||||||
begin
|
begin
|
||||||
P.Hegth := MLRec1.Hegth;
|
P.Height := MLRec1.Height;
|
||||||
P := P.Next;
|
P := P.Next;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
H1 := H1 + MLRec1.Hegth;
|
H1 := H1 + MLRec1.Height;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@ -3582,7 +3582,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
aRect2.Bottom := aRect2.Top + MLI.Hegth * DefaultRowHeight;
|
aRect2.Bottom := aRect2.Top + MLI.Height * DefaultRowHeight;
|
||||||
aState := aState - [gdPushed];
|
aState := aState - [gdPushed];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5599,20 +5599,7 @@ begin
|
|||||||
|
|
||||||
FSortColumns:=TRxDbGridColumnsSortList.Create;
|
FSortColumns:=TRxDbGridColumnsSortList.Create;
|
||||||
|
|
||||||
// FMarkerUp := LoadBitmapFromLazarusResource('rx_markerup');
|
|
||||||
// FMarkerDown := LoadBitmapFromLazarusResource('rx_markerdown');
|
|
||||||
// F_MenuBMP := LoadBitmapFromLazarusResource('menu_grid');
|
|
||||||
|
|
||||||
F_MenuBMP := CreateResBitmap('rx_menu_grid');
|
F_MenuBMP := CreateResBitmap('rx_menu_grid');
|
||||||
(*
|
|
||||||
FMarkerUp := CreateResBitmap('rx_markerup');
|
|
||||||
FMarkerDown := CreateResBitmap('rx_markerdown');
|
|
||||||
FEllipsisRxBMP:=CreateResBitmap('rx_Ellipsis');
|
|
||||||
FGlyphRxBMP:=CreateResBitmap('rx_Glyph');
|
|
||||||
FUpDownRxBMP:=CreateResBitmap('rx_UpDown');
|
|
||||||
FPlusRxBMP:=CreateResBitmap('rx_plus');
|
|
||||||
FMinusRxBMP:=CreateResBitmap('rx_minus');
|
|
||||||
*)
|
|
||||||
|
|
||||||
Options := Options - [dgTabs];
|
Options := Options - [dgTabs];
|
||||||
OptionsRx := OptionsRx + [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter];
|
OptionsRx := OptionsRx + [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter];
|
||||||
@ -5627,7 +5614,6 @@ begin
|
|||||||
FKeyStrokes.ResetDefaults;
|
FKeyStrokes.ResetDefaults;
|
||||||
|
|
||||||
F_LastFilter := TStringList.Create;
|
F_LastFilter := TStringList.Create;
|
||||||
//F_SortListField := TStringList.Create;
|
|
||||||
|
|
||||||
FPropertyStorageLink := TPropertyStorageLink.Create;
|
FPropertyStorageLink := TPropertyStorageLink.Create;
|
||||||
FPropertyStorageLink.OnSave := @OnIniSave;
|
FPropertyStorageLink.OnSave := @OnIniSave;
|
||||||
|
@ -45,7 +45,8 @@ type
|
|||||||
TRxDBGridExportPdfOption = (repExportTitle,
|
TRxDBGridExportPdfOption = (repExportTitle,
|
||||||
repExportColors,
|
repExportColors,
|
||||||
repExportFooter,
|
repExportFooter,
|
||||||
repOverwriteExisting
|
repOverwriteExisting,
|
||||||
|
repExportImages
|
||||||
);
|
);
|
||||||
TRxDBGridExportPdfOptions = set of TRxDBGridExportPdfOption;
|
TRxDBGridExportPdfOptions = set of TRxDBGridExportPdfOption;
|
||||||
|
|
||||||
@ -138,6 +139,7 @@ type
|
|||||||
FProducerPDF: string;
|
FProducerPDF: string;
|
||||||
FPdfOptions:TPdfExportOptions;
|
FPdfOptions:TPdfExportOptions;
|
||||||
FCurPage: TPDFPage;
|
FCurPage: TPDFPage;
|
||||||
|
FTitleColor: TColor;
|
||||||
FWorkPages:TFPList;
|
FWorkPages:TFPList;
|
||||||
FWorkPagesNeedCount:integer;
|
FWorkPagesNeedCount:integer;
|
||||||
|
|
||||||
@ -155,7 +157,6 @@ type
|
|||||||
|
|
||||||
procedure DoSetupDocHeader;
|
procedure DoSetupDocHeader;
|
||||||
procedure DoSetupFonts;
|
procedure DoSetupFonts;
|
||||||
|
|
||||||
//
|
//
|
||||||
procedure WriteTextRect(AExportFont:TExportFontItem; X, Y, W, H:integer; AText:string; ATextAlign:TAlignment);
|
procedure WriteTextRect(AExportFont:TExportFontItem; X, Y, W, H:integer; AText:string; ATextAlign:TAlignment);
|
||||||
procedure DrawRect(X, Y, W, H: integer; ABorderColor, AFillColor: TColor);
|
procedure DrawRect(X, Y, W, H: integer; ABorderColor, AFillColor: TColor);
|
||||||
@ -187,6 +188,7 @@ type
|
|||||||
property AuthorPdf:string read FAuthorPDF write FAuthorPDF;
|
property AuthorPdf:string read FAuthorPDF write FAuthorPDF;
|
||||||
property ProducerPdf:string read FProducerPDF write FProducerPDF;
|
property ProducerPdf:string read FProducerPDF write FProducerPDF;
|
||||||
property PageMargin:TRxPageMargin read FPageMargin write SetPageMargin;
|
property PageMargin:TRxPageMargin read FPageMargin write SetPageMargin;
|
||||||
|
property TitleColor:TColor read FTitleColor write FTitleColor default clSilver;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -212,6 +214,9 @@ begin
|
|||||||
Result:={A[1] shl 24 +} A[1] shl 16 + A[2] shl 8 + A[3];
|
Result:={A[1] shl 24 +} A[1] shl 16 + A[2] shl 8 + A[3];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
type
|
||||||
|
THackExDBGrid = class(TRxDBGrid);
|
||||||
|
|
||||||
{ TExportFonts }
|
{ TExportFonts }
|
||||||
|
|
||||||
function TExportFonts.GetCount: integer;
|
function TExportFonts.GetCount: integer;
|
||||||
@ -259,7 +264,7 @@ begin
|
|||||||
|
|
||||||
S1:=ExtractFileDir(Result.FTTFFontInfo.FileName);
|
S1:=ExtractFileDir(Result.FTTFFontInfo.FileName);
|
||||||
S2:=ExtractFileName(Result.FTTFFontInfo.FileName);
|
S2:=ExtractFileName(Result.FTTFFontInfo.FileName);
|
||||||
S3:=AFontName; //AFontCollectionItem.Information[ftiFullName];
|
S3:=AFontName;
|
||||||
|
|
||||||
FOwner.FPDFDocument.FontDirectory:=S1;
|
FOwner.FPDFDocument.FontDirectory:=S1;
|
||||||
|
|
||||||
@ -381,7 +386,6 @@ end;
|
|||||||
function TRxDBGridExportPDF.ActivateFont(AFont: TFont; AOwnerFont: TFont
|
function TRxDBGridExportPDF.ActivateFont(AFont: TFont; AOwnerFont: TFont
|
||||||
): TExportFontItem;
|
): TExportFontItem;
|
||||||
begin
|
begin
|
||||||
//Result:=SelectFont(AFont);
|
|
||||||
Result:=FFontItems.FindItem(AFont.Name, AFont.Style);
|
Result:=FFontItems.FindItem(AFont.Name, AFont.Style);
|
||||||
{ if not Assigned(Result) then
|
{ if not Assigned(Result) then
|
||||||
Result:=SelectFont(AOwnerFont);
|
Result:=SelectFont(AOwnerFont);
|
||||||
@ -414,12 +418,9 @@ begin
|
|||||||
|
|
||||||
//Calc text width
|
//Calc text width
|
||||||
FTW:=ConvetUnits(AExportFont.FTTFFontInfo.TextWidth(AText, AExportFont.FontSize));
|
FTW:=ConvetUnits(AExportFont.FTTFFontInfo.TextWidth(AText, AExportFont.FontSize));
|
||||||
//FTW := (FTW1 * 25.4) / gTTFontCache.DPI;
|
|
||||||
|
|
||||||
//Calc text height
|
//Calc text height
|
||||||
FTH1 := AExportFont.FTTFFontInfo.FontData.CapHeight * AExportFont.FontSize * gTTFontCache.DPI / (72 * AExportFont.FTTFFontInfo.FontData.Head.UnitsPerEm);
|
FTH1 := AExportFont.FTTFFontInfo.FontData.CapHeight * AExportFont.FontSize * gTTFontCache.DPI / (72 * AExportFont.FTTFFontInfo.FontData.Head.UnitsPerEm);
|
||||||
FTH2 := Abs(AExportFont.FTTFFontInfo.FontData.Descender) * AExportFont.FontSize * gTTFontCache.DPI / (72 * AExportFont.FTTFFontInfo.FontData.Head.UnitsPerEm);
|
FTH2 := Abs(AExportFont.FTTFFontInfo.FontData.Descender) * AExportFont.FontSize * gTTFontCache.DPI / (72 * AExportFont.FTTFFontInfo.FontData.Head.UnitsPerEm);
|
||||||
|
|
||||||
FTH := (FTH1 * 25.4) / gTTFontCache.DPI + (FTH2 * 25.4) / gTTFontCache.DPI;
|
FTH := (FTH1 * 25.4) / gTTFontCache.DPI + (FTH2 * 25.4) / gTTFontCache.DPI;
|
||||||
|
|
||||||
|
|
||||||
@ -445,7 +446,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FCurPage.WriteText(X1, Y1, AText);
|
FCurPage.WriteText(X1, Y1 + fH, AText);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGridExportPDF.DrawRect(X, Y, W, H: integer; ABorderColor,
|
procedure TRxDBGridExportPDF.DrawRect(X, Y, W, H: integer; ABorderColor,
|
||||||
@ -458,15 +459,15 @@ begin
|
|||||||
if ABorderColor <> clNone then
|
if ABorderColor <> clNone then
|
||||||
FCurPage.SetColor(ColorToDdfColor(ABorderColor), true);
|
FCurPage.SetColor(ColorToDdfColor(ABorderColor), true);
|
||||||
|
|
||||||
if AFillColor <> clNone then
|
if (AFillColor <> clNone) and (repExportColors in FOptions) then
|
||||||
FCurPage.SetColor(ColorToDdfColor(AFillColor), false);
|
FCurPage.SetColor(ColorToDdfColor(AFillColor), false);
|
||||||
|
|
||||||
fX:= ConvetUnits(X);
|
|
||||||
fY:= ConvetUnits(Y);
|
|
||||||
fW:= ConvetUnits(W);
|
fW:= ConvetUnits(W);
|
||||||
fH:= ConvetUnits(H);
|
fH:= ConvetUnits(H);
|
||||||
|
fX:= ConvetUnits(X);
|
||||||
|
fY:= ConvetUnits(Y) + fH;
|
||||||
|
|
||||||
FCurPage.DrawRect(fX, fY, fW, fH, 1, AFillColor <> clNone, ABorderColor <> clNone);
|
FCurPage.DrawRect(fX, fY, fW, fH, 1, (AFillColor <> clNone) and (repExportColors in FOptions), (ABorderColor <> clNone));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGridExportPDF.DrawImage(X, Y, W, H: integer; ABmp: TBitmap;
|
procedure TRxDBGridExportPDF.DrawImage(X, Y, W, H: integer; ABmp: TBitmap;
|
||||||
@ -491,25 +492,26 @@ begin
|
|||||||
case ATextAlign of
|
case ATextAlign of
|
||||||
taLeftJustify:
|
taLeftJustify:
|
||||||
begin
|
begin
|
||||||
Y1:=fY {+ ConvetUnits(constCellPadding)};
|
Y1:=fY;
|
||||||
X1:=fX + ConvetUnits(constCellPadding);
|
X1:=fX + ConvetUnits(constCellPadding);
|
||||||
end;
|
end;
|
||||||
taRightJustify:
|
taRightJustify:
|
||||||
begin
|
begin
|
||||||
Y1:=fY {+ ConvetUnits(constCellPadding)};
|
Y1:=fY;
|
||||||
X1:=fX + fW - fW1 - ConvetUnits(constCellPadding);
|
X1:=fX + fW - fW1 - ConvetUnits(constCellPadding);
|
||||||
if X1 < fX then
|
if X1 < fX then
|
||||||
X1:=fX;
|
X1:=fX;
|
||||||
end;
|
end;
|
||||||
taCenter:
|
taCenter:
|
||||||
begin
|
begin
|
||||||
Y1:=fY {+ ConvetUnits(constCellPadding)};
|
Y1:=fY;
|
||||||
X1:=fX + fW / 2 - fW1 / 2 - ConvetUnits(constCellPadding);
|
X1:=fX + fW / 2 - fW1 / 2 - ConvetUnits(constCellPadding);
|
||||||
if X1 < fX then
|
if X1 < fX then
|
||||||
X1:=fX;
|
X1:=fX;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Y1:=Y1 + fW1;
|
||||||
FCurPage.DrawImage(X1, Y1, fW1, fH1, IDX); // left-bottom coordinate of image
|
FCurPage.DrawImage(X1, Y1, fW1, fH1, IDX); // left-bottom coordinate of image
|
||||||
|
|
||||||
finally
|
finally
|
||||||
@ -533,18 +535,18 @@ begin
|
|||||||
FWorkPages.Add(P);
|
FWorkPages.Add(P);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FPosY:=FPageMargin.Top + 20;
|
FPosY:=FPageMargin.Top;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGridExportPDF.DoExportTitle;
|
procedure TRxDBGridExportPDF.DoExportTitle;
|
||||||
var
|
var
|
||||||
i, X, CP: Integer;
|
i, X, CP, K, KY, TH1: Integer;
|
||||||
C: TRxColumn;
|
C: TRxColumn;
|
||||||
S: String;
|
CT: TRxColumnTitle;
|
||||||
PU: TPDFUnitOfMeasure;
|
H: LongInt;
|
||||||
WW: Single;
|
|
||||||
begin
|
begin
|
||||||
X:=FPageWidth + FPageMargin.Right;
|
X:=FPageWidth + FPageMargin.Right;
|
||||||
|
H:=THackExDBGrid(FRxDBGrid).RowHeights[0];
|
||||||
CP:=-1;
|
CP:=-1;
|
||||||
FCurPage:=nil;
|
FCurPage:=nil;
|
||||||
for i:=0 to FRxDBGrid.Columns.Count - 1 do
|
for i:=0 to FRxDBGrid.Columns.Count - 1 do
|
||||||
@ -559,17 +561,41 @@ begin
|
|||||||
X:=FPageMargin.Left;
|
X:=FPageMargin.Left;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
DrawRect(X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, FRxDBGrid.BorderColor, clNone);
|
CT:=C.Title as TRxColumnTitle;
|
||||||
|
if CT.CaptionLinesCount > 0 then
|
||||||
|
begin
|
||||||
|
KY:=FPosY;
|
||||||
|
for K:=0 to CT.CaptionLinesCount - 1 do
|
||||||
|
begin
|
||||||
|
TH1:=CT.CaptionLine(K).Height * RxDBGrid.DefaultRowHeight;
|
||||||
|
if K < CT.CaptionLinesCount-1 then
|
||||||
|
begin
|
||||||
|
DrawRect(X, KY, {CT.CaptionLine(K).Width} C.Width, TH1, FRxDBGrid.BorderColor, FTitleColor);
|
||||||
|
|
||||||
|
WriteTextRect(ActivateFont(C.Title.Font, FRxDBGrid.TitleFont),
|
||||||
|
X, KY, C.Width, TH1, CT.CaptionLine(K).Caption, C.Title.Alignment);
|
||||||
|
KY:=KY + TH1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
DrawRect(X, KY, {CT.CaptionLine(K).Width} C.Width, FPosY + H - KY, FRxDBGrid.BorderColor, FTitleColor);
|
||||||
|
|
||||||
WriteTextRect(ActivateFont(C.Title.Font, FRxDBGrid.TitleFont),
|
WriteTextRect(ActivateFont(C.Title.Font, FRxDBGrid.TitleFont),
|
||||||
X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, C.Title.Caption, C.Title.Alignment);
|
X, KY, C.Width, FPosY + H - KY, CT.CaptionLine(K).Caption, C.Title.Alignment);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
DrawRect(X, FPosY, C.Width, H, FRxDBGrid.BorderColor, FTitleColor);
|
||||||
|
WriteTextRect(ActivateFont(C.Title.Font, FRxDBGrid.TitleFont),
|
||||||
|
X, FPosY, C.Width, H, C.Title.Caption, C.Title.Alignment);
|
||||||
|
end;
|
||||||
X:=X + C.Width;
|
X:=X + C.Width;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Inc(FPosY, FRxDBGrid.DefaultRowHeight);
|
Inc(FPosY, H); // DefaultRowHeight);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGridExportPDF.DoExportBody;
|
procedure TRxDBGridExportPDF.DoExportBody;
|
||||||
@ -602,7 +628,7 @@ begin
|
|||||||
|
|
||||||
if Assigned(C.Field) then
|
if Assigned(C.Field) then
|
||||||
begin
|
begin
|
||||||
if Assigned(C.ImageList) then
|
if (repExportImages in FOptions) and Assigned(C.ImageList) then
|
||||||
begin
|
begin
|
||||||
AImageIndex := StrToIntDef(C.KeyList.Values[C.Field.AsString], C.NotInKeyListIndex);
|
AImageIndex := StrToIntDef(C.KeyList.Values[C.Field.AsString], C.NotInKeyListIndex);
|
||||||
if (AImageIndex > -1) and (AImageIndex < C.ImageList.Count) then
|
if (AImageIndex > -1) and (AImageIndex < C.ImageList.Count) then
|
||||||
@ -865,12 +891,26 @@ begin
|
|||||||
RxDBGridExportPdfSetupForm.cbOpenAfterExport.Checked:=FOpenAfterExport;
|
RxDBGridExportPdfSetupForm.cbOpenAfterExport.Checked:=FOpenAfterExport;
|
||||||
RxDBGridExportPdfSetupForm.cbExportColumnHeader.Checked:=repExportTitle in FOptions;
|
RxDBGridExportPdfSetupForm.cbExportColumnHeader.Checked:=repExportTitle in FOptions;
|
||||||
RxDBGridExportPdfSetupForm.cbExportColumnFooter.Checked:=repExportFooter in FOptions;
|
RxDBGridExportPdfSetupForm.cbExportColumnFooter.Checked:=repExportFooter in FOptions;
|
||||||
|
RxDBGridExportPdfSetupForm.cbExportCellColors.Checked:=repExportColors in FOptions;
|
||||||
|
RxDBGridExportPdfSetupForm.CheckBox6.Checked:=repExportImages in FOptions;
|
||||||
|
RxDBGridExportPdfSetupForm.ColorBox1.Selected:=FTitleColor;
|
||||||
|
|
||||||
|
RxDBGridExportPdfSetupForm.RadioGroup1.ItemIndex:=Ord(FPdfOptions.PaperOrientation = ppoLandscape);
|
||||||
|
RxDBGridExportPdfSetupForm.ComboBox1.ItemIndex:=Ord(FPdfOptions.PaperType)-1;
|
||||||
|
|
||||||
|
RxDBGridExportPdfSetupForm.CheckBox1.Checked:=poOutLine in FPdfOptions.Options;
|
||||||
|
RxDBGridExportPdfSetupForm.CheckBox2.Checked:=poCompressText in FPdfOptions.Options;
|
||||||
|
RxDBGridExportPdfSetupForm.CheckBox3.Checked:=poCompressFonts in FPdfOptions.Options;
|
||||||
|
RxDBGridExportPdfSetupForm.CheckBox4.Checked:=poCompressImages in FPdfOptions.Options;
|
||||||
|
RxDBGridExportPdfSetupForm.CheckBox5.Checked:=poUseRawJPEG in FPdfOptions.Options;
|
||||||
|
|
||||||
Result:=RxDBGridExportPdfSetupForm.ShowModal = mrOk;
|
Result:=RxDBGridExportPdfSetupForm.ShowModal = mrOk;
|
||||||
if Result then
|
if Result then
|
||||||
begin
|
begin
|
||||||
FileName:=RxDBGridExportPdfSetupForm.FileNameEdit1.FileName;
|
FileName:=RxDBGridExportPdfSetupForm.FileNameEdit1.FileName;
|
||||||
FOpenAfterExport:=RxDBGridExportPdfSetupForm.cbOpenAfterExport.Checked;
|
FOpenAfterExport:=RxDBGridExportPdfSetupForm.cbOpenAfterExport.Checked;
|
||||||
|
FTitleColor:=RxDBGridExportPdfSetupForm.ColorBox1.Selected;
|
||||||
|
|
||||||
if RxDBGridExportPdfSetupForm.cbExportColumnHeader.Checked then
|
if RxDBGridExportPdfSetupForm.cbExportColumnHeader.Checked then
|
||||||
FOptions:=FOptions + [repExportTitle]
|
FOptions:=FOptions + [repExportTitle]
|
||||||
else
|
else
|
||||||
@ -880,6 +920,50 @@ begin
|
|||||||
FOptions:=FOptions + [repExportFooter]
|
FOptions:=FOptions + [repExportFooter]
|
||||||
else
|
else
|
||||||
FOptions:=FOptions - [repExportFooter];
|
FOptions:=FOptions - [repExportFooter];
|
||||||
|
|
||||||
|
if RxDBGridExportPdfSetupForm.cbExportCellColors.Checked then
|
||||||
|
FOptions:=FOptions + [repExportColors]
|
||||||
|
else
|
||||||
|
FOptions:=FOptions - [repExportColors];
|
||||||
|
|
||||||
|
if RxDBGridExportPdfSetupForm.CheckBox6.Checked then
|
||||||
|
FOptions:=FOptions + [repExportImages]
|
||||||
|
else
|
||||||
|
FOptions:=FOptions - [repExportImages];
|
||||||
|
|
||||||
|
|
||||||
|
if RxDBGridExportPdfSetupForm.RadioGroup1.ItemIndex = 0 then
|
||||||
|
FPdfOptions.PaperOrientation:=ppoPortrait
|
||||||
|
else
|
||||||
|
FPdfOptions.PaperOrientation:=ppoLandscape;
|
||||||
|
|
||||||
|
FPdfOptions.PaperType:=TPDFPaperType(RxDBGridExportPdfSetupForm.ComboBox1.ItemIndex+1);
|
||||||
|
|
||||||
|
if RxDBGridExportPdfSetupForm.CheckBox1.Checked then
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options + [poOutLine]
|
||||||
|
else
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options - [poOutLine];
|
||||||
|
|
||||||
|
if RxDBGridExportPdfSetupForm.CheckBox2.Checked then
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options + [poCompressText]
|
||||||
|
else
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options - [poCompressText];
|
||||||
|
|
||||||
|
if RxDBGridExportPdfSetupForm.CheckBox3.Checked then
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options + [poCompressFonts]
|
||||||
|
else
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options - [poCompressFonts];
|
||||||
|
|
||||||
|
if RxDBGridExportPdfSetupForm.CheckBox4.Checked then
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options + [poCompressImages]
|
||||||
|
else
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options - [poCompressImages];
|
||||||
|
|
||||||
|
if RxDBGridExportPdfSetupForm.CheckBox5.Checked then
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options + [poUseRawJPEG]
|
||||||
|
else
|
||||||
|
FPdfOptions.Options:=FPdfOptions.Options - [poUseRawJPEG];
|
||||||
|
|
||||||
end;
|
end;
|
||||||
RxDBGridExportPdfSetupForm.Free;
|
RxDBGridExportPdfSetupForm.Free;
|
||||||
end;
|
end;
|
||||||
@ -1015,6 +1099,7 @@ begin
|
|||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
FPageMargin:=TRxPageMargin.Create;
|
FPageMargin:=TRxPageMargin.Create;
|
||||||
FPdfOptions:=TPdfExportOptions.Create(Self);
|
FPdfOptions:=TPdfExportOptions.Create(Self);
|
||||||
|
FTitleColor:=clSilver;
|
||||||
|
|
||||||
FCaption:=sToolsExportPDF;
|
FCaption:=sToolsExportPDF;
|
||||||
FOpenAfterExport:=false;
|
FOpenAfterExport:=false;
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
|
object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
|
||||||
Left = 544
|
Left = 544
|
||||||
Height = 254
|
Height = 345
|
||||||
Top = 387
|
Top = 387
|
||||||
Width = 518
|
Width = 522
|
||||||
Caption = 'Export params'
|
Caption = 'Export params'
|
||||||
ClientHeight = 254
|
ClientHeight = 345
|
||||||
ClientWidth = 518
|
ClientWidth = 522
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '1.7'
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
@ -29,7 +30,7 @@ object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
|
|||||||
Left = 12
|
Left = 12
|
||||||
Height = 37
|
Height = 37
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 500
|
Width = 504
|
||||||
Filter = 'All files (*.*)|*.*|LibreOffice/OpenOffice (*.ods)|*.ods|Excell 97-2003|*.xls|Excell 2007-2013|*.xlxs'
|
Filter = 'All files (*.*)|*.*|LibreOffice/OpenOffice (*.ods)|*.ods|Excell 97-2003|*.xls|Excell 2007-2013|*.xlxs'
|
||||||
FilterIndex = 0
|
FilterIndex = 0
|
||||||
HideDirectories = False
|
HideDirectories = False
|
||||||
@ -38,75 +39,14 @@ object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
|
Spacing = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object cbOpenAfterExport: TCheckBox
|
|
||||||
AnchorSideLeft.Control = Owner
|
|
||||||
AnchorSideTop.Control = FileNameEdit1
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 6
|
|
||||||
Height = 24
|
|
||||||
Top = 75
|
|
||||||
Width = 141
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
Caption = 'Open after export'
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
object cbExportColumnHeader: TCheckBox
|
|
||||||
AnchorSideLeft.Control = Owner
|
|
||||||
AnchorSideTop.Control = cbOpenAfterExport
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 6
|
|
||||||
Height = 24
|
|
||||||
Top = 105
|
|
||||||
Width = 167
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
Caption = 'Export column header'
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
|
||||||
object cbExportColumnFooter: TCheckBox
|
|
||||||
AnchorSideLeft.Control = Owner
|
|
||||||
AnchorSideTop.Control = cbExportColumnHeader
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 6
|
|
||||||
Height = 24
|
|
||||||
Top = 135
|
|
||||||
Width = 162
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
Caption = 'Export column footer'
|
|
||||||
TabOrder = 3
|
|
||||||
end
|
|
||||||
object cbExportCellColors: TCheckBox
|
|
||||||
AnchorSideLeft.Control = Owner
|
|
||||||
AnchorSideTop.Control = cbExportColumnFooter
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 6
|
|
||||||
Height = 24
|
|
||||||
Top = 165
|
|
||||||
Width = 138
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
Caption = 'Export cell colors'
|
|
||||||
Enabled = False
|
|
||||||
TabOrder = 4
|
|
||||||
end
|
|
||||||
object cbOverwriteExisting: TCheckBox
|
|
||||||
AnchorSideLeft.Control = Label4
|
|
||||||
AnchorSideTop.Control = FileNameEdit1
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 265
|
|
||||||
Height = 24
|
|
||||||
Top = 75
|
|
||||||
Width = 168
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
Caption = 'Overwrite existing file'
|
|
||||||
Enabled = False
|
|
||||||
TabOrder = 5
|
|
||||||
end
|
|
||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 46
|
Height = 46
|
||||||
Top = 202
|
Top = 293
|
||||||
Width = 506
|
Width = 510
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
OKButton.DefaultCaption = True
|
OKButton.DefaultCaption = True
|
||||||
HelpButton.Name = 'HelpButton'
|
HelpButton.Name = 'HelpButton'
|
||||||
@ -115,17 +55,269 @@ object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
|
|||||||
CloseButton.DefaultCaption = True
|
CloseButton.DefaultCaption = True
|
||||||
CancelButton.Name = 'CancelButton'
|
CancelButton.Name = 'CancelButton'
|
||||||
CancelButton.DefaultCaption = True
|
CancelButton.DefaultCaption = True
|
||||||
TabOrder = 6
|
TabOrder = 1
|
||||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object PageControl1: TPageControl
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideTop.Control = FileNameEdit1
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 259
|
AnchorSideRight.Control = Owner
|
||||||
Height = 1
|
AnchorSideRight.Side = asrBottom
|
||||||
Top = 0
|
AnchorSideBottom.Control = ButtonPanel1
|
||||||
Width = 1
|
Left = 6
|
||||||
ParentColor = False
|
Height = 212
|
||||||
|
Top = 75
|
||||||
|
Width = 510
|
||||||
|
ActivePage = TabSheet1
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
TabIndex = 0
|
||||||
|
TabOrder = 2
|
||||||
|
object TabSheet1: TTabSheet
|
||||||
|
Caption = 'Global'
|
||||||
|
ClientHeight = 178
|
||||||
|
ClientWidth = 500
|
||||||
|
object cbOpenAfterExport: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideTop.Control = TabSheet1
|
||||||
|
Left = 8
|
||||||
|
Height = 24
|
||||||
|
Top = 6
|
||||||
|
Width = 141
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Open after export'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object cbExportColumnHeader: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideTop.Control = cbOpenAfterExport
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 36
|
||||||
|
Width = 167
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Export column header'
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object cbExportColumnFooter: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideTop.Control = cbExportColumnHeader
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 66
|
||||||
|
Width = 162
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Export column footer'
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object cbExportCellColors: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideTop.Control = cbExportColumnFooter
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 96
|
||||||
|
Width = 138
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Export cell colors'
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object cbOverwriteExisting: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Label4
|
||||||
|
AnchorSideTop.Control = TabSheet1
|
||||||
|
Left = 256
|
||||||
|
Height = 24
|
||||||
|
Top = 6
|
||||||
|
Width = 168
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Overwrite existing file'
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
AnchorSideLeft.Control = TabSheet1
|
||||||
|
AnchorSideLeft.Side = asrCenter
|
||||||
|
AnchorSideTop.Control = TabSheet1
|
||||||
|
Left = 250
|
||||||
|
Height = 1
|
||||||
|
Top = 0
|
||||||
|
Width = 1
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object CheckBox6: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Label4
|
||||||
|
AnchorSideTop.Control = cbOverwriteExisting
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 256
|
||||||
|
Height = 24
|
||||||
|
Top = 36
|
||||||
|
Width = 117
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Export images'
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
AnchorSideLeft.Control = Label4
|
||||||
|
AnchorSideTop.Control = CheckBox6
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 256
|
||||||
|
Height = 20
|
||||||
|
Top = 66
|
||||||
|
Width = 64
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Title color'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object ColorBox1: TColorBox
|
||||||
|
AnchorSideLeft.Control = Label5
|
||||||
|
AnchorSideTop.Control = Label5
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = TabSheet1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 262
|
||||||
|
Height = 36
|
||||||
|
Top = 92
|
||||||
|
Width = 232
|
||||||
|
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames, cbCustomColors]
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
ItemHeight = 0
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object TabSheet2: TTabSheet
|
||||||
|
Caption = 'PDF Options'
|
||||||
|
ClientHeight = 178
|
||||||
|
ClientWidth = 500
|
||||||
|
object Label2: TLabel
|
||||||
|
AnchorSideLeft.Control = Label3
|
||||||
|
AnchorSideTop.Control = TabSheet2
|
||||||
|
Left = 256
|
||||||
|
Height = 20
|
||||||
|
Top = 6
|
||||||
|
Width = 70
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Paper type'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object ComboBox1: TComboBox
|
||||||
|
AnchorSideLeft.Control = Label2
|
||||||
|
AnchorSideTop.Control = Label2
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = TabSheet2
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 262
|
||||||
|
Height = 36
|
||||||
|
Top = 32
|
||||||
|
Width = 232
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
ItemHeight = 0
|
||||||
|
Style = csDropDownList
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object RadioGroup1: TRadioGroup
|
||||||
|
AnchorSideLeft.Control = Label4
|
||||||
|
AnchorSideTop.Control = ComboBox1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = TabSheet2
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 265
|
||||||
|
Height = 69
|
||||||
|
Top = 74
|
||||||
|
Width = 229
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoFill = True
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Orientation'
|
||||||
|
ChildSizing.LeftRightSpacing = 6
|
||||||
|
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||||
|
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||||
|
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||||
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
|
ChildSizing.ControlsPerLine = 1
|
||||||
|
ClientHeight = 48
|
||||||
|
ClientWidth = 227
|
||||||
|
Items.Strings = (
|
||||||
|
'Portrait'
|
||||||
|
'Landscape'
|
||||||
|
)
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
AnchorSideLeft.Control = TabSheet2
|
||||||
|
AnchorSideLeft.Side = asrCenter
|
||||||
|
AnchorSideTop.Control = TabSheet2
|
||||||
|
Left = 250
|
||||||
|
Height = 1
|
||||||
|
Top = 0
|
||||||
|
Width = 1
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
AnchorSideLeft.Control = TabSheet2
|
||||||
|
AnchorSideTop.Control = TabSheet2
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 6
|
||||||
|
Width = 77
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Out line'
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object CheckBox2: TCheckBox
|
||||||
|
AnchorSideLeft.Control = TabSheet2
|
||||||
|
AnchorSideTop.Control = CheckBox1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 36
|
||||||
|
Width = 121
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Compress text'
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object CheckBox3: TCheckBox
|
||||||
|
AnchorSideLeft.Control = TabSheet2
|
||||||
|
AnchorSideTop.Control = CheckBox2
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 66
|
||||||
|
Width = 128
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Compress fonts'
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object CheckBox4: TCheckBox
|
||||||
|
AnchorSideLeft.Control = TabSheet2
|
||||||
|
AnchorSideTop.Control = CheckBox3
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 96
|
||||||
|
Width = 140
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Compress images'
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object CheckBox5: TCheckBox
|
||||||
|
AnchorSideLeft.Control = TabSheet2
|
||||||
|
AnchorSideTop.Control = CheckBox4
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 126
|
||||||
|
Width = 116
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Use raw JPEG'
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -37,7 +37,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||||
EditBtn, ButtonPanel;
|
EditBtn, ButtonPanel, ExtCtrls, ComCtrls, ColorBox, fpPDF;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -50,9 +50,24 @@ type
|
|||||||
cbExportColumnHeader: TCheckBox;
|
cbExportColumnHeader: TCheckBox;
|
||||||
cbOpenAfterExport: TCheckBox;
|
cbOpenAfterExport: TCheckBox;
|
||||||
cbOverwriteExisting: TCheckBox;
|
cbOverwriteExisting: TCheckBox;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
CheckBox2: TCheckBox;
|
||||||
|
CheckBox3: TCheckBox;
|
||||||
|
CheckBox4: TCheckBox;
|
||||||
|
CheckBox5: TCheckBox;
|
||||||
|
CheckBox6: TCheckBox;
|
||||||
|
ColorBox1: TColorBox;
|
||||||
|
ComboBox1: TComboBox;
|
||||||
FileNameEdit1: TFileNameEdit;
|
FileNameEdit1: TFileNameEdit;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
Label4: TLabel;
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
PageControl1: TPageControl;
|
||||||
|
RadioGroup1: TRadioGroup;
|
||||||
|
TabSheet1: TTabSheet;
|
||||||
|
TabSheet2: TTabSheet;
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ private declarations }
|
{ private declarations }
|
||||||
@ -63,6 +78,21 @@ type
|
|||||||
var
|
var
|
||||||
RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm;
|
RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm;
|
||||||
|
|
||||||
|
const
|
||||||
|
pdfPaperNames : array [TPDFPaperType] of string =
|
||||||
|
('Custom', //ptCustom
|
||||||
|
'A4', //ptA4
|
||||||
|
'A5', //ptA5
|
||||||
|
'Letter', // ptLetter
|
||||||
|
'Legal', // ptLegal
|
||||||
|
'Executive', // ptExecutive
|
||||||
|
'Comm10', // ptComm10
|
||||||
|
'Monarch', // ptMonarch
|
||||||
|
'DL', // ptDL
|
||||||
|
'C5', // ptC5
|
||||||
|
'B5' // ptB5
|
||||||
|
);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses rxdconst;
|
uses rxdconst;
|
||||||
|
|
||||||
@ -71,7 +101,11 @@ uses rxdconst;
|
|||||||
{ TRxDBGridExportPdfSetupForm }
|
{ TRxDBGridExportPdfSetupForm }
|
||||||
|
|
||||||
procedure TRxDBGridExportPdfSetupForm.FormCreate(Sender: TObject);
|
procedure TRxDBGridExportPdfSetupForm.FormCreate(Sender: TObject);
|
||||||
|
var
|
||||||
|
c: TPDFPaperType;
|
||||||
begin
|
begin
|
||||||
|
PageControl1.ActivePageIndex:=0;
|
||||||
|
|
||||||
Caption:=sExportParams;
|
Caption:=sExportParams;
|
||||||
Label1.Caption:=sExportFileName;
|
Label1.Caption:=sExportFileName;
|
||||||
//Label3.Caption:=sPageName;
|
//Label3.Caption:=sPageName;
|
||||||
@ -80,7 +114,15 @@ begin
|
|||||||
cbExportColumnFooter.Caption:=sExportColumnFooter;
|
cbExportColumnFooter.Caption:=sExportColumnFooter;
|
||||||
cbExportCellColors.Caption:=sExportCellColors;
|
cbExportCellColors.Caption:=sExportCellColors;
|
||||||
cbOverwriteExisting.Caption:=sOverwriteExisting;
|
cbOverwriteExisting.Caption:=sOverwriteExisting;
|
||||||
//cbExportFormula.Caption:=sExportFormula;
|
Label2.Caption:=sPaperType;
|
||||||
|
|
||||||
|
RadioGroup1.Caption:=sOrientation;
|
||||||
|
RadioGroup1.Items[0]:=sPortrait;
|
||||||
|
RadioGroup1.Items[1]:=sLandscape;
|
||||||
|
|
||||||
|
ComboBox1.Items.Clear;
|
||||||
|
for C:=ptA4 to High(TPDFPaperType) do
|
||||||
|
ComboBox1.Items.Add(pdfPaperNames[C]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -194,6 +194,7 @@ resourcestring
|
|||||||
sPortrait = 'Portrait';
|
sPortrait = 'Portrait';
|
||||||
sLandscape = 'Landscape';
|
sLandscape = 'Landscape';
|
||||||
sPrintOptions = 'Print options';
|
sPrintOptions = 'Print options';
|
||||||
|
sPaperType = 'Paper type';
|
||||||
|
|
||||||
sShowTitle = 'Show column title';
|
sShowTitle = 'Show column title';
|
||||||
sShowFooter = 'Show footer';
|
sShowFooter = 'Show footer';
|
||||||
|
Reference in New Issue
Block a user