mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 00:40:18 +02:00
Merged revision(s) 55861 #1274e8abb3 from trunk:
LazReport: Implements flBandKeepChild, from Lutz Mändle, issue #30466 ........ git-svn-id: branches/fixes_1_8@56981 -
This commit is contained in:
parent
72f0fe8876
commit
1a394c8f24
@ -4,6 +4,7 @@ Aleksey Lagunov (ru)
|
||||
Andrey Gusev (ru)
|
||||
Christian Ulrich (de)
|
||||
Domingo Alvarez Duarte( )
|
||||
Gabor Boros ( )
|
||||
German Basisty (ar)
|
||||
Javier Villarroya (es)
|
||||
Jesus Reyes A. (mx)
|
||||
@ -11,6 +12,7 @@ Joerg Braun (de)
|
||||
Junior Goncalves (br)
|
||||
Julio Jiménez B. (es)
|
||||
Luiz Americo (br)
|
||||
Lutz Mändle ( )
|
||||
Mattias Gaertner (de)
|
||||
Michel Gawrycki ( )
|
||||
Olivier Guilbaud (fr)
|
||||
|
@ -1571,6 +1571,10 @@ msgstr "\"%s\" ist kein gültiger Variablenname."
|
||||
msgid "Keep aspect ratio"
|
||||
msgstr "Seitenverhältnis beibehalten"
|
||||
|
||||
#: lr_const.skeepchild
|
||||
msgid "Keep child together with parent"
|
||||
msgstr "Nachfolger zusammen mit Elternband drucken"
|
||||
|
||||
#: lr_const.slazformfile
|
||||
msgid "LazReport form"
|
||||
msgstr "LazReport-Formular"
|
||||
|
@ -1556,6 +1556,10 @@ msgstr ""
|
||||
msgid "Keep aspect ratio"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.skeepchild
|
||||
msgid "Keep child together with parent"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.slazformfile
|
||||
msgid "LazReport form"
|
||||
msgstr ""
|
||||
|
@ -47,6 +47,7 @@ const
|
||||
flBandOnLastPage = $20;
|
||||
flBandRepeatHeader = $40;
|
||||
flBandPrintChildIfNotVisible = $100;
|
||||
flBandKeepChild = $200;
|
||||
|
||||
flPictCenter = 2;
|
||||
flPictRatio = 4;
|
||||
@ -578,6 +579,7 @@ type
|
||||
procedure P5Click(Sender: TObject);
|
||||
procedure P6Click(Sender: TObject);
|
||||
procedure P7Click(Sender: TObject);
|
||||
procedure P8Click(Sender: TObject);
|
||||
function GetTitleRect: TRect;
|
||||
function TitleSize: Integer;
|
||||
procedure CalcTitleSize;
|
||||
@ -5379,6 +5381,15 @@ begin
|
||||
m.Checked := (Flags and flBandPrintChildIfNotVisible) <> 0;
|
||||
Popup.Items.Add(m);
|
||||
end;
|
||||
|
||||
if not (BandType in [btChild, btPageFooter]) then
|
||||
begin
|
||||
m := TMenuItem.Create(Popup);
|
||||
m.Caption := sKeepChild;
|
||||
m.OnClick := @P8Click;
|
||||
m.Checked := (Flags and flBandKeepChild) <> 0;
|
||||
Popup.Items.Add(m);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrBandView.P1Click(Sender: TObject);
|
||||
@ -5477,6 +5488,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrBandView.P8Click(Sender: TObject);
|
||||
begin
|
||||
frDesigner.BeforeChange;
|
||||
with Sender as TMenuItem do
|
||||
begin
|
||||
Checked := not Checked;
|
||||
Flags := (Flags and not flBandKeepChild) + Word(Checked) * flBandKeepChild;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrBandView.GetTitleRect: TRect;
|
||||
begin
|
||||
if BandType in [btCrossHeader..btCrossFooter] then
|
||||
@ -7152,6 +7173,15 @@ begin
|
||||
CalculatedHeight := dy;
|
||||
if Stretched then Result := CalcHeight;
|
||||
end;
|
||||
if (Flags and flBandKeepChild) <> 0 then
|
||||
begin
|
||||
b := Self.ChildBand;
|
||||
while Assigned(b) do
|
||||
begin
|
||||
Result := Result + b.CalcHeight;
|
||||
b := b.ChildBand;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrBand.Draw: Boolean;
|
||||
|
@ -226,6 +226,7 @@ resourcestring
|
||||
sPrintIfSubsetEmpty = 'Print if detail empty';
|
||||
sPrintChildIfNotVisible = 'Print child if not visible';
|
||||
sBreaked = 'Breaked';
|
||||
sKeepChild = 'Keep child together with parent';
|
||||
sPictureCenter = 'Center picture';
|
||||
sKeepAspectRatio = 'Keep aspect ratio';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user