RxFPC:fix cancel button click in RxDBGridExportSpreadSheet_ParamsForm

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8877 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2023-07-11 10:17:35 +00:00
parent 0720be79d7
commit a64f1c9064
2 changed files with 25 additions and 23 deletions

View File

@ -9,7 +9,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '2.1.0.0'
LCLVersion = '3.99.0.0'
object Label1: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
@ -29,7 +29,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 12
Height = 34
Height = 29
Top = 29
Width = 530
Filter = 'All files (*.*)|*.*|LibreOffice/OpenOffice (*.ods)|*.ods|Excel 97-2003|*.xls|Excel 2007-2013|*.xlsx'
@ -49,7 +49,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 280
Height = 17
Top = 185
Top = 180
Width = 67
BorderSpacing.Around = 6
Caption = 'Page name'
@ -63,8 +63,8 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 286
Height = 34
Top = 208
Height = 29
Top = 203
Width = 256
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
@ -76,7 +76,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 127
Top = 122
Width = 155
BorderSpacing.Around = 6
Caption = 'Export column footer'
@ -88,7 +88,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 69
Top = 64
Width = 133
BorderSpacing.Around = 6
Caption = 'Open after export'
@ -96,8 +96,8 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 46
Top = 276
Height = 42
Top = 280
Width = 536
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
@ -116,7 +116,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 98
Top = 93
Width = 159
BorderSpacing.Around = 6
Caption = 'Export column header'
@ -128,7 +128,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 156
Top = 151
Width = 130
BorderSpacing.Around = 6
Caption = 'Export cell colors'
@ -150,7 +150,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 280
Height = 23
Top = 98
Top = 93
Width = 155
BorderSpacing.Around = 6
Caption = 'Overwrite existing file'
@ -162,7 +162,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 280
Height = 23
Top = 69
Top = 64
Width = 117
BorderSpacing.Around = 6
Caption = 'Export formula'
@ -174,7 +174,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 185
Top = 180
Width = 151
BorderSpacing.Around = 6
Caption = 'Export selected rows'
@ -186,7 +186,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 280
Height = 23
Top = 127
Top = 122
Width = 123
BorderSpacing.Around = 6
Caption = 'Hide zero values'
@ -198,8 +198,8 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 214
Width = 99
Top = 209
Width = 97
BorderSpacing.Around = 6
Caption = 'Merge cell''s'
TabOrder = 11
@ -210,7 +210,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 280
Height = 23
Top = 156
Top = 151
Width = 135
BorderSpacing.Around = 6
Caption = 'Export group data'

View File

@ -95,12 +95,14 @@ end;
procedure TRxDBGridExportSpreadSheet_ParamsForm.FormCloseQuery(Sender: TObject;
var CanClose: boolean);
begin
CanClose:=(FileNameEdit1.FileName<>'');
if not CanClose then
if ModalResult = mrOk then
begin
ErrorBox(sRxNotDefinedFileName);
FileNameEdit1.SetFocus;
Exit;
CanClose:=(FileNameEdit1.FileName<>'');
if not CanClose then
begin
ErrorBox(sRxNotDefinedFileName);
FileNameEdit1.SetFocus;
end;
end;
end;