mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 01:21:00 +02:00
LazReport, fix barcode dialog localization
git-svn-id: trunk@36506 -
This commit is contained in:
parent
f96d540ac6
commit
2aff57145e
@ -24,7 +24,7 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
Left = 6
|
Left = 6
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 30
|
Width = 26
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Code'
|
Caption = 'Code'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -35,8 +35,8 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 51
|
Top = 53
|
||||||
Width = 64
|
Width = 57
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Type of bar'
|
Caption = 'Type of bar'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -67,7 +67,7 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 21
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 368
|
Width = 368
|
||||||
HelpContext = 260
|
HelpContext = 260
|
||||||
@ -82,13 +82,13 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 27
|
Height = 21
|
||||||
Top = 71
|
Top = 73
|
||||||
Width = 368
|
Width = 368
|
||||||
HelpContext = 261
|
HelpContext = 261
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ItemHeight = 0
|
ItemHeight = 13
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
@ -135,24 +135,24 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 76
|
Height = 71
|
||||||
Top = 104
|
Top = 100
|
||||||
Width = 368
|
Width = 368
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Options'
|
Caption = 'Options'
|
||||||
ClientHeight = 62
|
ClientHeight = 53
|
||||||
ClientWidth = 366
|
ClientWidth = 364
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object labZoom: TLabel
|
object labZoom: TLabel
|
||||||
AnchorSideLeft.Control = GroupBox1
|
AnchorSideLeft.Control = GroupBox1
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = GroupBox1
|
AnchorSideTop.Control = GroupBox1
|
||||||
Left = 166
|
Left = 169
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 35
|
Width = 27
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Zoom'
|
Caption = 'Zoom'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -161,9 +161,9 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
AnchorSideLeft.Control = GroupBox1
|
AnchorSideLeft.Control = GroupBox1
|
||||||
AnchorSideTop.Control = GroupBox1
|
AnchorSideTop.Control = GroupBox1
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 22
|
Height = 17
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 87
|
Width = 69
|
||||||
HelpContext = 262
|
HelpContext = 262
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Checksum '
|
Caption = 'Checksum '
|
||||||
@ -174,9 +174,9 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
AnchorSideTop.Control = ckCheckSum
|
AnchorSideTop.Control = ckCheckSum
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 22
|
Height = 17
|
||||||
Top = 34
|
Top = 29
|
||||||
Width = 118
|
Width = 96
|
||||||
HelpContext = 263
|
HelpContext = 263
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Human readable'
|
Caption = 'Human readable'
|
||||||
@ -186,8 +186,8 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
AnchorSideLeft.Control = labZoom
|
AnchorSideLeft.Control = labZoom
|
||||||
AnchorSideTop.Control = labZoom
|
AnchorSideTop.Control = labZoom
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 172
|
Left = 175
|
||||||
Height = 19
|
Height = 21
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 77
|
Width = 77
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -204,19 +204,19 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 65
|
Height = 65
|
||||||
Top = 186
|
Top = 177
|
||||||
Width = 368
|
Width = 368
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Orientation'
|
Caption = 'Orientation'
|
||||||
ClientHeight = 51
|
ClientHeight = 47
|
||||||
ClientWidth = 366
|
ClientWidth = 364
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object RB1: TRadioButton
|
object RB1: TRadioButton
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 22
|
Height = 17
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 35
|
Width = 27
|
||||||
HelpContext = 264
|
HelpContext = 264
|
||||||
Caption = '0 '
|
Caption = '0 '
|
||||||
Checked = True
|
Checked = True
|
||||||
@ -225,27 +225,27 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
end
|
end
|
||||||
object RB2: TRadioButton
|
object RB2: TRadioButton
|
||||||
Left = 72
|
Left = 72
|
||||||
Height = 22
|
Height = 17
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 42
|
Width = 33
|
||||||
HelpContext = 264
|
HelpContext = 264
|
||||||
Caption = '90 '
|
Caption = '90 '
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object RB3: TRadioButton
|
object RB3: TRadioButton
|
||||||
Left = 136
|
Left = 136
|
||||||
Height = 22
|
Height = 17
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 49
|
Width = 39
|
||||||
HelpContext = 264
|
HelpContext = 264
|
||||||
Caption = '180 '
|
Caption = '180 '
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object RB4: TRadioButton
|
object RB4: TRadioButton
|
||||||
Left = 200
|
Left = 200
|
||||||
Height = 22
|
Height = 17
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 49
|
Width = 39
|
||||||
HelpContext = 264
|
HelpContext = 264
|
||||||
Caption = '270 '
|
Caption = '270 '
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@ -253,8 +253,8 @@ object frBarCodeForm: TfrBarCodeForm
|
|||||||
end
|
end
|
||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 42
|
Height = 34
|
||||||
Top = 289
|
Top = 297
|
||||||
Width = 368
|
Width = 368
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
OKButton.Caption = '&OK'
|
OKButton.Caption = '&OK'
|
||||||
|
@ -745,19 +745,20 @@ end;
|
|||||||
constructor TfrBarCodeObject.Create(aOwner: TComponent);
|
constructor TfrBarCodeObject.Create(aOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(aOwner);
|
inherited Create(aOwner);
|
||||||
|
|
||||||
(* if not assigned(frBarCodeForm) {and not (csDesigning in ComponentState)} then
|
if not assigned(frBarCodeForm) {and not (csDesigning in ComponentState)} then
|
||||||
begin
|
begin
|
||||||
frBarCodeForm := TfrBarCodeForm.Create(nil);
|
frBarCodeForm := TfrBarCodeForm.Create(nil);
|
||||||
frRegisterObject(TfrBarCodeView, frBarCodeForm.Image1.Picture.Bitmap,
|
frSetAddinEditor(TfrBarcodeView, frBarcodeForm);
|
||||||
sInsBarcode, frBarCodeForm);
|
frSetAddinIcon(TfrBarcodeView, frBarCodeForm.Image1.Picture.Bitmap);
|
||||||
end;*)
|
frSetAddinHint(TfrBarcodeView, sInsBarcode);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
frBarCodeForm := TfrBarCodeForm.Create(nil);
|
frBarcodeForm := nil;
|
||||||
frRegisterObject(TfrBarCodeView, frBarCodeForm.Image1.Picture.Bitmap,
|
frRegisterObject(TfrBarCodeView, nil, '', nil);
|
||||||
sInsBarcode, frBarCodeForm);
|
|
||||||
finalization
|
finalization
|
||||||
if Assigned(frBarCodeForm) then
|
if Assigned(frBarCodeForm) then
|
||||||
frBarCodeForm.Free;
|
frBarCodeForm.Free;
|
||||||
|
@ -1129,6 +1129,9 @@ type
|
|||||||
function frCreateObject(Typ: Byte; const ClassName: String): TfrView;
|
function frCreateObject(Typ: Byte; const ClassName: String): TfrView;
|
||||||
procedure frRegisterObject(ClassRef: TFRViewClass; ButtonBmp: TBitmap;
|
procedure frRegisterObject(ClassRef: TFRViewClass; ButtonBmp: TBitmap;
|
||||||
const ButtonHint: String; EditorForm: TfrObjEditorForm);
|
const ButtonHint: String; EditorForm: TfrObjEditorForm);
|
||||||
|
procedure frSetAddinEditor(ClassRef: TfrViewClass; EditorForm: TfrObjEditorForm);
|
||||||
|
procedure frSetAddinIcon(ClassRef: TfrViewClass; ButtonBmp: TBitmap);
|
||||||
|
procedure frSetAddinHint(ClassRef: TfrViewClass; ButtonHint: string);
|
||||||
procedure frRegisterExportFilter(ClassRef: TfrExportFilterClass;
|
procedure frRegisterExportFilter(ClassRef: TfrExportFilterClass;
|
||||||
const FilterDesc, FilterExt: String);
|
const FilterDesc, FilterExt: String);
|
||||||
procedure frRegisterFunctionLibrary(ClassRef: TClass);
|
procedure frRegisterFunctionLibrary(ClassRef: TClass);
|
||||||
@ -1458,6 +1461,52 @@ begin
|
|||||||
Inc(frAddInsCount);
|
Inc(frAddInsCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function frGetAddinIndex(ClassRef: TfrViewClass): Integer;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
result := -1;
|
||||||
|
for i:=0 to frAddinsCount-1 do
|
||||||
|
if frAddIns[i].ClassRef = ClassRef then
|
||||||
|
begin
|
||||||
|
result := i;
|
||||||
|
break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure frSetAddinEditor(ClassRef: TfrViewClass; EditorForm: TfrObjEditorForm);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
i := frGetAddinIndex(ClassRef);
|
||||||
|
if i>=0 then
|
||||||
|
frAddins[i].EditorForm := EditorForm
|
||||||
|
else
|
||||||
|
raise Exception.CreateFmt(sClassObjectNotFound,[Classref.ClassName]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure frSetAddinIcon(ClassRef: TfrViewClass; ButtonBmp: TBitmap);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
i := frGetAddinIndex(ClassRef);
|
||||||
|
if i>=0 then
|
||||||
|
frAddins[i].ButtonBmp := ButtonBmp
|
||||||
|
else
|
||||||
|
raise Exception.CreateFmt(sClassObjectNotFound,[Classref.ClassName]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure frSetAddinHint(ClassRef: TfrViewClass; ButtonHint: string);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
i := frGetAddinIndex(ClassRef);
|
||||||
|
if i>=0 then
|
||||||
|
frAddins[i].ButtonHint := ButtonHint
|
||||||
|
else
|
||||||
|
raise Exception.CreateFmt(sClassObjectNotFound,[Classref.ClassName]);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure frRegisterExportFilter(ClassRef: TfrExportFilterClass;
|
procedure frRegisterExportFilter(ClassRef: TfrExportFilterClass;
|
||||||
const FilterDesc, FilterExt: String);
|
const FilterDesc, FilterExt: String);
|
||||||
begin
|
begin
|
||||||
@ -8186,9 +8235,12 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Pages.LoadFromStream(Stream);
|
Pages.LoadFromStream(Stream);
|
||||||
except
|
except
|
||||||
Pages.Clear;
|
on E:Exception do
|
||||||
Pages.Add;
|
begin
|
||||||
MessageDlg(sFRFError,mtError,[mbOk],0)
|
Pages.Clear;
|
||||||
|
Pages.Add;
|
||||||
|
MessageDlg(sFRFError+^M+E.Message,mtError,[mbOk],0)
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
MessageDlg(sFRFError,mtError,[mbOk],0);
|
MessageDlg(sFRFError,mtError,[mbOk],0);
|
||||||
|
Loading…
Reference in New Issue
Block a user