mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 05:00:35 +02:00
Merged revision(s) 51791 #26d9446403, 52095 #93b5f73def from trunk:
LazReport, Decouple flHideZeros and flBandPrintChildIfNotVisible, modified patch by Luiz Americo, fix issue #29313 ........ LazReport, fix text width calc on rotated memos, issue #29890 ........ git-svn-id: branches/fixes_1_6@52171 -
This commit is contained in:
parent
fec94eed66
commit
239d5cee9e
@ -46,7 +46,7 @@ const
|
|||||||
flBandOnFirstPage = $10;
|
flBandOnFirstPage = $10;
|
||||||
flBandOnLastPage = $20;
|
flBandOnLastPage = $20;
|
||||||
flBandRepeatHeader = $40;
|
flBandRepeatHeader = $40;
|
||||||
flBandPrintChildIfNotVisible = $80;
|
flBandPrintChildIfNotVisible = $100;
|
||||||
|
|
||||||
flPictCenter = 2;
|
flPictCenter = 2;
|
||||||
flPictRatio = 4;
|
flPictRatio = 4;
|
||||||
@ -570,6 +570,7 @@ type
|
|||||||
function GetTitleRect: TRect;
|
function GetTitleRect: TRect;
|
||||||
function TitleSize: Integer;
|
function TitleSize: Integer;
|
||||||
procedure CalcTitleSize;
|
procedure CalcTitleSize;
|
||||||
|
procedure FixPrintChildIfNotVisible;
|
||||||
protected
|
protected
|
||||||
procedure SetHeight(const AValue: Double); override;
|
procedure SetHeight(const AValue: Double); override;
|
||||||
procedure SetVisible(AValue: Boolean);override;
|
procedure SetVisible(AValue: Boolean);override;
|
||||||
@ -1460,8 +1461,9 @@ const
|
|||||||
// on TfrView, used to extend export facilities
|
// on TfrView, used to extend export facilities
|
||||||
// version 2.6: lazreport: added to binary stream Tag property on TfrView
|
// version 2.6: lazreport: added to binary stream Tag property on TfrView
|
||||||
// version 2.7: lazreport: added to binary stream FOnClick, FOnMouseEnter, FOnMouseLeave, FCursor property on TfrMemoView
|
// version 2.7: lazreport: added to binary stream FOnClick, FOnMouseEnter, FOnMouseLeave, FCursor property on TfrMemoView
|
||||||
// version 2.8. lazreport: added support for child bands
|
// version 2.8: lazreport: added support for child bands
|
||||||
// version 2.9. lazreport: added support LineSpacing and GapX, GapY
|
// version 2.9: lazreport: added support LineSpacing and GapX, GapY
|
||||||
|
// version 3.0: lazreport: decoupled flHideZeros and flBandPrintChildIfNotVisible
|
||||||
|
|
||||||
frSpecCount = 9;
|
frSpecCount = 9;
|
||||||
frSpecFuncs: Array[0..frSpecCount - 1] of String = ('PAGE#', '',
|
frSpecFuncs: Array[0..frSpecCount - 1] of String = ('PAGE#', '',
|
||||||
@ -3738,7 +3740,7 @@ var
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
SMemo.Add(str + Chr(w div 256) + Chr(w mod 256));
|
SMemo.Add(str + Chr(w div 256) + Chr(w mod 256));
|
||||||
Inc(size, size1);
|
Inc(size, size1);
|
||||||
//!!
|
if Angle=0 then
|
||||||
maxWidth := dx - InternalGapX - InternalGapX;
|
maxWidth := dx - InternalGapX - InternalGapX;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5087,6 +5089,7 @@ begin
|
|||||||
fDataSetStr:=ReadString(Stream);
|
fDataSetStr:=ReadString(Stream);
|
||||||
if frVersion>=28 then
|
if frVersion>=28 then
|
||||||
fChild :=ReadString(Stream);
|
fChild :=ReadString(Stream);
|
||||||
|
fixPrintChildIfNotVisible;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
if StreamMode=smDesigning then begin
|
if StreamMode=smDesigning then begin
|
||||||
@ -5104,6 +5107,7 @@ begin
|
|||||||
FCondition := XML.GetValue(Path+'Condition/Value', ''); // todo chk
|
FCondition := XML.GetValue(Path+'Condition/Value', ''); // todo chk
|
||||||
FDatasetStr := XML.GetValue(Path+'DatasetStr/Value', ''); // todo chk
|
FDatasetStr := XML.GetValue(Path+'DatasetStr/Value', ''); // todo chk
|
||||||
FChild := XML.GetValue(Path+'Child/Value', '');
|
FChild := XML.GetValue(Path+'Child/Value', '');
|
||||||
|
FixPrintChildIfNotVisible;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrBandView.SaveToStream(Stream: TStream);
|
procedure TfrBandView.SaveToStream(Stream: TStream);
|
||||||
@ -5465,6 +5469,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrBandView.FixPrintChildIfNotVisible;
|
||||||
|
begin
|
||||||
|
if ((frVersion=28) or (frVersion=29)) and (flags and $80 <> 0) then
|
||||||
|
begin
|
||||||
|
flags := flags and not $80;
|
||||||
|
flags := flags or flBandPrintChildIfNotVisible;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrBandView.SetHeight(const AValue: Double);
|
procedure TfrBandView.SetHeight(const AValue: Double);
|
||||||
begin
|
begin
|
||||||
inherited SetHeight(AValue);
|
inherited SetHeight(AValue);
|
||||||
@ -10150,8 +10163,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
//check if CurView is TfrBandView to avoid clash with flBandPrintChildIfNotVisible. Issue 29313
|
||||||
if Assigned(CurView) and (CurView.Flags and flHideZeros <> 0) then
|
if Assigned(CurView) and ((CurView.Flags and flHideZeros <> 0) and not (CurView is TfrBandView)) then
|
||||||
begin
|
begin
|
||||||
if TVarData(aValue).VType in [varSmallInt, varInteger, varCurrency,
|
if TVarData(aValue).VType in [varSmallInt, varInteger, varCurrency,
|
||||||
varDecimal, varShortInt, varByte, varWord, varLongWord, varInt64,
|
varDecimal, varShortInt, varByte, varWord, varLongWord, varInt64,
|
||||||
|
Loading…
Reference in New Issue
Block a user