mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 15:56:08 +02:00
LazReport Patch from Aleksey Lagunov
1. For dialog controls in designer work UNDO 2. In lrForm StorageEditor list box with props now sorted 3. Fix error in lrSpreadsheetImport - not loaded last col and row 4. increase file format version to 2.9 5. add support for paragraph gap 6. add support for line spacing 7. In report designer add action for UNDO and REDO menu items 8. In designer fix AV on clipborad actions git-svn-id: trunk@49658 -
This commit is contained in:
parent
79e2da2c5e
commit
25c059c099
@ -105,6 +105,7 @@ type
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property Alignment: TAlignment read GetAlignment write SetAlignment;
|
||||
property WordWrap:boolean read GetWordWrap write SetWordWrap;
|
||||
@ -170,6 +171,7 @@ type
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property AutoSize;
|
||||
property Color;
|
||||
@ -194,6 +196,7 @@ type
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property AutoSize;
|
||||
property Color;
|
||||
@ -229,6 +232,7 @@ type
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property Color;
|
||||
property Enabled;
|
||||
@ -257,6 +261,7 @@ type
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property Color;
|
||||
property Enabled;
|
||||
@ -283,6 +288,7 @@ type
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property Color;
|
||||
property Enabled;
|
||||
@ -308,6 +314,7 @@ type
|
||||
procedure UpdateControlPosition; override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property ButtonOrder: TButtonOrder read GetButtonOrder write SetButtonOrder default boDefault;
|
||||
property ShowButtons: TPanelButtons read GetShowButtons write SetShowButtons default DefShowButtons;
|
||||
@ -330,13 +337,12 @@ type
|
||||
protected
|
||||
procedure PaintDesignControl; override;
|
||||
function CreateControl:TControl;override;
|
||||
//procedure AfterCreate;override;
|
||||
function ExecMetod(const AName: String; p1, p2, p3: Variant; var Val: Variant):boolean;override;
|
||||
public
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property Color;
|
||||
property Enabled;
|
||||
@ -363,6 +369,7 @@ type
|
||||
constructor Create(AOwnerPage:TfrPage); override;
|
||||
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property Color;
|
||||
property Enabled;
|
||||
@ -558,6 +565,16 @@ begin
|
||||
XML.SetValue(Path+'ItemIndex/Value'{%H-}, ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TlrRadioGroup.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrRadioGroup then
|
||||
begin
|
||||
Items.Assign(TlrRadioGroup(Source).Items);
|
||||
ItemIndex:=TlrRadioGroup(Source).ItemIndex;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TlrCheckListBox }
|
||||
|
||||
function TlrCheckListBox.GetItemIndex: integer;
|
||||
@ -685,6 +702,16 @@ begin
|
||||
XML.SetValue(Path+'ItemIndex/Value'{%H-}, ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TlrCheckListBox.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrCheckListBox then
|
||||
begin
|
||||
Items.Assign(TlrCheckListBox(Source).Items);
|
||||
ItemIndex:=TlrCheckListBox(Source).ItemIndex;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TlrButtonPanel }
|
||||
|
||||
function TlrButtonPanel.GetButtonOrder: TButtonOrder;
|
||||
@ -811,6 +838,16 @@ begin
|
||||
XML.SetValue(Path+'ShowButtons', GetSaveProperty('ShowButtons'));
|
||||
end;
|
||||
|
||||
procedure TlrButtonPanel.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrButtonPanel then
|
||||
begin
|
||||
ButtonOrder:=TlrButtonPanel(Source).ButtonOrder;
|
||||
ShowButtons:=TlrButtonPanel(Source).ShowButtons;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TlrDateEdit }
|
||||
|
||||
function TlrDateEdit.GetDate: TDateTime;
|
||||
@ -863,6 +900,13 @@ begin
|
||||
inherited SaveToXML(XML, Path);
|
||||
end;
|
||||
|
||||
procedure TlrDateEdit.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrDateEdit then
|
||||
Date:=TlrDateEdit(Source).Date;
|
||||
end;
|
||||
|
||||
{ TlrListBox }
|
||||
|
||||
function TlrListBox.GetItemIndex: integer;
|
||||
@ -934,6 +978,16 @@ begin
|
||||
XML.SetValue(Path+'ItemIndex/Value'{%H-}, ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TlrListBox.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrListBox then
|
||||
begin
|
||||
Items.Assign(TlrListBox(Source).Items);
|
||||
ItemIndex:=TlrListBox(Source).ItemIndex;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TlrMemo }
|
||||
|
||||
procedure TlrMemo.MemoChange(Sender: TObject);
|
||||
@ -1109,6 +1163,18 @@ begin
|
||||
XML.SetValue(Path+'DropDownCount/Value'{%H-}, DropDownCount);
|
||||
end;
|
||||
|
||||
procedure TlrComboBox.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrComboBox then
|
||||
begin
|
||||
Style:=TlrComboBox(Source).Style;
|
||||
Items.Assign(TlrComboBox(Source).Items);
|
||||
ItemIndex:=TlrComboBox(Source).ItemIndex;
|
||||
DropDownCount:=TlrComboBox(Source).DropDownCount;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TlrCheckBox }
|
||||
|
||||
type
|
||||
@ -1177,6 +1243,13 @@ begin
|
||||
XML.SetValue(Path+'Checked/Value'{%H-}, Checked);
|
||||
end;
|
||||
|
||||
procedure TlrCheckBox.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrCheckBox then
|
||||
Checked:=TlrCheckBox(Source).Checked;
|
||||
end;
|
||||
|
||||
{ TlrButton }
|
||||
|
||||
function TlrButton.GetKind: TBitBtnKind;
|
||||
@ -1228,6 +1301,13 @@ begin
|
||||
XML.SetValue(Path+'Kind/Value', GetSaveProperty('Kind'));
|
||||
end;
|
||||
|
||||
procedure TlrButton.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrButton then
|
||||
Kind:=TlrButton(Source).Kind;
|
||||
end;
|
||||
|
||||
{ TlrEdit }
|
||||
|
||||
procedure TlrEdit.PaintDesignControl;
|
||||
@ -1326,6 +1406,16 @@ begin
|
||||
XML.SetValue(Path+'Alignment/Value', GetSaveProperty('Alignment'));
|
||||
end;
|
||||
|
||||
procedure TlrLabel.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TlrLabel then
|
||||
begin
|
||||
Alignment:=TlrLabel(Source).Alignment;
|
||||
WordWrap:=TlrLabel(Source).WordWrap;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ TlrVisualControl }
|
||||
|
||||
|
@ -8,7 +8,7 @@ object lrFormStorageEditorForm: TlrFormStorageEditorForm
|
||||
ClientWidth = 570
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.3'
|
||||
LCLVersion = '1.5'
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 42
|
||||
@ -73,6 +73,7 @@ object lrFormStorageEditorForm: TlrFormStorageEditorForm
|
||||
ItemHeight = 0
|
||||
OnDblClick = ListBoxPropsDblClick
|
||||
ScrollWidth = 250
|
||||
Sorted = True
|
||||
TabOrder = 2
|
||||
TopIndex = -1
|
||||
end
|
||||
|
@ -138,11 +138,11 @@ begin
|
||||
FWorksheet := FWorkbook.GetFirstWorksheet;
|
||||
|
||||
Y:=0;
|
||||
for Row:=0 to FWorksheet.GetLastRowIndex-1 do
|
||||
for Row:=0 to FWorksheet.GetLastRowIndex do
|
||||
begin
|
||||
X:=0;
|
||||
DY:=CalcRowHeight(FWorksheet.GetRowHeight(Row));
|
||||
for Col:=0 to FWorksheet.GetLastColIndex-1 do
|
||||
for Col:=0 to FWorksheet.GetLastColIndex do
|
||||
begin
|
||||
Cell := FWorksheet.FindCell(Row, Col);
|
||||
if Assigned(Cell) then
|
||||
@ -212,7 +212,8 @@ begin
|
||||
if fssItalic in sFont.Style then AFont.Style := AFont.Style + [fsItalic];
|
||||
if fssUnderline in sFont.Style then AFont.Style := AFont.Style + [fsUnderline];
|
||||
if fssStrikeout in sFont.Style then AFont.Style := AFont.Style + [fsStrikeout];
|
||||
AFont.Color := FWorkbook.GetPaletteColor(sFont.Color);
|
||||
//AFont.Color := FWorkbook.GetPaletteColor(sFont.Color);
|
||||
AFont.Color := sFont.Color;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -257,6 +257,9 @@ type
|
||||
FTag: string;
|
||||
FURLInfo: string;
|
||||
FFindHighlight : boolean;
|
||||
FGapX:Integer;
|
||||
FGapY:Integer;
|
||||
|
||||
function GetDataField: string;
|
||||
function GetLeft: Double;
|
||||
function GetStretched: Boolean;
|
||||
@ -275,7 +278,7 @@ type
|
||||
SaveX, SaveY, SaveDX, SaveDY: Integer;
|
||||
SaveFW: Double;
|
||||
|
||||
gapx, gapy: Integer;
|
||||
InternalGapX, InternalGapY: Integer;
|
||||
Memo1: TStringList;
|
||||
FDataSet: TfrTDataSet;
|
||||
FField: String;
|
||||
@ -352,6 +355,8 @@ type
|
||||
property StreamMode: TfrStreamMode read fStreamMode write fStreamMode;
|
||||
property Restrictions:TlrRestrictions read FRestrictions write FRestrictions;
|
||||
property FindHighlight : boolean read FFindHighlight write FFindHighlight;
|
||||
property GapX:Integer read FGapX write FGapX;
|
||||
property GapY:Integer read FGapY write FGapY;
|
||||
published
|
||||
property Left: double read GetLeft write SetLeft;
|
||||
property Top: double read GetTop write SetTop;
|
||||
@ -452,6 +457,7 @@ type
|
||||
TextHeight: Integer;
|
||||
CurStrNo: Integer;
|
||||
Exporting: Boolean;
|
||||
FLineSpacing: Integer;
|
||||
|
||||
procedure ExpandVariables;
|
||||
procedure AssignFont(aCanvas: TCanvas);
|
||||
@ -475,7 +481,7 @@ type
|
||||
Adjust: Integer; // bit format xxxLLRAA: LL=Layout, R=Rotated, AA=Alignment
|
||||
Highlight: TfrHighlightAttr;
|
||||
HighlightStr: String;
|
||||
LineSpacing, CharacterSpacing: Integer;
|
||||
CharacterSpacing: Integer;
|
||||
LastLine: boolean; // are we painting/exporting the last line?
|
||||
FirstLine: boolean;
|
||||
|
||||
@ -510,6 +516,7 @@ type
|
||||
property OnMouseEnter : TfrScriptStrings read FOnMouseEnter write SetOnMouseEnter;
|
||||
property OnMouseLeave : TfrScriptStrings read FOnMouseLeave write SetOnMouseLeave;
|
||||
property ParagraphGap : integer read FParagraphGap write FParagraphGap;
|
||||
property LineSpacing : integer read FLineSpacing write FLineSpacing;
|
||||
end;
|
||||
|
||||
TfrMemoView = class(TfrCustomMemoView)
|
||||
@ -539,6 +546,9 @@ type
|
||||
property OnClick;
|
||||
property OnMouseEnter;
|
||||
property OnMouseLeave;
|
||||
property LineSpacing;
|
||||
property GapX;
|
||||
property GapY;
|
||||
end;
|
||||
|
||||
{ TfrBandView }
|
||||
@ -1035,6 +1045,7 @@ type
|
||||
procedure AddRec(ALineIndex: Integer; ARec: Pointer); virtual;
|
||||
function GetviewText(View:TfrView): string; virtual;
|
||||
function CheckView({%H-}View:TfrView): boolean; virtual;
|
||||
procedure AfterExport; virtual;
|
||||
public
|
||||
constructor Create(AStream: TStream); virtual;
|
||||
destructor Destroy; override;
|
||||
@ -1258,7 +1269,7 @@ type
|
||||
// report manipulation methods
|
||||
function DesignReport: Integer;
|
||||
function PrepareReport: Boolean;
|
||||
procedure ExportTo(FilterClass: TfrExportFilterClass; aFileName: String);
|
||||
function ExportTo(FilterClass: TfrExportFilterClass; aFileName: String):Boolean;
|
||||
procedure ShowReport;
|
||||
procedure ShowPreparedReport;
|
||||
procedure PrintPreparedReport(const PageNumbers: String; Copies: Integer);
|
||||
@ -1444,12 +1455,13 @@ function FindObjectProps(AObjStr:string; out frObj:TfrObject; out PropName:strin
|
||||
|
||||
const
|
||||
lrTemplatePath = 'LazReportTemplate/';
|
||||
frCurrentVersion = 28;
|
||||
frCurrentVersion = 29;
|
||||
// version 2.5: lazreport: added to binary stream ParentBandType variable
|
||||
// on TfrView, used to extend export facilities
|
||||
// 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.8. lazreport: added support for child bands
|
||||
// version 2.9. lazreport: added support LineSpacing and GapX, GapY
|
||||
|
||||
frSpecCount = 9;
|
||||
frSpecFuncs: Array[0..frSpecCount - 1] of String = ('PAGE#', '',
|
||||
@ -2473,6 +2485,8 @@ begin
|
||||
FTag := TfrView(Source).FTag;
|
||||
FURLInfo := TfrView(Source).FURLInfo;
|
||||
FRestrictions := TfrView(Source).FRestrictions;
|
||||
FGapX:=TfrView(Source).FGapX;
|
||||
FGapY:=TfrView(Source).FGapY;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2503,8 +2517,10 @@ begin
|
||||
wy1 := Round((FrameWidth * ScaleY - 1) / 2);
|
||||
wy2 := Round(FrameWidth * ScaleY / 2);
|
||||
fFrameWidth := FrameWidth * ScaleX;
|
||||
gapx := wx2 + 2;
|
||||
gapy := wy2 div 2 + 1;
|
||||
|
||||
InternalGapX := wx2 + 2 + FGapX;
|
||||
InternalGapY := wy2 div 2 + 1 + FGapY;
|
||||
|
||||
bx := x;
|
||||
by := y;
|
||||
bx1 := Round((SaveX + SaveDX) * ScaleX + OffsX);
|
||||
@ -2797,7 +2813,8 @@ begin
|
||||
Visible:=(Wb<>0);
|
||||
end;
|
||||
|
||||
if (frVersion >= 25) then begin
|
||||
if (frVersion >= 25) then
|
||||
begin
|
||||
I := 0;
|
||||
Read(I, 4);
|
||||
ParentBandType := TfrBandType(I);
|
||||
@ -2809,6 +2826,12 @@ begin
|
||||
FURLInfo := frReadString(Stream);
|
||||
end;
|
||||
|
||||
if frVersion >= 29 then
|
||||
begin
|
||||
Stream.Read(FGapX, SizeOf(FGapX));
|
||||
Stream.Read(FGapY, SizeOf(FGapX));
|
||||
end;
|
||||
|
||||
end;
|
||||
{$IFDEF DebugLR}
|
||||
DebugLn('%s.TfrView.LoadFromStream end Position=%d',[name, Stream.Position]);
|
||||
@ -2866,6 +2889,9 @@ begin
|
||||
S:=XML.GetValue(Path+'Frames/Restrictions/Value','');
|
||||
if S<>'' then
|
||||
RestoreProperty('Restrictions',S);
|
||||
|
||||
FGapX:=XML.GetValue(Path+'Data/GapX/Value', 0);
|
||||
FGapY:=XML.GetValue(Path+'Data/GapY/Value', 0);
|
||||
end;
|
||||
|
||||
procedure TfrView.SaveToStream(Stream: TStream);
|
||||
@ -2930,6 +2956,9 @@ begin
|
||||
FTmpS:=lrExpandVariables(FURLInfo);
|
||||
frWriteString(Stream, FTmpS);
|
||||
end;
|
||||
|
||||
Stream.Write(FGapX, SizeOf(FGapX));
|
||||
Stream.Write(FGapY, SizeOf(FGapX));
|
||||
end;
|
||||
{$IFDEF DebugLR}
|
||||
Debugln('%s.SaveToStream end',[name]);
|
||||
@ -2981,6 +3010,9 @@ begin
|
||||
|
||||
if IsPublishedProp(self,'Restrictions') then
|
||||
XML.SetValue(Path+'Frames/Restrictions/Value', GetSaveProperty('Restrictions'));
|
||||
|
||||
XML.SetValue(Path+'Data/GapX/Value', FGapX);
|
||||
XML.SetValue(Path+'Data/GapY/Value', FGapY);
|
||||
end;
|
||||
|
||||
procedure TfrView.Resized;
|
||||
@ -3584,7 +3616,7 @@ var
|
||||
SMemo.Add(str + Chr(w div 256) + Chr(w mod 256));
|
||||
Inc(size, size1);
|
||||
//!!
|
||||
maxWidth := dx - gapx - gapx;
|
||||
maxWidth := dx - InternalGapX - InternalGapX;
|
||||
end;
|
||||
|
||||
procedure WrapLine(const s: String);
|
||||
@ -3730,7 +3762,7 @@ var
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
size := y + gapy;
|
||||
size := y + InternalGapY;
|
||||
size1 := -WCanvas.Font.Height + LineSpacing;
|
||||
// maxWidth := dx - gapx - gapx;
|
||||
{$IFDEF DebugLR}
|
||||
@ -3739,13 +3771,13 @@ var
|
||||
{$ENDIF}
|
||||
for i := 0 to Memo1.Count - 1 do
|
||||
begin
|
||||
maxWidth := dx - gapx - gapx - FParagraphGap;
|
||||
maxWidth := dx - InternalGapX - InternalGapX - FParagraphGap;
|
||||
if (Flags and flWordWrap) <> 0 then
|
||||
WrapLine(Memo1[i])
|
||||
else
|
||||
OutLine(Memo1[i] + #1);
|
||||
end;
|
||||
VHeight := size - y + gapy;
|
||||
VHeight := size - y + InternalGapY;
|
||||
TextHeight := size1;
|
||||
{$IFDEF DebugLR}
|
||||
DebugLn('OutMemo E: Size=%d Size1=%d MaxWidth=%d DIM:%d %d %d %d gapxy:%d %d',
|
||||
@ -3760,9 +3792,9 @@ var
|
||||
begin
|
||||
h := Create90Font(WCanvas.Font);
|
||||
oldh := SelectObject(WCanvas.Handle, h);
|
||||
size := x + gapx;
|
||||
size := x + InternalGapX;
|
||||
size1 := -WCanvas.Font.Height + LineSpacing;
|
||||
maxwidth := dy - gapy - gapy;
|
||||
maxwidth := dy - InternalGapY - InternalGapY;
|
||||
for i := 0 to Memo1.Count - 1 do
|
||||
begin
|
||||
if (Flags and flWordWrap) <> 0 then
|
||||
@ -3773,7 +3805,7 @@ var
|
||||
|
||||
SelectObject(WCanvas.Handle, oldh);
|
||||
DeleteObject(h);
|
||||
VHeight := size - x + gapx;
|
||||
VHeight := size - x + InternalGapX;
|
||||
TextHeight := size1;
|
||||
end;
|
||||
|
||||
@ -3873,9 +3905,9 @@ var
|
||||
{$ENDIF}
|
||||
*)
|
||||
case Alignment of
|
||||
Classes.taLeftJustify : CurX :=x+gapx;
|
||||
Classes.taRightJustify: CurX :=x+dx-1-gapx-Canvas.TextWidth(St);
|
||||
Classes.taCenter : CurX :=x+gapx+(dx-gapx-gapx-Canvas.TextWidth(St)) div 2;
|
||||
Classes.taLeftJustify : CurX :=x+InternalGapX;
|
||||
Classes.taRightJustify: CurX :=x+dx-1-InternalGapX-Canvas.TextWidth(St);
|
||||
Classes.taCenter : CurX :=x+InternalGapX+(dx-InternalGapX-InternalGapX-Canvas.TextWidth(St)) div 2;
|
||||
end;
|
||||
|
||||
if not Exporting then
|
||||
@ -3883,9 +3915,9 @@ var
|
||||
if Justify and not LastLine then
|
||||
begin
|
||||
if FirstLine then
|
||||
CanvasTextRectJustify(Canvas, DR, x+gapx + FParagraphGap, x+dx-1-gapx, round(CurYf), St, true)
|
||||
CanvasTextRectJustify(Canvas, DR, x+InternalGapX + FParagraphGap, x+dx-1-InternalGapX, round(CurYf), St, true)
|
||||
else
|
||||
CanvasTextRectJustify(Canvas, DR, x+gapx, x+dx-1-gapx, round(CurYf), St, true)
|
||||
CanvasTextRectJustify(Canvas, DR, x+InternalGapX, x+dx-1-InternalGapX, round(CurYf), St, true)
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -3922,7 +3954,7 @@ var
|
||||
if Layout=tlBottom then
|
||||
y:=y+dy-VHeight;
|
||||
end;
|
||||
curyf := y + gapy;
|
||||
curyf := y + InternalGapY;
|
||||
|
||||
LineSpc := LineSpacing * ScaleY;
|
||||
// calc our reference at 100% and then scale it
|
||||
@ -3973,9 +4005,9 @@ var
|
||||
Canvas.TextStyle := Ts;
|
||||
|
||||
case Alignment of
|
||||
Classes.taLeftJustify : CurY :=y + dy-gapy;
|
||||
Classes.taRightJustify: CurY :=y + gapy + 1 + Canvas.TextWidth(str);
|
||||
Classes.taCenter : CurY :=y + gapy + (dy + Canvas.TextWidth(str)) div 2;
|
||||
Classes.taLeftJustify : CurY :=y + dy-InternalGapY;
|
||||
Classes.taRightJustify: CurY :=y + InternalGapY + 1 + Canvas.TextWidth(str);
|
||||
Classes.taCenter : CurY :=y + InternalGapY + (dy + Canvas.TextWidth(str)) div 2;
|
||||
end;
|
||||
if not Exporting then
|
||||
canvas.TextOut(curx,cury,str)
|
||||
@ -4002,7 +4034,7 @@ var
|
||||
else if Layout=tlBottom then
|
||||
x:=x+dx-VHeight;
|
||||
end;
|
||||
curx := x + gapx;
|
||||
curx := x + InternalGapX;
|
||||
th := -Canvas.Font.Height + Round(LineSpacing * ScaleY);
|
||||
CurStrNo := 0;
|
||||
for i := 0 to Memo1.Count - 1 do
|
||||
@ -4413,6 +4445,10 @@ begin
|
||||
Stream.Read(FParagraphGap, SizeOf(FParagraphGap));
|
||||
end;
|
||||
|
||||
if frVersion >= 29 then
|
||||
begin
|
||||
Stream.Read(FLineSpacing, SizeOf(FLineSpacing));
|
||||
end;
|
||||
end;
|
||||
|
||||
if frVersion = 21 then
|
||||
@ -4449,6 +4485,7 @@ begin
|
||||
|
||||
FDetailReport:= XML.GetValue(Path+'Data/DetailReport/Value', '');
|
||||
FParagraphGap:=XML.GetValue(Path+'Data/ParagraphGap/Value', 0);
|
||||
FLineSpacing:=XML.GetValue(Path+'Data/LineSpacing/Value', 2);
|
||||
end;
|
||||
|
||||
procedure TfrCustomMemoView.SaveToStream(Stream: TStream);
|
||||
@ -4490,6 +4527,7 @@ begin
|
||||
frWriteMemo(Stream, FOnMouseLeave);
|
||||
frWriteString(Stream, FDetailReport);
|
||||
Stream.Write(FParagraphGap, SizeOf(FParagraphGap));
|
||||
Stream.Write(FLineSpacing, SizeOf(FLineSpacing));
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -4521,6 +4559,7 @@ begin
|
||||
|
||||
XML.SetValue(Path+'Data/DetailReport/Value', FDetailReport);
|
||||
XML.SetValue(Path+'Data/ParagraphGap/Value', FParagraphGap);
|
||||
XML.SetValue(Path+'Data/LineSpacing/Value', FLineSpacing);
|
||||
end;
|
||||
|
||||
procedure TfrCustomMemoView.GetBlob(b: TfrTField);
|
||||
@ -6685,7 +6724,7 @@ begin
|
||||
// additionally, when objects are drawn, they are offseted t.gapy pixels
|
||||
// but this is object dependant, for TfrMemoView they are.
|
||||
if (t is TfrMemoView) then
|
||||
ty := ty + t.gapy;
|
||||
ty := ty + t.InternalGapY;
|
||||
|
||||
k := Max(TfrStretcheable(t).MinHeight, 1);
|
||||
pgArr[j] := Min(pgArr[j], ty + (newDy-ty) div k * k);
|
||||
@ -10788,7 +10827,8 @@ begin
|
||||
frProgressForm.ModalResult := mrOk;
|
||||
end;
|
||||
|
||||
procedure TfrReport.ExportTo(FilterClass: TfrExportFilterClass; aFileName: String);
|
||||
function TfrReport.ExportTo(FilterClass: TfrExportFilterClass; aFileName: String
|
||||
): Boolean;
|
||||
var
|
||||
s: String;
|
||||
i: Integer;
|
||||
@ -10846,10 +10886,15 @@ begin
|
||||
|
||||
fDefExportFilterClass := FCurrentFilter.ClassName;
|
||||
fDefExportFileName := aFileName;
|
||||
end;
|
||||
Result:=true;
|
||||
end
|
||||
else
|
||||
Result:=false;
|
||||
|
||||
FreeAndNil(FCurrentFilter);
|
||||
ExportStream.Free;
|
||||
if Result then
|
||||
FCurrentFilter.AfterExport;
|
||||
FreeAndNil(FCurrentFilter);
|
||||
end;
|
||||
|
||||
procedure TfrReport.FillQueryParams;
|
||||
@ -10926,12 +10971,12 @@ begin
|
||||
begin
|
||||
for i := 0 to Pages.Count - 1 do
|
||||
if Pages[i] is TfrPageReport then
|
||||
Pages[i].InitReport;
|
||||
Pages[i].InitReport;
|
||||
|
||||
PrepareDataSets;
|
||||
for i := 0 to Pages.Count - 1 do
|
||||
if Pages[i]is TfrPageReport then
|
||||
Pages[i].PrepareObjects;
|
||||
if Pages[i] is TfrPageReport then
|
||||
Pages[i].PrepareObjects;
|
||||
|
||||
repeat
|
||||
{$IFDEF DebugLR}
|
||||
@ -11969,6 +12014,11 @@ begin
|
||||
result := true;
|
||||
end;
|
||||
|
||||
procedure TfrExportFilter.AfterExport;
|
||||
begin
|
||||
// abstract method
|
||||
end;
|
||||
|
||||
procedure TfrExportFilter.OnBeginDoc;
|
||||
begin
|
||||
// abstract method
|
||||
|
@ -9,7 +9,7 @@ object frDesignerForm: TfrDesignerForm
|
||||
VertScrollBar.Range = 149
|
||||
ActiveControl = frDock1
|
||||
Caption = 'Designer'
|
||||
ClientHeight = 407
|
||||
ClientHeight = 405
|
||||
ClientWidth = 695
|
||||
KeyPreview = True
|
||||
Menu = MainMenu1
|
||||
@ -27,8 +27,8 @@ object frDesignerForm: TfrDesignerForm
|
||||
WindowState = wsMaximized
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 384
|
||||
Height = 25
|
||||
Top = 380
|
||||
Width = 695
|
||||
Panels = <
|
||||
item
|
||||
@ -47,12 +47,12 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object frDock1: TPanel
|
||||
Left = 0
|
||||
Height = 83
|
||||
Height = 80
|
||||
Top = 0
|
||||
Width = 695
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 83
|
||||
ClientHeight = 80
|
||||
ClientWidth = 695
|
||||
FullRepaint = False
|
||||
TabOrder = 0
|
||||
@ -862,78 +862,10 @@ object frDesignerForm: TfrDesignerForm
|
||||
Height = 24
|
||||
Top = 1
|
||||
Width = 22
|
||||
Action = edtUndo
|
||||
Align = alLeft
|
||||
Flat = True
|
||||
Glyph.Data = {
|
||||
36080000424D3608000000000000360000002800000020000000100000000100
|
||||
2000000000000008000064000000640000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000FFFBFFFF0000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000A5A2A5FFA50000FF000000000000000000000000000000000000
|
||||
000000000000FFFBFFFFFFFBFFFFFFFBFFFFFFFBFFFFFFFBFFFF000000000000
|
||||
00000000000000000000A5A2A5FFFFFBFFFF0000000000000000000000000000
|
||||
0000A50000FFA50000FFA50000FFA50000FFA50000FF00000000000000000000
|
||||
00000000000000000000A50000FFA5A2A5FF0000000000000000000000000000
|
||||
0000A5A2A5FFA5A2A5FFA5A2A5FFA5A2A5FFA5A2A5FF00000000000000000000
|
||||
00000000000000000000A5A2A5FF00000000FFFBFFFF00000000000000000000
|
||||
0000A50000FFA50000FFA50000FFA50000FF0000000000000000000000000000
|
||||
0000000000000000000000000000A50000FF0000000000000000000000000000
|
||||
0000A5A2A5FFA5A2A5FFA5A2A5FFA5A2A5FF0000000000000000000000000000
|
||||
0000000000000000000000000000A5A2A5FFFFFBFFFF00000000000000000000
|
||||
0000A50000FFA50000FFA50000FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000A50000FF0000000000000000000000000000
|
||||
0000A5A2A5FFA5A2A5FFA5A2A5FF00000000FFFBFFFF00000000000000000000
|
||||
0000000000000000000000000000A5A2A5FFFFFBFFFF00000000000000000000
|
||||
0000A50000FFA50000FF00000000A50000FF0000000000000000000000000000
|
||||
0000000000000000000000000000A50000FF0000000000000000000000000000
|
||||
0000A5A2A5FFA5A2A5FF00000000A5A2A5FF00000000FFFBFFFFFFFBFFFF0000
|
||||
0000000000000000000000000000A5A2A5FF0000000000000000000000000000
|
||||
0000A50000FF000000000000000000000000A50000FFA50000FF000000000000
|
||||
00000000000000000000A50000FFA5A2A5FF0000000000000000000000000000
|
||||
0000A5A2A5FF000000000000000000000000A5A2A5FFA5A2A5FF00000000FFFB
|
||||
FFFFFFFBFFFFFFFBFFFFA5A2A5FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000A50000FFA500
|
||||
00FFA50000FFA50000FFA5A2A5FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000A5A2A5FFA5A2
|
||||
A5FFA5A2A5FFA5A2A5FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000
|
||||
}
|
||||
NumGlyphs = 2
|
||||
OnClick = UndoBClick
|
||||
ShowCaption = False
|
||||
end
|
||||
object RedoB: TSpeedButton
|
||||
Tag = 48
|
||||
@ -941,78 +873,10 @@ object frDesignerForm: TfrDesignerForm
|
||||
Height = 24
|
||||
Top = 1
|
||||
Width = 22
|
||||
Action = edtRedo
|
||||
Align = alLeft
|
||||
Flat = True
|
||||
Glyph.Data = {
|
||||
36080000424D3608000000000000360000002800000020000000100000000100
|
||||
2000000000000008000064000000640000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000FFFBFFFF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000A50000FFA5A2A5FF000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000A5A2A5FFFFFBFFFF000000000000000000000000000000000000
|
||||
0000FFFBFFFFFFFBFFFFFFFBFFFFFFFBFFFFFFFBFFFF00000000000000000000
|
||||
0000A5A2A5FFA50000FF0000000000000000000000000000000000000000A500
|
||||
00FFA50000FFA50000FFA50000FFA50000FF0000000000000000000000000000
|
||||
000000000000A5A2A5FF0000000000000000000000000000000000000000A5A2
|
||||
A5FFA5A2A5FFA5A2A5FFA5A2A5FFA5A2A5FFFFFBFFFF00000000000000000000
|
||||
0000A50000FF0000000000000000000000000000000000000000000000000000
|
||||
0000A50000FFA50000FFA50000FFA50000FF0000000000000000000000000000
|
||||
0000A5A2A5FFFFFBFFFF00000000000000000000000000000000000000000000
|
||||
0000A5A2A5FFA5A2A5FFA5A2A5FFA5A2A5FFFFFBFFFF00000000000000000000
|
||||
0000A50000FF0000000000000000000000000000000000000000000000000000
|
||||
000000000000A50000FFA50000FFA50000FF0000000000000000000000000000
|
||||
0000A5A2A5FFFFFBFFFF00000000000000000000000000000000000000000000
|
||||
000000000000A5A2A5FFA5A2A5FFA5A2A5FFFFFBFFFF00000000000000000000
|
||||
0000A50000FF0000000000000000000000000000000000000000000000000000
|
||||
0000A50000FF00000000A50000FFA50000FF0000000000000000000000000000
|
||||
0000A5A2A5FF00000000FFFBFFFF00000000000000000000000000000000FFFB
|
||||
FFFFA5A2A5FF00000000A5A2A5FFA5A2A5FFFFFBFFFF00000000000000000000
|
||||
0000A5A2A5FFA50000FF00000000000000000000000000000000A50000FFA500
|
||||
00FF000000000000000000000000A50000FF0000000000000000000000000000
|
||||
000000000000A5A2A5FF00000000FFFBFFFFFFFBFFFFFFFBFFFFA5A2A5FFA5A2
|
||||
A5FF000000000000000000000000A5A2A5FF0000000000000000000000000000
|
||||
000000000000A5A2A5FFA50000FFA50000FFA50000FFA50000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000A5A2A5FFA5A2A5FFA5A2A5FFA5A2A5FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000
|
||||
}
|
||||
NumGlyphs = 2
|
||||
OnClick = RedoBClick
|
||||
ShowCaption = False
|
||||
end
|
||||
object HelpBtn: TSpeedButton
|
||||
Left = 431
|
||||
@ -1819,7 +1683,7 @@ object frDesignerForm: TfrDesignerForm
|
||||
object C2: TComboBox
|
||||
Tag = 7
|
||||
Left = 1
|
||||
Height = 33
|
||||
Height = 35
|
||||
Top = 2
|
||||
Width = 155
|
||||
ItemHeight = 13
|
||||
@ -2216,7 +2080,7 @@ object frDesignerForm: TfrDesignerForm
|
||||
object E1: TEdit
|
||||
Tag = 6
|
||||
Left = 4
|
||||
Height = 33
|
||||
Height = 31
|
||||
Top = 1
|
||||
Width = 31
|
||||
TabOrder = 0
|
||||
@ -2281,21 +2145,21 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object frDock2: TPanel
|
||||
Left = 0
|
||||
Height = 301
|
||||
Top = 83
|
||||
Height = 300
|
||||
Top = 80
|
||||
Width = 27
|
||||
Align = alLeft
|
||||
ClientHeight = 301
|
||||
ClientHeight = 300
|
||||
ClientWidth = 27
|
||||
FullRepaint = False
|
||||
TabOrder = 1
|
||||
object panForDlg: TPanel
|
||||
Left = 1
|
||||
Height = 299
|
||||
Height = 298
|
||||
Top = 1
|
||||
Width = 25
|
||||
Align = alClient
|
||||
ClientHeight = 299
|
||||
ClientHeight = 298
|
||||
ClientWidth = 25
|
||||
FullRepaint = False
|
||||
TabOrder = 1
|
||||
@ -2361,11 +2225,11 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 1
|
||||
Height = 299
|
||||
Height = 298
|
||||
Top = 1
|
||||
Width = 25
|
||||
Align = alClient
|
||||
ClientHeight = 299
|
||||
ClientHeight = 298
|
||||
ClientWidth = 25
|
||||
FullRepaint = False
|
||||
TabOrder = 0
|
||||
@ -2664,8 +2528,8 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object Tab1: TTabControl
|
||||
Left = 27
|
||||
Height = 301
|
||||
Top = 83
|
||||
Height = 300
|
||||
Top = 80
|
||||
Width = 641
|
||||
TabStop = False
|
||||
OnChange = Tab1Change
|
||||
@ -2678,24 +2542,24 @@ object frDesignerForm: TfrDesignerForm
|
||||
TabOrder = 2
|
||||
object panTab: TPanel
|
||||
Left = 2
|
||||
Height = 266
|
||||
Top = 33
|
||||
Height = 262
|
||||
Top = 36
|
||||
Width = 637
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
Caption = 'panTab'
|
||||
ClientHeight = 266
|
||||
ClientHeight = 262
|
||||
ClientWidth = 637
|
||||
TabOrder = 1
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Height = 266
|
||||
Height = 262
|
||||
Top = 0
|
||||
Width = 637
|
||||
HorzScrollBar.Page = 488
|
||||
VertScrollBar.Page = 174
|
||||
Align = alClient
|
||||
ClientHeight = 264
|
||||
ClientHeight = 260
|
||||
ClientWidth = 635
|
||||
Color = clGray
|
||||
ParentColor = False
|
||||
@ -3958,12 +3822,12 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object frDock4: TPanel
|
||||
Left = 668
|
||||
Height = 301
|
||||
Top = 83
|
||||
Height = 300
|
||||
Top = 80
|
||||
Width = 27
|
||||
Align = alRight
|
||||
Anchors = [akTop, akRight]
|
||||
ClientHeight = 301
|
||||
ClientHeight = 300
|
||||
ClientWidth = 27
|
||||
FullRepaint = False
|
||||
TabOrder = 3
|
||||
@ -4560,8 +4424,8 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object Popup1: TPopupMenu
|
||||
OnPopup = Popup1Popup
|
||||
left = 272
|
||||
top = 96
|
||||
left = 368
|
||||
top = 48
|
||||
object N2: TMenuItem
|
||||
Caption = ' '
|
||||
ShortCut = 16472
|
||||
@ -4579,7 +4443,6 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object N5: TMenuItem
|
||||
Caption = ' '
|
||||
ShortCut = 46
|
||||
OnClick = N5Click
|
||||
end
|
||||
object N16: TMenuItem
|
||||
@ -4597,8 +4460,8 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object MainMenu1: TMainMenu
|
||||
Images = ActionsImageList
|
||||
left = 208
|
||||
top = 88
|
||||
left = 320
|
||||
top = 48
|
||||
object FileMenu: TMenuItem
|
||||
Caption = '&File'
|
||||
object N23: TMenuItem
|
||||
@ -4758,14 +4621,10 @@ object frDesignerForm: TfrDesignerForm
|
||||
object EditMenu: TMenuItem
|
||||
Caption = '&Edit'
|
||||
object N46: TMenuItem
|
||||
Caption = 'Undo'
|
||||
ShortCut = 16474
|
||||
OnClick = UndoBClick
|
||||
Action = edtUndo
|
||||
end
|
||||
object N48: TMenuItem
|
||||
Caption = 'Redo'
|
||||
ShortCut = 16473
|
||||
OnClick = RedoBClick
|
||||
Action = edtRedo
|
||||
end
|
||||
object N47: TMenuItem
|
||||
Caption = '-'
|
||||
@ -4787,7 +4646,6 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object N27: TMenuItem
|
||||
Caption = 'Delete'
|
||||
ShortCut = 46
|
||||
OnClick = N5Click
|
||||
end
|
||||
object N28: TMenuItem
|
||||
@ -5115,8 +4973,8 @@ object frDesignerForm: TfrDesignerForm
|
||||
object ImgIndic: TImageList
|
||||
Height = 8
|
||||
Width = 8
|
||||
left = 328
|
||||
top = 96
|
||||
left = 584
|
||||
top = 8
|
||||
Bitmap = {
|
||||
4C69030000000800000008000000000000000000000000000000000000000000
|
||||
00000000000000000000000000FF0000000000F900FF00F900FF00F900FF00F9
|
||||
@ -5147,8 +5005,8 @@ object frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object actList: TActionList
|
||||
Images = ActionsImageList
|
||||
left = 560
|
||||
top = 36
|
||||
left = 640
|
||||
top = 8
|
||||
object acDuplicate: TAction
|
||||
Category = 'Edit'
|
||||
Caption = 'Duplicate object'
|
||||
@ -5196,12 +5054,24 @@ object frDesignerForm: TfrDesignerForm
|
||||
Caption = 'Data inspector'
|
||||
OnExecute = tlsDBFieldsExecute
|
||||
end
|
||||
object edtUndo: TAction
|
||||
Category = 'Edit'
|
||||
Caption = 'Undo'
|
||||
ImageIndex = 3
|
||||
OnExecute = edtUndoExecute
|
||||
end
|
||||
object edtRedo: TAction
|
||||
Category = 'Edit'
|
||||
Caption = 'Redo'
|
||||
ImageIndex = 4
|
||||
OnExecute = edtRedoExecute
|
||||
end
|
||||
end
|
||||
object ActionsImageList: TImageList
|
||||
left = 328
|
||||
top = 156
|
||||
left = 584
|
||||
top = 48
|
||||
Bitmap = {
|
||||
4C6903000000100000001000000000000000BD6931FFBD6931FFBD6931FFBD69
|
||||
4C6905000000100000001000000000000000BD6931FFBD6931FFBD6931FFBD69
|
||||
31FFBD6931FFBD6931FFBD6931FFBD6931FFBD6D39FFBD6D39FFBD6D39FFBD69
|
||||
39FFBD7139FF0000000000000000BD6931FFF7E7D6FFF7E7D6FFFFFFFFFFFFFF
|
||||
F7FFFFFFF7FFFFF7F7FFFFF7EFFFFFF7EFFFFFFFF7FFFFFFF7FFFFF7EFFFFFEF
|
||||
@ -5297,7 +5167,71 @@ object frDesignerForm: TfrDesignerForm
|
||||
F6FF8EDEF5FF89DCF5FF85DAF4FF80D9F4FF7AD7F3FF74D5F3FF70D3F2FFC2EA
|
||||
F8FF3594DAFFFFFFFF00FFFFFF002C86D8D12D88D8F72D87D8F72D88D8F72D88
|
||||
D8F72D88D8F72D88D8F72D88D8F72D88D8F72D88D8F72D88D8F72D87D8F72D88
|
||||
D8F72C86D8D1FFFFFF00FFFFFF00
|
||||
D8F72C86D8D1FFFFFF00FFFFFF00000000000000000000000000000000000000
|
||||
00000000000000A0C4FF00000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000009D
|
||||
BF1400A0C4FF00A0C4FF00000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000005797D1100A0
|
||||
C4FFADF3FBFF00A0C4FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000005797D1100A0C4FFADF3
|
||||
FBFF25E4FBFF00A0C4FF00A0C4FF13A1BEE7159FBBCF1BA1BBA4067A7C0B0000
|
||||
00000000000000000000000000000000000005797D1100A0C4FFADF3FBFF31E1
|
||||
F6FF20E3FAFF73ECFAFF6FEBFAFF6EE8F7FF6CE8F7F814A1BCD414A3C1D50579
|
||||
7D1C00000000000000000000000005797D0A00A0C4FFADF3FBFF2FE0F6FF32E2
|
||||
F7FF29DBF1FF2FE0F5FF29DBF1FF16CDE3FF36D9ECFF69E7F6FF41CEE3FE13A3
|
||||
C1E405797D32000000000000000000A0C4FFADF3FBFF2FE0F6FF32E2F8FF32E2
|
||||
F7FF32E2F7FF2FE0F5FF29DBF1FF1DD2E8FF1DD2E8FF1DD2E8FF36D9ECFF40CD
|
||||
E1FF16A1BDCA05797D0A0000000005797E1100A0C4FF79EDFBFF32E2F8FF2CDF
|
||||
F4FF04C0D6FF04C0D6FF04C0D6FF1DD2E8FF1DD2E8FF1DD2E8FF0BC8DFFF6AE5
|
||||
F3FF1BABC5F815A0BCCB000000000000000005797D1100A0C4FF76EDFBFF04C3
|
||||
DAFF76EDFBFF69EAF9FF69EAF9FF69EAF9FF69EAF9FF05DDF7FF0AC8DFFF07C2
|
||||
D8FF6FDCEBFF1BA3BFF400000000000000000000000005797D1100A0C4FF76ED
|
||||
FBFF76EDFBFF00A0C4FF00A0C4FF00A0C4FF00A0C4FF01A9C4FF6EE1EEFF0FC9
|
||||
DFFF69E4F2FF1AA4C0F80000000000000000000000000000000005797D1100A0
|
||||
C4FF76EDFBFF00A0C4FF000000000000000000A0C4300099B95000A0C4C96DE6
|
||||
F5FF76E2EFFF19A3C1FF00000000000000000000000000000000000000000000
|
||||
000000A0C4FF00A0C4FF00000000000000000000000000000000009EC11A02AC
|
||||
C8FF88E7F2FE11A2C2FF00000000000000000000000000000000000000000000
|
||||
00000000000000A0C4FF00000000000000000000000000000000000000000EAA
|
||||
CBFE5DDAE9FE23A6C0EF00000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000A0C42243C4
|
||||
DBFC43C5D8FE23A6C07F00000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000A0C45D66DB
|
||||
EAB211A6C2AE0000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000018A6C3691AA7
|
||||
C46900A0C4180000000000000000FFFFFF000000000000000000000000000000
|
||||
00000000000000000000000000000000000000A0C4FF00000000000000000000
|
||||
0000000000000000000000000000FFFFFF000000000000000000000000000000
|
||||
00000000000000000000000000000000000000A0C4FF00A0C4FF009DBF140000
|
||||
0000000000000000000000000000FFFFFF000000000000000000000000000000
|
||||
00000000000000000000000000000000000000A0C4FFADF3FBFF00A0C4FF0579
|
||||
7D11000000000000000000000000FFFFFF00000000000000000000000000067A
|
||||
7C0B1BA1BBA4159FBBCF13A1BEE700A0C4FF00A0C4FF25E4FBFFADF3FBFF00A0
|
||||
C4FF05797D110000000000000000FFFFFF00000000000000000005797D1C14A3
|
||||
C1D514A1BCD46CE8F7F86EE8F7FF6FEBFAFF73ECFAFF20E3FAFF31E1F6FFADF3
|
||||
FBFF00A0C4FF05797D1100000000FFFFFF000000000005797D3213A3C1E441CE
|
||||
E3FE69E7F6FF36D9ECFF16CDE3FF29DBF1FF2FE0F5FF29DBF1FF32E2F7FF2FE0
|
||||
F6FFADF3FBFF00A0C4FF05797D0AFFFFFF0005797D0A16A1BDCA40CDE1FF36D9
|
||||
ECFF1DD2E8FF1DD2E8FF1DD2E8FF29DBF1FF2FE0F5FF32E2F7FF32E2F7FF32E2
|
||||
F8FF2FE0F6FFADF3FBFF00A0C4FFFFFFFF0015A0BCCB1BABC5F86AE5F3FF0BC8
|
||||
DFFF1DD2E8FF1DD2E8FF1DD2E8FF04C0D6FF04C0D6FF04C0D6FF2CDFF4FF32E2
|
||||
F8FF79EDFBFF00A0C4FF05797E11FFFFFF001BA3BFF46FDCEBFF07C2D8FF0AC8
|
||||
DFFF05DDF7FF69EAF9FF69EAF9FF69EAF9FF69EAF9FF76EDFBFF04C3DAFF76ED
|
||||
FBFF00A0C4FF05797D1100000000FFFFFF001AA4C0F869E4F2FF0FC9DFFF6EE1
|
||||
EEFF01A9C4FF00A0C4FF00A0C4FF00A0C4FF00A0C4FF76EDFBFF76EDFBFF00A0
|
||||
C4FF05797D110000000000000000FFFFFF0019A3C1FF76E2EFFF6DE6F5FF00A0
|
||||
C4C90099B95000A0C430000000000000000000A0C4FF76EDFBFF00A0C4FF0579
|
||||
7D11000000000000000000000000FFFFFF0011A2C2FF88E7F2FE02ACC8FF009E
|
||||
C11A0000000000000000000000000000000000A0C4FF00A0C4FF000000000000
|
||||
0000000000000000000000000000FFFFFF0023A6C0EF5DDAE9FE0EAACBFE0000
|
||||
00000000000000000000000000000000000000A0C4FF00000000000000000000
|
||||
0000000000000000000000000000FFFFFF0023A6C07F43C5D8FE43C4DBFC00A0
|
||||
C422000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000FFFFFF000000000011A6C2AE66DBEAB200A0
|
||||
C45D000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000FFFFFF000000000000A0C4181AA7C46918A6
|
||||
C369000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@ -245,6 +245,8 @@ type
|
||||
|
||||
TfrDesignerForm = class(TfrReportDesigner)
|
||||
acDuplicate: TAction;
|
||||
edtRedo: TAction;
|
||||
edtUndo: TAction;
|
||||
MenuItem2: TMenuItem;
|
||||
tlsDBFields: TAction;
|
||||
FileBeforePrintScript: TAction;
|
||||
@ -431,6 +433,8 @@ type
|
||||
procedure acDuplicateExecute(Sender: TObject);
|
||||
procedure acToggleFramesExecute(Sender: TObject);
|
||||
procedure C2GetItems(Sender: TObject);
|
||||
procedure edtRedoExecute(Sender: TObject);
|
||||
procedure edtUndoExecute(Sender: TObject);
|
||||
procedure FileBeforePrintScriptExecute(Sender: TObject);
|
||||
procedure FileOpenExecute(Sender: TObject);
|
||||
procedure FilePreviewExecute(Sender: TObject);
|
||||
@ -490,8 +494,6 @@ type
|
||||
procedure Tab1Change(Sender: TObject);
|
||||
procedure N34Click(Sender: TObject);
|
||||
procedure GB3Click(Sender: TObject);
|
||||
procedure UndoBClick(Sender: TObject);
|
||||
procedure RedoBClick(Sender: TObject);
|
||||
//procedure N20Click(Sender: TObject);
|
||||
procedure PBox1Paint(Sender: TObject);
|
||||
procedure SB1Click(Sender: TObject);
|
||||
@ -3073,11 +3075,14 @@ begin
|
||||
FileSave.Hint:= sFRDesignerFormSaveRp;
|
||||
FilePreview.Hint := sFRDesignerFormPreview;
|
||||
|
||||
edtUndo.Caption := sFRDesignerForm_Undo;
|
||||
edtUndo.Hint := sFRDesignerFormUndo;
|
||||
edtRedo.Caption := sFRDesignerForm_Redo;
|
||||
edtRedo.Hint := sFRDesignerFormRedo;
|
||||
|
||||
CutB.Hint := sFRDesignerFormCut;
|
||||
CopyB.Hint := sFRDesignerFormCopy;
|
||||
PstB.Hint := sFRDesignerFormPast;
|
||||
UndoB.Hint := sFRDesignerFormUndo;
|
||||
RedoB.Hint := sFRDesignerFormRedo;
|
||||
ZB1.Hint := sFRDesignerFormBring;
|
||||
ZB2.Hint := sFRDesignerFormBack;
|
||||
SelAllB.Hint := sFRDesignerFormSelectAll;
|
||||
@ -3150,8 +3155,6 @@ begin
|
||||
N39.Caption := sFRDesignerForm_preview;
|
||||
N10.Caption := sFRDesignerForm_Exit;
|
||||
EditMenu.Caption := sFRDesignerForm_Edit2;
|
||||
N46.Caption := sFRDesignerForm_Undo;
|
||||
N48.Caption := sFRDesignerForm_Redo;
|
||||
N11.Caption := sFRDesignerForm_Cut;
|
||||
N12.Caption := sFRDesignerForm_Copy;
|
||||
N13.Caption := sFRDesignerForm_Paste;
|
||||
@ -3204,6 +3207,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.edtRedoExecute(Sender: TObject);
|
||||
begin
|
||||
Undo(@FRedoBuffer);
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.edtUndoExecute(Sender: TObject);
|
||||
begin
|
||||
Undo(@FUndoBuffer);
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.FileBeforePrintScriptExecute(Sender: TObject);
|
||||
begin
|
||||
EditorForm.View := nil;
|
||||
@ -3878,7 +3891,8 @@ begin
|
||||
t := TfrView(Objects[i]);
|
||||
if (t.Selected) and not (lrrDontDelete in T.Restrictions) and not (doChildComponent in T.DesignOptions) then
|
||||
begin
|
||||
ClipBd.Add(frCreateObject(t.Typ, t.ClassName, Page));
|
||||
// ClipBd.Add(frCreateObject(t.Typ, t.ClassName, Page));
|
||||
ClipBd.Add(frCreateObject(t.Typ, t.ClassName, nil));
|
||||
TfrView(ClipBd.Last).Assign(t);
|
||||
end;
|
||||
end;
|
||||
@ -5402,15 +5416,13 @@ end;
|
||||
procedure TfrDesignerForm.ClearUndoBuffer;
|
||||
begin
|
||||
ClearBuffer(FUndoBuffer, FUndoBufferLength);
|
||||
N46.Enabled := False;
|
||||
UndoB.Enabled := N46.Enabled;
|
||||
edtUndo.Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.ClearRedoBuffer;
|
||||
begin
|
||||
ClearBuffer(FRedoBuffer, FRedoBufferLength);
|
||||
N48.Enabled := False;
|
||||
RedoB.Enabled := N48.Enabled;
|
||||
edtRedo.Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.Undo(Buffer: PfrUndoBuffer);
|
||||
@ -5485,10 +5497,8 @@ begin
|
||||
|
||||
ResetSelection;
|
||||
PageView.Invalidate;
|
||||
N46.Enabled := FUndoBufferLength > 0;
|
||||
UndoB.Enabled := N46.Enabled;
|
||||
N48.Enabled := FRedoBufferLength > 0;
|
||||
RedoB.Enabled := N48.Enabled;
|
||||
edtUndo.Enabled := FUndoBufferLength > 0;
|
||||
edtRedo.Enabled := FRedoBufferLength > 0;
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.AddAction(Buffer: PfrUndoBuffer; a: TfrUndoAction; List: TFpList);
|
||||
@ -5549,14 +5559,12 @@ begin
|
||||
if Buffer = @FUndoBuffer then
|
||||
begin
|
||||
FUndoBufferLength := BufferLength + 1;
|
||||
N46.Enabled := True;
|
||||
UndoB.Enabled := True;
|
||||
edtUndo.Enabled := True;
|
||||
end
|
||||
else
|
||||
begin
|
||||
FRedoBufferLength := BufferLength + 1;
|
||||
N48.Enabled := True;
|
||||
RedoB.Enabled := True;
|
||||
edtRedo.Enabled := True;
|
||||
end;
|
||||
Modified := True;
|
||||
//FileModified := True;
|
||||
@ -5722,6 +5730,8 @@ procedure TfrDesignerForm.PstBClick(Sender: TObject); //paste
|
||||
var
|
||||
i, minx, miny: Integer;
|
||||
t, t1: TfrView;
|
||||
S: String;
|
||||
P: TObject;
|
||||
begin
|
||||
Unselect;
|
||||
SelNum := 0;
|
||||
@ -5760,16 +5770,6 @@ begin
|
||||
AddUndoAction(acInsert);
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.UndoBClick(Sender: TObject); // undo
|
||||
begin
|
||||
Undo(@FUndoBuffer);
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.RedoBClick(Sender: TObject); // redo
|
||||
begin
|
||||
Undo(@FRedoBuffer);
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.SelAllBClick(Sender: TObject); // select all
|
||||
begin
|
||||
PageView.NPEraseSelection;
|
||||
@ -6450,8 +6450,6 @@ begin
|
||||
// SetMenuItemBitmap(N39, FileBtn4);
|
||||
SetMenuItemBitmap(N10, ExitB);
|
||||
|
||||
SetMenuItemBitmap(N46, UndoB);
|
||||
SetMenuItemBitmap(N48, RedoB);
|
||||
SetMenuItemBitmap(N11, CutB);
|
||||
SetMenuItemBitmap(N12, CopyB);
|
||||
SetMenuItemBitmap(N13, PstB);
|
||||
|
Loading…
Reference in New Issue
Block a user