mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 16:41:23 +02:00
Merged revision(s) 43046-43047 #76fbc9e44c-#76fbc9e44c, 43063 #82ba28e80b from trunk:
LazReport, improve error message on missing classes, was about FRF format while in reality is about LRF format ........ LazReport, fix error in dialogs when object is deleted and then a new one inserted, issue #25097 ........ LazReport, restored accidentally removed translations ........ git-svn-id: branches/fixes_1_2@43121 -
This commit is contained in:
parent
ce01175490
commit
abd9c85a95
@ -166,7 +166,7 @@ end;
|
||||
|
||||
function TlrDBLookupComboBox.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TDBLookupComboBox.Create(OwnerForm);
|
||||
Result:=TDBLookupComboBox.Create(nil);
|
||||
TDBLookupComboBox(Result).Style:=csDropDownList;
|
||||
TDBLookupComboBox(Result).OnCloseUp:=@DBLookupComboBox1CloseUp;
|
||||
end;
|
||||
|
@ -67,9 +67,11 @@ type
|
||||
function CreateControl:TControl;virtual;abstract;
|
||||
public
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
destructor Destroy; override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure UpdateControlPosition; override;
|
||||
procedure AttachToParent; override;
|
||||
|
||||
property Control: TControl read FControl write FControl;
|
||||
property AutoSize: Boolean read GetAutoSize write SetAutoSize;
|
||||
@ -426,7 +428,7 @@ end;
|
||||
|
||||
function TlrButtonPanel.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TButtonPanel.Create(OwnerForm);
|
||||
Result:=TButtonPanel.Create(nil);
|
||||
end;
|
||||
|
||||
procedure TlrButtonPanel.AfterCreate;
|
||||
@ -499,7 +501,7 @@ end;
|
||||
|
||||
function TlrDateEdit.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TDateEdit.Create(OwnerForm);
|
||||
Result:=TDateEdit.Create(nil);
|
||||
end;
|
||||
|
||||
constructor TlrDateEdit.Create(AOwnerPage: TfrPage);
|
||||
@ -566,7 +568,7 @@ end;
|
||||
|
||||
function TlrListBox.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TListBox.Create(OwnerForm);
|
||||
Result:=TListBox.Create(nil);
|
||||
end;
|
||||
|
||||
constructor TlrListBox.Create(AOwnerPage: TfrPage);
|
||||
@ -621,7 +623,7 @@ end;
|
||||
|
||||
function TlrMemo.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TMemo.Create(OwnerForm);
|
||||
Result:=TMemo.Create(nil);
|
||||
end;
|
||||
|
||||
constructor TlrMemo.Create(AOwnerPage: TfrPage);
|
||||
@ -645,7 +647,7 @@ end;
|
||||
|
||||
function TlrRadioButton.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TRadioButton.Create(OwnerForm);
|
||||
Result:=TRadioButton.Create(nil);
|
||||
end;
|
||||
|
||||
function TlrRadioButton.GetCheckStyle(ACheck: boolean): TThemedButton;
|
||||
@ -727,7 +729,7 @@ end;
|
||||
|
||||
function TlrComboBox.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TComboBox.Create(OwnerForm);
|
||||
Result:=TComboBox.Create(nil);
|
||||
end;
|
||||
|
||||
constructor TlrComboBox.Create(AOwnerPage: TfrPage);
|
||||
@ -793,7 +795,7 @@ end;
|
||||
|
||||
function TlrCheckBox.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TCheckBox.Create(OwnerForm);
|
||||
Result:=TCheckBox.Create(nil);
|
||||
end;
|
||||
|
||||
function TlrCheckBox.GetCheckStyle(ACheck: boolean): TThemedButton;
|
||||
@ -852,7 +854,7 @@ end;
|
||||
|
||||
function TlrButton.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TBitBtn.Create(OwnerForm);
|
||||
Result:=TBitBtn.Create(nil);
|
||||
Result.AutoSize:=true;
|
||||
end;
|
||||
|
||||
@ -891,7 +893,7 @@ end;
|
||||
|
||||
function TlrEdit.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TEdit.Create(OwnerForm);
|
||||
Result:=TEdit.Create(nil);
|
||||
end;
|
||||
|
||||
constructor TlrEdit.Create(AOwnerPage: TfrPage);
|
||||
@ -948,7 +950,7 @@ end;
|
||||
|
||||
function TlrLabel.CreateControl: TControl;
|
||||
begin
|
||||
Result:=TLabel.Create(OwnerForm);
|
||||
Result:=TLabel.Create(nil);
|
||||
end;
|
||||
|
||||
|
||||
@ -1094,6 +1096,11 @@ begin
|
||||
FControl.Height:=round(Height);
|
||||
end;
|
||||
|
||||
procedure TlrVisualControl.AttachToParent;
|
||||
begin
|
||||
FControl.Parent := OwnerForm;
|
||||
end;
|
||||
|
||||
procedure TlrVisualControl.AfterCreate;
|
||||
begin
|
||||
inherited AfterCreate;
|
||||
@ -1107,7 +1114,6 @@ begin
|
||||
FControl:=CreateControl;
|
||||
if Assigned(FControl) then
|
||||
begin
|
||||
FControl.Parent:=OwnerForm;
|
||||
x:=FControl.Left;
|
||||
Y:=FControl.Top;
|
||||
DX:=FControl.Width;
|
||||
@ -1115,6 +1121,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TlrVisualControl.Destroy;
|
||||
begin
|
||||
FControl.Free;
|
||||
FControl := nil;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TlrVisualControl.LoadFromXML(XML: TLrXMLConfig; const Path: String);
|
||||
begin
|
||||
inherited LoadFromXML(XML, Path);
|
||||
|
@ -2200,6 +2200,10 @@ msgstr "Datum vytvoření reportu"
|
||||
msgid "Report last modify date"
|
||||
msgstr "Poslední úprava reportu"
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Příprava reportu"
|
||||
|
@ -2196,6 +2196,10 @@ msgstr "Erstelldatum"
|
||||
msgid "Report last modify date"
|
||||
msgstr "Datum der letzten Änderung"
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Report-Vorbereitung"
|
||||
|
@ -226,7 +226,7 @@ msgstr "0"
|
||||
|
||||
#: lr_const.sclassobjectnotfound
|
||||
msgid "Class Object \"%s\" not found"
|
||||
msgstr "Objeto de clase \"%s\" not found"
|
||||
msgstr "No se encontró la clase de objeto \"%s\""
|
||||
|
||||
#: lr_const.sconfirm
|
||||
msgid "Confirm"
|
||||
@ -2196,6 +2196,10 @@ msgstr "Fecha de creación del informe"
|
||||
msgid "Report last modify date"
|
||||
msgstr "Fecha última modificación del informe"
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr "Error al cargar el reporte"
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Preparación del reporte"
|
||||
|
@ -2211,6 +2211,10 @@ msgstr ""
|
||||
msgid "Report last modify date"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Préparation du rapport"
|
||||
|
@ -2202,6 +2202,10 @@ msgstr ""
|
||||
msgid "Report last modify date"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Menyiapkan laporan"
|
||||
|
@ -2203,6 +2203,10 @@ msgstr ""
|
||||
msgid "Report last modify date"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Preparazione del report"
|
||||
|
@ -2188,6 +2188,10 @@ msgstr "Pranešimo sukūrimo data"
|
||||
msgid "Report last modify date"
|
||||
msgstr "Pranešimo paskutiniojo keitimo data"
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Pranešimas ruošiamas"
|
||||
|
@ -2205,6 +2205,10 @@ msgstr ""
|
||||
msgid "Report last modify date"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Przygotowanie raportu"
|
||||
|
@ -2165,6 +2165,10 @@ msgstr ""
|
||||
msgid "Report last modify date"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr ""
|
||||
|
@ -2187,6 +2187,10 @@ msgstr "Data de criação do relatório"
|
||||
msgid "Report last modify date"
|
||||
msgstr "Data da última alteração do relatório"
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Preparando relatório"
|
||||
|
@ -2186,6 +2186,10 @@ msgstr "Дата создания отчёта"
|
||||
msgid "Report last modify date"
|
||||
msgstr "Дата последнего изменения отчёта"
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Подготовка отчёта"
|
||||
|
@ -2189,6 +2189,10 @@ msgstr ""
|
||||
msgid "Report last modify date"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportloadingerror
|
||||
msgid "Error while loading report"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sreportpreparing
|
||||
msgid "Report preparing"
|
||||
msgstr "Підготовка звіту"
|
||||
|
@ -347,7 +347,8 @@ type
|
||||
procedure PaintDesignControl; virtual;abstract;
|
||||
public
|
||||
procedure UpdateControlPosition; virtual;
|
||||
function OwnerForm:TWinControl;
|
||||
procedure AttachToParent; virtual;
|
||||
function OwnerForm:TWinControl; virtual;
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure Draw(ACanvas: TCanvas); override;
|
||||
procedure DefinePopupMenu(Popup: TPopupMenu); override;
|
||||
@ -1903,6 +1904,11 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrControl.AttachToParent;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
function TfrControl.OwnerForm: TWinControl;
|
||||
begin
|
||||
if Assigned(OwnerPage) and (OwnerPage is TfrPageDialog) then
|
||||
@ -9121,20 +9127,24 @@ begin
|
||||
|
||||
if frVersion < 21 then
|
||||
frVersion := 21;
|
||||
|
||||
if frVersion <= frCurrentVersion then
|
||||
try
|
||||
{$IFDEF FREEREP2217READ}
|
||||
if FRE_COMPATIBLE_READ and (frVersion >= 23) then
|
||||
frVersion := 22;
|
||||
{$ENDIF}
|
||||
pages.LoadFromXML(XML, Path+'Pages/');
|
||||
except
|
||||
Pages.Clear;
|
||||
Pages.Add;
|
||||
MessageDlg(sFRFError,mtError,[mbOk],0)
|
||||
end
|
||||
try
|
||||
{$IFDEF FREEREP2217READ}
|
||||
if FRE_COMPATIBLE_READ and (frVersion >= 23) then
|
||||
frVersion := 22;
|
||||
{$ENDIF}
|
||||
pages.LoadFromXML(XML, Path+'Pages/');
|
||||
except
|
||||
on E:Exception do
|
||||
begin
|
||||
Pages.Clear;
|
||||
Pages.Add;
|
||||
MessageDlg(sReportLoadingError+^M+E.Message,mtError,[mbOk],0)
|
||||
end;
|
||||
end
|
||||
else
|
||||
MessageDlg(sFRFError,mtError,[mbOk],0);
|
||||
MessageDlg(sReportLoadingError,mtError,[mbOk],0);
|
||||
end;
|
||||
|
||||
procedure TfrReport.SaveToStream(Stream: TStream);
|
||||
@ -11910,6 +11920,7 @@ begin
|
||||
if not (P is TfrNonVisualControl) then
|
||||
begin
|
||||
fHasVisibleControls:=true;
|
||||
P.AttachToParent;
|
||||
P.UpdateControlPosition;
|
||||
end;
|
||||
end;
|
||||
|
@ -262,6 +262,7 @@ resourcestring
|
||||
sErrorOccured = 'An error occured during calculating';
|
||||
sSpecVal = 'Other';
|
||||
sFRFError = 'Unsupported FRF format';
|
||||
sReportLoadingError = 'Error while loading report';
|
||||
sClassObjectNotFound = 'Class Object "%s" not found';
|
||||
sDuplicatedObjectName = 'An object named "%s" already exists';
|
||||
sObjectNotFound = 'Object "%s" not found';
|
||||
|
Loading…
Reference in New Issue
Block a user