mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 12:00:42 +02:00
LazReport: support for http links and print ranges on exported data to xls/xslx/odf formats, patch from Aleksey Lagunov
git-svn-id: trunk@51641 -
This commit is contained in:
parent
7dfb0bf8fc
commit
8b3dc8d735
@ -7,7 +7,7 @@
|
|||||||
<KeyWords Value=""/>
|
<KeyWords Value=""/>
|
||||||
<Comments Value=""/>
|
<Comments Value=""/>
|
||||||
<ReportCreateDate Value="2015-08-03 16:39:16"/>
|
<ReportCreateDate Value="2015-08-03 16:39:16"/>
|
||||||
<ReportLastChange Value="2015-08-06 10:43:35"/>
|
<ReportLastChange Value="2016-02-10 10:30:44"/>
|
||||||
<ReportVersionBuild Value=""/>
|
<ReportVersionBuild Value=""/>
|
||||||
<ReportVersionMajor Value=""/>
|
<ReportVersionMajor Value=""/>
|
||||||
<ReportVersionMinor Value=""/>
|
<ReportVersionMinor Value=""/>
|
||||||
@ -243,7 +243,7 @@
|
|||||||
<LineSpacing Value="2"/>
|
<LineSpacing Value="2"/>
|
||||||
</Data>
|
</Data>
|
||||||
<Tag Value=""/>
|
<Tag Value=""/>
|
||||||
<FURLInfo Value=""/>
|
<FURLInfo Value="http://www.lazarus-ide.org/"/>
|
||||||
<Font>
|
<Font>
|
||||||
<Name Value="helvetica [urw]"/>
|
<Name Value="helvetica [urw]"/>
|
||||||
<Size Value="10"/>
|
<Size Value="10"/>
|
||||||
|
@ -7,15 +7,15 @@ object Form1: TForm1
|
|||||||
ClientHeight = 267
|
ClientHeight = 267
|
||||||
ClientWidth = 490
|
ClientWidth = 490
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.5'
|
LCLVersion = '1.7'
|
||||||
object Button1: TButton
|
object Button1: TButton
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = Button2
|
AnchorSideRight.Control = Button2
|
||||||
Left = 75
|
Left = 93
|
||||||
Height = 20
|
Height = 32
|
||||||
Top = 123
|
Top = 117
|
||||||
Width = 112
|
Width = 100
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
@ -28,10 +28,10 @@ object Form1: TForm1
|
|||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 193
|
Left = 199
|
||||||
Height = 20
|
Height = 32
|
||||||
Top = 123
|
Top = 117
|
||||||
Width = 104
|
Width = 93
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Show report'
|
Caption = 'Show report'
|
||||||
OnClick = Button2Click
|
OnClick = Button2Click
|
||||||
@ -42,10 +42,10 @@ object Form1: TForm1
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 303
|
Left = 298
|
||||||
Height = 20
|
Height = 32
|
||||||
Top = 123
|
Top = 117
|
||||||
Width = 110
|
Width = 99
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
Caption = 'Export report'
|
Caption = 'Export report'
|
||||||
@ -57,10 +57,10 @@ object Form1: TForm1
|
|||||||
AnchorSideTop.Control = Button2
|
AnchorSideTop.Control = Button2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Button2
|
AnchorSideRight.Control = Button2
|
||||||
Left = 75
|
Left = 93
|
||||||
Height = 20
|
Height = 32
|
||||||
Top = 149
|
Top = 155
|
||||||
Width = 112
|
Width = 100
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -75,10 +75,10 @@ object Form1: TForm1
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = Button2
|
AnchorSideTop.Control = Button2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 303
|
Left = 298
|
||||||
Height = 20
|
Height = 32
|
||||||
Top = 149
|
Top = 155
|
||||||
Width = 110
|
Width = 99
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -92,10 +92,10 @@ object Form1: TForm1
|
|||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = Button2
|
AnchorSideTop.Control = Button2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 193
|
Left = 199
|
||||||
Height = 20
|
Height = 32
|
||||||
Top = 149
|
Top = 155
|
||||||
Width = 104
|
Width = 93
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Show report'
|
Caption = 'Show report'
|
||||||
@ -107,9 +107,9 @@ object Form1: TForm1
|
|||||||
AnchorSideBottom.Control = Button1
|
AnchorSideBottom.Control = Button1
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 16
|
Height = 20
|
||||||
Top = 127
|
Top = 129
|
||||||
Width = 54
|
Width = 55
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
Caption = 'Demo 1:'
|
Caption = 'Demo 1:'
|
||||||
@ -120,9 +120,9 @@ object Form1: TForm1
|
|||||||
AnchorSideBottom.Control = Button3
|
AnchorSideBottom.Control = Button3
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 16
|
Height = 20
|
||||||
Top = 153
|
Top = 167
|
||||||
Width = 54
|
Width = 55
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
Caption = 'Demo 2:'
|
Caption = 'Demo 2:'
|
||||||
@ -132,10 +132,10 @@ object Form1: TForm1
|
|||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
Left = 178
|
Left = 176
|
||||||
Height = 76
|
Height = 94
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 134
|
Width = 139
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'File format'
|
Caption = 'File format'
|
||||||
@ -146,8 +146,8 @@ object Form1: TForm1
|
|||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 1
|
ChildSizing.ControlsPerLine = 1
|
||||||
ClientHeight = 54
|
ClientHeight = 72
|
||||||
ClientWidth = 126
|
ClientWidth = 135
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'Export to ODS'
|
'Export to ODS'
|
||||||
@ -174,7 +174,8 @@ object Form1: TForm1
|
|||||||
OpenAfterExport = True
|
OpenAfterExport = True
|
||||||
DeleteEmptyRow = False
|
DeleteEmptyRow = False
|
||||||
MergeCell = True
|
MergeCell = True
|
||||||
ShowSetupForm = False
|
ShowSetupForm = True
|
||||||
|
ExportURL = True
|
||||||
left = 232
|
left = 232
|
||||||
top = 24
|
top = 24
|
||||||
end
|
end
|
||||||
|
@ -52,6 +52,10 @@ msgstr ""
|
|||||||
msgid "Export pictures"
|
msgid "Export pictures"
|
||||||
msgstr "Bilder exportieren"
|
msgstr "Bilder exportieren"
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexportprintrange
|
||||||
|
msgid "Export print range"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sexportsettings
|
#: le_e_spreadsheet_consts.sexportsettings
|
||||||
msgid "Export settings"
|
msgid "Export settings"
|
||||||
msgstr "Exporteinstellungen"
|
msgstr "Exporteinstellungen"
|
||||||
@ -60,6 +64,10 @@ msgstr "Exporteinstellungen"
|
|||||||
msgid "Export to spreadsheet"
|
msgid "Export to spreadsheet"
|
||||||
msgstr "In Tabellenkalkulation exportieren"
|
msgstr "In Tabellenkalkulation exportieren"
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexporturl
|
||||||
|
msgid "Export URL"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sgeneral
|
#: le_e_spreadsheet_consts.sgeneral
|
||||||
msgid "General"
|
msgid "General"
|
||||||
msgstr "Allgemein"
|
msgstr "Allgemein"
|
||||||
@ -99,3 +107,4 @@ msgstr "Seiten:"
|
|||||||
#: le_e_spreadsheet_consts.sreportpagename
|
#: le_e_spreadsheet_consts.sreportpagename
|
||||||
msgid "Report"
|
msgid "Report"
|
||||||
msgstr "Report"
|
msgstr "Report"
|
||||||
|
|
||||||
|
@ -51,6 +51,10 @@ msgstr ""
|
|||||||
msgid "Export pictures"
|
msgid "Export pictures"
|
||||||
msgstr "Exporter les images"
|
msgstr "Exporter les images"
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexportprintrange
|
||||||
|
msgid "Export print range"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sexportsettings
|
#: le_e_spreadsheet_consts.sexportsettings
|
||||||
msgid "Export settings"
|
msgid "Export settings"
|
||||||
msgstr "Exporter les paramètres"
|
msgstr "Exporter les paramètres"
|
||||||
@ -59,6 +63,10 @@ msgstr "Exporter les paramètres"
|
|||||||
msgid "Export to spreadsheet"
|
msgid "Export to spreadsheet"
|
||||||
msgstr "Exporter vers la feuille de calcul"
|
msgstr "Exporter vers la feuille de calcul"
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexporturl
|
||||||
|
msgid "Export URL"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sgeneral
|
#: le_e_spreadsheet_consts.sgeneral
|
||||||
msgid "General"
|
msgid "General"
|
||||||
msgstr "Général"
|
msgstr "Général"
|
||||||
|
@ -51,6 +51,10 @@ msgstr ""
|
|||||||
msgid "Export pictures"
|
msgid "Export pictures"
|
||||||
msgstr "Képek exportálása"
|
msgstr "Képek exportálása"
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexportprintrange
|
||||||
|
msgid "Export print range"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sexportsettings
|
#: le_e_spreadsheet_consts.sexportsettings
|
||||||
msgid "Export settings"
|
msgid "Export settings"
|
||||||
msgstr "Exportálás beállításai"
|
msgstr "Exportálás beállításai"
|
||||||
@ -59,6 +63,10 @@ msgstr "Exportálás beállításai"
|
|||||||
msgid "Export to spreadsheet"
|
msgid "Export to spreadsheet"
|
||||||
msgstr "Exportálás táblázatba"
|
msgstr "Exportálás táblázatba"
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexporturl
|
||||||
|
msgid "Export URL"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sgeneral
|
#: le_e_spreadsheet_consts.sgeneral
|
||||||
msgid "General"
|
msgid "General"
|
||||||
msgstr "Általános"
|
msgstr "Általános"
|
||||||
|
@ -39,6 +39,10 @@ msgstr ""
|
|||||||
msgid "Export pictures"
|
msgid "Export pictures"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexportprintrange
|
||||||
|
msgid "Export print range"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sexportsettings
|
#: le_e_spreadsheet_consts.sexportsettings
|
||||||
msgid "Export settings"
|
msgid "Export settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -47,6 +51,10 @@ msgstr ""
|
|||||||
msgid "Export to spreadsheet"
|
msgid "Export to spreadsheet"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexporturl
|
||||||
|
msgid "Export URL"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sgeneral
|
#: le_e_spreadsheet_consts.sgeneral
|
||||||
msgid "General"
|
msgid "General"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -51,6 +51,10 @@ msgstr ""
|
|||||||
msgid "Export pictures"
|
msgid "Export pictures"
|
||||||
msgstr "Экспортировать изображения"
|
msgstr "Экспортировать изображения"
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexportprintrange
|
||||||
|
msgid "Export print range"
|
||||||
|
msgstr "Экспорт диапазона печати"
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sexportsettings
|
#: le_e_spreadsheet_consts.sexportsettings
|
||||||
msgid "Export settings"
|
msgid "Export settings"
|
||||||
msgstr "Параметры экспорта"
|
msgstr "Параметры экспорта"
|
||||||
@ -59,6 +63,10 @@ msgstr "Параметры экспорта"
|
|||||||
msgid "Export to spreadsheet"
|
msgid "Export to spreadsheet"
|
||||||
msgstr "Экспорт в электронную таблицу"
|
msgstr "Экспорт в электронную таблицу"
|
||||||
|
|
||||||
|
#: le_e_spreadsheet_consts.sexporturl
|
||||||
|
msgid "Export URL"
|
||||||
|
msgstr "Экспорт HTTP адресов"
|
||||||
|
|
||||||
#: le_e_spreadsheet_consts.sgeneral
|
#: le_e_spreadsheet_consts.sgeneral
|
||||||
msgid "General"
|
msgid "General"
|
||||||
msgstr "Общие"
|
msgstr "Общие"
|
||||||
|
@ -51,6 +51,8 @@ type
|
|||||||
FDataGroupingChunks: integer;
|
FDataGroupingChunks: integer;
|
||||||
FDeleteEmptyRow: boolean;
|
FDeleteEmptyRow: boolean;
|
||||||
FExportMatrix:TExportMatrix;
|
FExportMatrix:TExportMatrix;
|
||||||
|
FExportPrintRange: boolean;
|
||||||
|
FExportURL: boolean;
|
||||||
FMergeCell: boolean;
|
FMergeCell: boolean;
|
||||||
FOpenAfterExport: boolean;
|
FOpenAfterExport: boolean;
|
||||||
FWorkbook:TsWorkbook;
|
FWorkbook:TsWorkbook;
|
||||||
@ -63,6 +65,7 @@ type
|
|||||||
FTmpTextHeight: Double;
|
FTmpTextHeight: Double;
|
||||||
procedure ExportColWidth;
|
procedure ExportColWidth;
|
||||||
procedure ExportRowHight;
|
procedure ExportRowHight;
|
||||||
|
procedure DoExportPrintRange;
|
||||||
//procedure ExportData;
|
//procedure ExportData;
|
||||||
procedure ExportData1;
|
procedure ExportData1;
|
||||||
|
|
||||||
@ -94,11 +97,14 @@ type
|
|||||||
property OpenAfterExport:boolean read FOpenAfterExport write FOpenAfterExport;
|
property OpenAfterExport:boolean read FOpenAfterExport write FOpenAfterExport;
|
||||||
property DeleteEmptyRow:boolean read FDeleteEmptyRow write FDeleteEmptyRow;
|
property DeleteEmptyRow:boolean read FDeleteEmptyRow write FDeleteEmptyRow;
|
||||||
property MergeCell:boolean read FMergeCell write FMergeCell;
|
property MergeCell:boolean read FMergeCell write FMergeCell;
|
||||||
|
property ExportURL:boolean read FExportURL write FExportURL;
|
||||||
|
property ExportPrintRange:boolean read FExportPrintRange write FExportPrintRange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses LCLType, le_e_spreadsheet_params, fpsTypes, fpsutils, LazUTF8Classes, Forms, Controls,
|
uses LCLType, le_e_spreadsheet_params, fpsTypes, fpsutils, fpsAllFormats,
|
||||||
LCLIntf, LazFileUtils, le_e_spreadsheet_consts, lrSpreadSheetExp, math;
|
LazUTF8Classes, Forms, Controls, LCLIntf, LazFileUtils, le_e_spreadsheet_consts,
|
||||||
|
lrSpreadSheetExp, math;
|
||||||
|
|
||||||
const
|
const
|
||||||
ssAligns : array [TAlignment] of TsHorAlignment = (haLeft, haRight, haCenter);
|
ssAligns : array [TAlignment] of TsHorAlignment = (haLeft, haRight, haCenter);
|
||||||
@ -124,6 +130,56 @@ begin
|
|||||||
FWorksheet.WriteRowHeight(i, FExportMatrix.RowHiht[i] / FTmpTextHeight);
|
FWorksheet.WriteRowHeight(i, FExportMatrix.RowHiht[i] / FTmpTextHeight);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TlrSpreadSheetExportFilter.DoExportPrintRange;
|
||||||
|
var
|
||||||
|
X1, Y1, X2, Y2, R, C: Integer;
|
||||||
|
Row: TExportRow;
|
||||||
|
Cel: TExportObject;
|
||||||
|
begin
|
||||||
|
X1:=MaxInt;
|
||||||
|
Y1:=MaxInt;
|
||||||
|
X2:=-1;
|
||||||
|
Y2:=-1;
|
||||||
|
for R:=0 to FExportMatrix.Rows.Count-1 do
|
||||||
|
begin
|
||||||
|
Row:=TExportRow(FExportMatrix.Rows[R]);
|
||||||
|
for C:=0 to Row.Cells.Count-1 do
|
||||||
|
begin
|
||||||
|
Cel:=TExportObject(Row.Cells[C]);
|
||||||
|
if Assigned(Cel) then
|
||||||
|
begin
|
||||||
|
if Cel.Col < X1 then
|
||||||
|
X1:=Cel.Col;
|
||||||
|
if Cel.Row < Y1 then
|
||||||
|
Y1:=Cel.Row;
|
||||||
|
|
||||||
|
//MERG!
|
||||||
|
if (Cel.Col < Cel.MergedCol) then
|
||||||
|
begin
|
||||||
|
if Cel.MergedCol > X2 then
|
||||||
|
X2:=Cel.MergedCol;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if Cel.Col > X2 then
|
||||||
|
X2:=Cel.Col;
|
||||||
|
|
||||||
|
|
||||||
|
if (Cel.Row < Cel.MergedRow) then
|
||||||
|
begin
|
||||||
|
if Cel.MergedRow > Y2 then
|
||||||
|
Y2:=Cel.MergedRow;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if Cel.Row > Y2 then
|
||||||
|
Y2:=Cel.Row;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if (X1>0) and (Y1>0) and (X2>X1) and (Y2>Y1) then
|
||||||
|
FWorksheet.AddPrintRange(Y1, X1, Y2, X2);
|
||||||
|
end;
|
||||||
|
|
||||||
function sftofs(AFont:TFont):TsFontStyles;
|
function sftofs(AFont:TFont):TsFontStyles;
|
||||||
begin
|
begin
|
||||||
Result:=[];
|
Result:=[];
|
||||||
@ -263,6 +319,9 @@ begin
|
|||||||
|
|
||||||
if scFrm <> [] then
|
if scFrm <> [] then
|
||||||
FWorksheet.WriteBorders(Y, X, scFrm);
|
FWorksheet.WriteBorders(Y, X, scFrm);
|
||||||
|
|
||||||
|
if FExportURL and (Cel.URLInfo <> '') then
|
||||||
|
FWorksheet.WriteHyperlink(Y, X, Cel.URLInfo, Cel.URLInfo);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -279,10 +338,13 @@ begin
|
|||||||
S:=sReportPageName;
|
S:=sReportPageName;
|
||||||
|
|
||||||
FWorksheet := FWorkbook.AddWorksheet(S);
|
FWorksheet := FWorkbook.AddWorksheet(S);
|
||||||
|
|
||||||
ExportColWidth;
|
ExportColWidth;
|
||||||
ExportRowHight;
|
ExportRowHight;
|
||||||
//ExportData;
|
|
||||||
ExportData1;
|
ExportData1;
|
||||||
|
if FExportPrintRange then
|
||||||
|
DoExportPrintRange;
|
||||||
|
|
||||||
FWorksheet:=nil;
|
FWorksheet:=nil;
|
||||||
FExportMatrix.Clear;
|
FExportMatrix.Clear;
|
||||||
end;
|
end;
|
||||||
@ -301,6 +363,8 @@ begin
|
|||||||
leSpreadsheetParamsForm.CheckBox4.Checked:=FOpenAfterExport;
|
leSpreadsheetParamsForm.CheckBox4.Checked:=FOpenAfterExport;
|
||||||
leSpreadsheetParamsForm.CheckBox2.Checked:=FMergeCell;
|
leSpreadsheetParamsForm.CheckBox2.Checked:=FMergeCell;
|
||||||
leSpreadsheetParamsForm.CheckBox6.Checked:=FDeleteEmptyRow;
|
leSpreadsheetParamsForm.CheckBox6.Checked:=FDeleteEmptyRow;
|
||||||
|
leSpreadsheetParamsForm.CheckBox7.Checked:=FExportURL;
|
||||||
|
leSpreadsheetParamsForm.CheckBox8.Checked:=FExportPrintRange;
|
||||||
|
|
||||||
|
|
||||||
Result:=leSpreadsheetParamsForm.ShowModal = mrOk;
|
Result:=leSpreadsheetParamsForm.ShowModal = mrOk;
|
||||||
@ -316,9 +380,11 @@ begin
|
|||||||
FDataGrouping:=ldgChunks;
|
FDataGrouping:=ldgChunks;
|
||||||
FDataGroupingChunks:=leSpreadsheetParamsForm.SpinEdit1.Value;
|
FDataGroupingChunks:=leSpreadsheetParamsForm.SpinEdit1.Value;
|
||||||
end;
|
end;
|
||||||
FOpenAfterExport:=leSpreadsheetParamsForm.CheckBox4.Checked;
|
FOpenAfterExport:= leSpreadsheetParamsForm.CheckBox4.Checked;
|
||||||
FMergeCell := leSpreadsheetParamsForm.CheckBox2.Checked;
|
FMergeCell := leSpreadsheetParamsForm.CheckBox2.Checked;
|
||||||
FDeleteEmptyRow := leSpreadsheetParamsForm.CheckBox6.Checked;
|
FDeleteEmptyRow := leSpreadsheetParamsForm.CheckBox6.Checked;
|
||||||
|
FExportURL := leSpreadsheetParamsForm.CheckBox7.Checked;
|
||||||
|
FExportPrintRange:=leSpreadsheetParamsForm.CheckBox8.Checked;
|
||||||
|
|
||||||
FExportMatrix.MergeCell:=FMergeCell;
|
FExportMatrix.MergeCell:=FMergeCell;
|
||||||
FExportMatrix.DeleteEmptyRow:=FDeleteEmptyRow;
|
FExportMatrix.DeleteEmptyRow:=FDeleteEmptyRow;
|
||||||
@ -344,6 +410,8 @@ begin
|
|||||||
FOpenAfterExport:=lrSpreadSheetExportComponent.OpenAfterExport;
|
FOpenAfterExport:=lrSpreadSheetExportComponent.OpenAfterExport;
|
||||||
FMergeCell:=lrSpreadSheetExportComponent.MergeCell;
|
FMergeCell:=lrSpreadSheetExportComponent.MergeCell;
|
||||||
FDeleteEmptyRow:=lrSpreadSheetExportComponent.DeleteEmptyRow;
|
FDeleteEmptyRow:=lrSpreadSheetExportComponent.DeleteEmptyRow;
|
||||||
|
FExportURL:=lrSpreadSheetExportComponent.ExportURL;
|
||||||
|
FExportPrintRange:=lrSpreadSheetExportComponent.ExportPrintRange;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -352,6 +420,8 @@ begin
|
|||||||
FOpenAfterExport:=true;
|
FOpenAfterExport:=true;
|
||||||
FMergeCell:=true;
|
FMergeCell:=true;
|
||||||
FDeleteEmptyRow:=false;
|
FDeleteEmptyRow:=false;
|
||||||
|
FExportURL:=false;
|
||||||
|
FExportPrintRange:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FExportMatrix:=TExportMatrix.Create;
|
FExportMatrix:=TExportMatrix.Create;
|
||||||
@ -401,6 +471,26 @@ begin
|
|||||||
FCurPage:=0;
|
FCurPage:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function GetFormatFromFileName(const AFileName: TFileName;
|
||||||
|
out SheetType: TsSpreadsheetFormat): Boolean;
|
||||||
|
var
|
||||||
|
suffix: String;
|
||||||
|
begin
|
||||||
|
Result := true;
|
||||||
|
suffix := Lowercase(ExtractFileExt(AFileName));
|
||||||
|
case suffix of
|
||||||
|
STR_EXCEL_EXTENSION : SheetType := sfExcel8;
|
||||||
|
STR_OOXML_EXCEL_EXTENSION : SheetType := sfOOXML;
|
||||||
|
STR_OPENDOCUMENT_CALC_EXTENSION : SheetType := sfOpenDocument;
|
||||||
|
STR_COMMA_SEPARATED_EXTENSION : SheetType := sfCSV;
|
||||||
|
STR_HTML_EXTENSION, '.htm' : SheetType := sfHTML;
|
||||||
|
STR_WIKITABLE_PIPES_EXTENSION : SheetType := sfWikiTable_Pipes;
|
||||||
|
STR_WIKITABLE_WIKIMEDIA_EXTENSION : SheetType := sfWikiTable_WikiMedia;
|
||||||
|
else Result := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TlrSpreadSheetExportFilter.OnEndDoc;
|
procedure TlrSpreadSheetExportFilter.OnEndDoc;
|
||||||
var
|
var
|
||||||
S: String;
|
S: String;
|
||||||
|
@ -59,6 +59,8 @@ resourcestring
|
|||||||
sPages = 'Pages:';
|
sPages = 'Pages:';
|
||||||
sEnterPageNumbers = 'Enter page numbers and/or page ranges,'#13'separated by commas. For example, 1,3,5-12';
|
sEnterPageNumbers = 'Enter page numbers and/or page ranges,'#13'separated by commas. For example, 1,3,5-12';
|
||||||
sExportPictures = 'Export pictures';
|
sExportPictures = 'Export pictures';
|
||||||
|
sExportURL = 'Export URL';
|
||||||
|
sExportPrintRange = 'Export print range';
|
||||||
sMergeCells = 'Merge cells';
|
sMergeCells = 'Merge cells';
|
||||||
sPageBreaks = 'Page breaks';
|
sPageBreaks = 'Page breaks';
|
||||||
sDeleteEmptyRows = 'Delete empty rows';
|
sDeleteEmptyRows = 'Delete empty rows';
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
||||||
Left = 725
|
Left = 725
|
||||||
Height = 326
|
Height = 369
|
||||||
Top = 260
|
Top = 260
|
||||||
Width = 350
|
Width = 406
|
||||||
Caption = 'Export to spreadsheet'
|
Caption = 'Export to spreadsheet'
|
||||||
ClientHeight = 326
|
ClientHeight = 369
|
||||||
ClientWidth = 350
|
ClientWidth = 406
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.5'
|
LCLVersion = '1.7'
|
||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 42
|
Height = 42
|
||||||
Top = 278
|
Top = 321
|
||||||
Width = 338
|
Width = 394
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
OKButton.DefaultCaption = True
|
OKButton.DefaultCaption = True
|
||||||
HelpButton.Name = 'HelpButton'
|
HelpButton.Name = 'HelpButton'
|
||||||
@ -27,37 +27,37 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
end
|
end
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 272
|
Height = 315
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 350
|
Width = 406
|
||||||
ActivePage = TabSheet2
|
ActivePage = TabSheet2
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabIndex = 1
|
TabIndex = 1
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Caption = 'General'
|
Caption = 'General'
|
||||||
ClientHeight = 233
|
ClientHeight = 277
|
||||||
ClientWidth = 344
|
ClientWidth = 400
|
||||||
object GroupBox1: TGroupBox
|
object GroupBox1: TGroupBox
|
||||||
AnchorSideLeft.Control = TabSheet1
|
AnchorSideLeft.Control = TabSheet1
|
||||||
AnchorSideRight.Control = TabSheet1
|
AnchorSideRight.Control = TabSheet1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 176
|
Height = 170
|
||||||
Top = 208
|
Top = 192
|
||||||
Width = 344
|
Width = 400
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Page range'
|
Caption = 'Page range'
|
||||||
ClientHeight = 153
|
ClientHeight = 148
|
||||||
ClientWidth = 340
|
ClientWidth = 396
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Visible = False
|
Visible = False
|
||||||
object RadioButton1: TRadioButton
|
object RadioButton1: TRadioButton
|
||||||
AnchorSideLeft.Control = GroupBox1
|
AnchorSideLeft.Control = GroupBox1
|
||||||
AnchorSideTop.Control = GroupBox1
|
AnchorSideTop.Control = GroupBox1
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 76
|
Width = 76
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -71,8 +71,8 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideTop.Control = RadioButton1
|
AnchorSideTop.Control = RadioButton1
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 37
|
Top = 36
|
||||||
Width = 109
|
Width = 109
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Current page'
|
Caption = 'Current page'
|
||||||
@ -83,8 +83,8 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideTop.Control = RadioButton2
|
AnchorSideTop.Control = RadioButton2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 68
|
Top = 66
|
||||||
Width = 67
|
Width = 67
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Pages:'
|
Caption = 'Pages:'
|
||||||
@ -98,9 +98,9 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideRight.Control = GroupBox1
|
AnchorSideRight.Control = GroupBox1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 79
|
Left = 79
|
||||||
Height = 31
|
Height = 30
|
||||||
Top = 68
|
Top = 66
|
||||||
Width = 255
|
Width = 311
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@ -112,9 +112,9 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideRight.Control = GroupBox1
|
AnchorSideRight.Control = GroupBox1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 42
|
Height = 40
|
||||||
Top = 105
|
Top = 102
|
||||||
Width = 328
|
Width = 384
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Enter page numbers and/or page ranges,'#10'separated by commas. For example, 1,3,5-12'
|
Caption = 'Enter page numbers and/or page ranges,'#10'separated by commas. For example, 1,3,5-12'
|
||||||
@ -127,20 +127,20 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideRight.Control = TabSheet1
|
AnchorSideRight.Control = TabSheet1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 128
|
Height = 124
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 344
|
Width = 400
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Data grouping'
|
Caption = 'Data grouping'
|
||||||
ClientHeight = 105
|
ClientHeight = 102
|
||||||
ClientWidth = 340
|
ClientWidth = 396
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object RadioButton4: TRadioButton
|
object RadioButton4: TRadioButton
|
||||||
AnchorSideLeft.Control = GroupBox2
|
AnchorSideLeft.Control = GroupBox2
|
||||||
AnchorSideTop.Control = GroupBox2
|
AnchorSideTop.Control = GroupBox2
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 119
|
Width = 119
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -154,8 +154,8 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideTop.Control = RadioButton4
|
AnchorSideTop.Control = RadioButton4
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 37
|
Top = 36
|
||||||
Width = 119
|
Width = 119
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'All in one page'
|
Caption = 'All in one page'
|
||||||
@ -166,8 +166,8 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideTop.Control = RadioButton5
|
AnchorSideTop.Control = RadioButton5
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 68
|
Top = 66
|
||||||
Width = 228
|
Width = 228
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Chunks. Each chunk has (rows):'
|
Caption = 'Chunks. Each chunk has (rows):'
|
||||||
@ -182,9 +182,9 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideRight.Control = GroupBox2
|
AnchorSideRight.Control = GroupBox2
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 240
|
Left = 240
|
||||||
Height = 31
|
Height = 30
|
||||||
Top = 68
|
Top = 66
|
||||||
Width = 94
|
Width = 150
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
MaxValue = 655360
|
MaxValue = 655360
|
||||||
@ -199,8 +199,8 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideTop.Control = GroupBox2
|
AnchorSideTop.Control = GroupBox2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 134
|
Top = 130
|
||||||
Width = 141
|
Width = 141
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Open after export'
|
Caption = 'Open after export'
|
||||||
@ -211,9 +211,9 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideTop.Control = CheckBox4
|
AnchorSideTop.Control = CheckBox4
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 165
|
Top = 160
|
||||||
Width = 123
|
Width = 124
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Auto create file'
|
Caption = 'Auto create file'
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@ -222,14 +222,14 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
end
|
end
|
||||||
object TabSheet2: TTabSheet
|
object TabSheet2: TTabSheet
|
||||||
Caption = 'Export settings'
|
Caption = 'Export settings'
|
||||||
ClientHeight = 233
|
ClientHeight = 277
|
||||||
ClientWidth = 344
|
ClientWidth = 400
|
||||||
object CheckBox1: TCheckBox
|
object CheckBox1: TCheckBox
|
||||||
AnchorSideLeft.Control = TabSheet2
|
AnchorSideLeft.Control = TabSheet2
|
||||||
AnchorSideTop.Control = TabSheet2
|
AnchorSideTop.Control = TabSheet2
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 181
|
Top = 217
|
||||||
Width = 123
|
Width = 123
|
||||||
Anchors = [akLeft]
|
Anchors = [akLeft]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -241,7 +241,7 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideLeft.Control = TabSheet2
|
AnchorSideLeft.Control = TabSheet2
|
||||||
AnchorSideTop.Control = TabSheet2
|
AnchorSideTop.Control = TabSheet2
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 99
|
Width = 99
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -253,8 +253,8 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideTop.Control = CheckBox2
|
AnchorSideTop.Control = CheckBox2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 214
|
Top = 248
|
||||||
Width = 102
|
Width = 102
|
||||||
Anchors = [akLeft]
|
Anchors = [akLeft]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -267,13 +267,37 @@ object leSpreadsheetParamsForm: TleSpreadsheetParamsForm
|
|||||||
AnchorSideTop.Control = CheckBox2
|
AnchorSideTop.Control = CheckBox2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 24
|
||||||
Top = 37
|
Top = 36
|
||||||
Width = 150
|
Width = 150
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Delete empty rows'
|
Caption = 'Delete empty rows'
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
|
object CheckBox7: TCheckBox
|
||||||
|
AnchorSideLeft.Control = TabSheet2
|
||||||
|
AnchorSideTop.Control = CheckBox6
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 66
|
||||||
|
Width = 60
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'URL''s'
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object CheckBox8: TCheckBox
|
||||||
|
AnchorSideLeft.Control = TabSheet2
|
||||||
|
AnchorSideTop.Control = CheckBox7
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 96
|
||||||
|
Width = 141
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Export print range'
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -54,6 +54,8 @@ type
|
|||||||
CheckBox4: TCheckBox;
|
CheckBox4: TCheckBox;
|
||||||
CheckBox5: TCheckBox;
|
CheckBox5: TCheckBox;
|
||||||
CheckBox6: TCheckBox;
|
CheckBox6: TCheckBox;
|
||||||
|
CheckBox7: TCheckBox;
|
||||||
|
CheckBox8: TCheckBox;
|
||||||
Edit1: TEdit;
|
Edit1: TEdit;
|
||||||
GroupBox1: TGroupBox;
|
GroupBox1: TGroupBox;
|
||||||
GroupBox2: TGroupBox;
|
GroupBox2: TGroupBox;
|
||||||
@ -112,6 +114,8 @@ begin
|
|||||||
CheckBox2.Caption:=sMergeCells;
|
CheckBox2.Caption:=sMergeCells;
|
||||||
CheckBox3.Caption:=sPageBreaks;
|
CheckBox3.Caption:=sPageBreaks;
|
||||||
CheckBox6.Caption:=sDeleteEmptyRows;
|
CheckBox6.Caption:=sDeleteEmptyRows;
|
||||||
|
CheckBox7.Caption:=sExportURL;
|
||||||
|
CheckBox8.Caption:=sExportPrintRange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -62,6 +62,7 @@ type
|
|||||||
FHeight: integer;
|
FHeight: integer;
|
||||||
FLeft: integer;
|
FLeft: integer;
|
||||||
FTop: integer;
|
FTop: integer;
|
||||||
|
FURLInfo: string;
|
||||||
FWidht: integer;
|
FWidht: integer;
|
||||||
|
|
||||||
FObjType: integer;
|
FObjType: integer;
|
||||||
@ -97,6 +98,7 @@ type
|
|||||||
property Angle:byte read FAngle;
|
property Angle:byte read FAngle;
|
||||||
property Layout : TTextLayout read FLayout;
|
property Layout : TTextLayout read FLayout;
|
||||||
property WordWrap:boolean read FWordWrap;
|
property WordWrap:boolean read FWordWrap;
|
||||||
|
property URLInfo: string read FURLInfo write FURLInfo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TExportRows }
|
{ TExportRows }
|
||||||
@ -248,6 +250,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TExportObject.Create(AObj: TfrView);
|
constructor TExportObject.Create(AObj: TfrView);
|
||||||
|
var
|
||||||
|
S: String;
|
||||||
begin
|
begin
|
||||||
Inherited Create;
|
Inherited Create;
|
||||||
|
|
||||||
@ -277,6 +281,10 @@ begin
|
|||||||
FAngle:=TfrMemoView(AObj).Angle;
|
FAngle:=TfrMemoView(AObj).Angle;
|
||||||
FLayout:=TfrMemoView(AObj).Layout;
|
FLayout:=TfrMemoView(AObj).Layout;
|
||||||
FWordWrap:=TfrMemoView(AObj).WordWrap;
|
FWordWrap:=TfrMemoView(AObj).WordWrap;
|
||||||
|
//http://www.lazarus-ide.org/
|
||||||
|
S:=UpperCase(TfrMemoView(AObj).URLInfo);
|
||||||
|
if (S <> '') and ((Copy(S, 1, 7) = 'HTTP://') or (Copy(S, 1, 8) = 'HTTPS://')) then
|
||||||
|
URLInfo:=TfrMemoView(AObj).URLInfo;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if AObj is TfrPictureView then
|
if AObj is TfrPictureView then
|
||||||
|
@ -50,6 +50,8 @@ type
|
|||||||
FDataGrouping: TlreDataGrouping;
|
FDataGrouping: TlreDataGrouping;
|
||||||
FDataGroupingChunks: integer;
|
FDataGroupingChunks: integer;
|
||||||
FDeleteEmptyRow: boolean;
|
FDeleteEmptyRow: boolean;
|
||||||
|
FExportPrintRange: boolean;
|
||||||
|
FExportURL: boolean;
|
||||||
FMergeCell: boolean;
|
FMergeCell: boolean;
|
||||||
FOpenAfterExport: boolean;
|
FOpenAfterExport: boolean;
|
||||||
FShowSetupForm: boolean;
|
FShowSetupForm: boolean;
|
||||||
@ -66,6 +68,8 @@ type
|
|||||||
property DeleteEmptyRow:boolean read FDeleteEmptyRow write FDeleteEmptyRow;
|
property DeleteEmptyRow:boolean read FDeleteEmptyRow write FDeleteEmptyRow;
|
||||||
property MergeCell:boolean read FMergeCell write FMergeCell;
|
property MergeCell:boolean read FMergeCell write FMergeCell;
|
||||||
property ShowSetupForm:boolean read FShowSetupForm write FShowSetupForm;
|
property ShowSetupForm:boolean read FShowSetupForm write FShowSetupForm;
|
||||||
|
property ExportURL:boolean read FExportURL write FExportURL default false;
|
||||||
|
property ExportPrintRange:boolean read FExportPrintRange write FExportPrintRange default false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
@ -97,6 +101,8 @@ begin
|
|||||||
FOpenAfterExport:=true;
|
FOpenAfterExport:=true;
|
||||||
FMergeCell:=true;
|
FMergeCell:=true;
|
||||||
FDeleteEmptyRow:=false;
|
FDeleteEmptyRow:=false;
|
||||||
|
FExportURL:=false;
|
||||||
|
FExportPrintRange:=false;
|
||||||
FShowSetupForm:=true;
|
FShowSetupForm:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user