lazreport: less notes

git-svn-id: trunk@36423 -
This commit is contained in:
mattias 2012-03-29 09:56:57 +00:00
parent 1ee76deb0d
commit 31ccf434af

View File

@ -459,7 +459,7 @@ type
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override; procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
procedure SaveToStream(Stream: TStream); override; procedure SaveToStream(Stream: TStream); override;
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override; procedure SaveToXML(XML: TLrXMLConfig; const Path: String); override;
procedure DefinePopupMenu(Popup: TPopupMenu); override; procedure DefinePopupMenu({%H-}Popup: TPopupMenu); override;
end; end;
{ TfrPictureView } { TfrPictureView }
@ -511,7 +511,7 @@ type
constructor Create; override; constructor Create; override;
procedure Draw(aCanvas: TCanvas); override; procedure Draw(aCanvas: TCanvas); override;
procedure DefinePopupMenu(Popup: TPopupMenu); override; procedure DefinePopupMenu({%H-}Popup: TPopupMenu); override;
function GetClipRgn(rt: TfrRgnType): HRGN; override; function GetClipRgn(rt: TfrRgnType): HRGN; override;
function PointInView(aX,aY: Integer): Boolean; override; function PointInView(aX,aY: Integer): Boolean; override;
@ -703,7 +703,7 @@ type
procedure ShowBandByType(bt: TfrBandType); procedure ShowBandByType(bt: TfrBandType);
procedure NewPage; procedure NewPage;
procedure NewColumn(Band: TfrBand); procedure NewColumn(Band: TfrBand);
procedure NextColumn(Band: TFrBand); procedure NextColumn({%H-}Band: TFrBand);
function RowsLayout: boolean; function RowsLayout: boolean;
procedure StartColumn; procedure StartColumn;
procedure StartRowsLayoutNonDataBand(Band: TfrBand); procedure StartRowsLayoutNonDataBand(Band: TfrBand);
@ -814,9 +814,9 @@ type
procedure Delete(Index: Integer); procedure Delete(Index: Integer);
procedure LoadFromStream(AStream: TStream); procedure LoadFromStream(AStream: TStream);
procedure AddPagesFromStream(AStream: TStream; AReadHeader: boolean=true); procedure AddPagesFromStream(AStream: TStream; AReadHeader: boolean=true);
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); procedure LoadFromXML({%H-}XML: TLrXMLConfig; const {%H-}Path: String);
procedure SaveToStream(AStream: TStream); procedure SaveToStream(AStream: TStream);
procedure SaveToXML(XML: TLrXMLConfig; const Path: String); procedure SaveToXML({%H-}XML: TLrXMLConfig; const {%H-}Path: String);
property Pages[Index: Integer]: PfrPageInfo read GetPages; default; property Pages[Index: Integer]: PfrPageInfo read GetPages; default;
property Count: Integer read GetCount; property Count: Integer read GetCount;
end; end;
@ -1051,16 +1051,16 @@ type
public public
Page: TfrPage; Page: TfrPage;
Modified: Boolean; Modified: Boolean;
procedure RegisterObject(ButtonBmp: TBitmap; const ButtonHint: String; procedure {%H-}RegisterObject(ButtonBmp: TBitmap; const ButtonHint: String;
ButtonTag: Integer); virtual; abstract; ButtonTag: Integer); virtual; abstract;
procedure RegisterTool(const MenuCaption: String; ButtonBmp: TBitmap; procedure {%H-}RegisterTool(const MenuCaption: String; ButtonBmp: TBitmap;
NotifyOnClick: TNotifyEvent); virtual; abstract; NotifyOnClick: TNotifyEvent); virtual; abstract;
procedure BeforeChange; virtual; abstract; procedure {%H-}BeforeChange; virtual; abstract;
procedure AfterChange; virtual; abstract; procedure {%H-}AfterChange; virtual; abstract;
procedure RedrawPage; virtual; abstract; procedure {%H-}RedrawPage; virtual; abstract;
// //
function PointsToUnits(x: Integer): Double; virtual; abstract; function {%H-}PointsToUnits(x: Integer): Double; virtual; abstract;
function UnitsToPoints(x: Double): Integer; virtual; abstract; function {%H-}UnitsToPoints(x: Double): Integer; virtual; abstract;
end; end;
TfrDataManager = class(TObject) TfrDataManager = class(TObject)
@ -4063,7 +4063,7 @@ end;
procedure TfrSubReportView.LoadFromXML(XML: TLrXMLConfig; const Path: String); procedure TfrSubReportView.LoadFromXML(XML: TLrXMLConfig; const Path: String);
begin begin
inherited LoadFromXML(XML, Path); inherited LoadFromXML(XML, Path);
SubPage := XML.GetValue(Path+'SubPage/Value', 0); // todo chk SubPage := XML.GetValue(Path+'SubPage/Value'{%H-}, 0); // todo chk
end; end;
procedure TfrSubReportView.SaveToStream(Stream: TStream); procedure TfrSubReportView.SaveToStream(Stream: TStream);
@ -4075,7 +4075,7 @@ end;
procedure TfrSubReportView.SaveToXML(XML: TLrXMLConfig; const Path: String); procedure TfrSubReportView.SaveToXML(XML: TLrXMLConfig; const Path: String);
begin begin
inherited SaveToXML(XML, Path); inherited SaveToXML(XML, Path);
XML.SetValue(Path+'SubPage/Value', SubPage); XML.SetValue(Path+'SubPage/Value'{%H-}, SubPage);
end; end;
{----------------------------------------------------------------------------} {----------------------------------------------------------------------------}
@ -4109,10 +4109,7 @@ var
procedure PrintBitmap(DestRect: TRect; Bitmap: TBitmap); procedure PrintBitmap(DestRect: TRect; Bitmap: TBitmap);
var var
BitmapHeader: pBitmapInfo; {%H-}BitmapHeader: pBitmapInfo;
BitmapImage: Pointer;
HeaderSize: DWord;
ImageSize: DWord;
begin begin
aCanvas.StretchDraw(DestRect, Bitmap); aCanvas.StretchDraw(DestRect, Bitmap);
//** //**
@ -4231,11 +4228,11 @@ var
end; end;
end; end;
begin begin
XML.SetValue(Path+'Size/Value', Stream.Size); XML.SetValue(Path+'Size/Value'{%H-}, Stream.Size);
SetLength(S, Stream.Size*2); SetLength(S, Stream.Size*2);
c := 1; c := 1;
for i:=1 to Stream.Size div SizeOf(Buf) do begin for i:=1 to Stream.Size div SizeOf(Buf) do begin
Stream.Read(Buf, SizeOf(buf)); Stream.Read(Buf{%H-}, SizeOf(buf));
WriteBuf(SizeOf(Buf)); WriteBuf(SizeOf(Buf));
end; end;
i := Stream.Size mod SizeOf(Buf); i := Stream.Size mod SizeOf(Buf);
@ -4249,10 +4246,10 @@ end;
procedure XMLToStream(XML: TLrXMLConfig; Path: String; Stream: TStream); procedure XMLToStream(XML: TLrXMLConfig; Path: String; Stream: TStream);
var var
S: String; S: String;
i,Size,cd: integer; i,Size,{%H-}cd: integer;
B: Byte; B: Byte;
begin begin
Size := XML.GetValue(Path+'Size/Value', 0); Size := XML.GetValue(Path+'Size/Value'{%H-}, 0);
if Size>0 then begin if Size>0 then begin
S := XML.GetValue(Path+'Data/Value', ''); S := XML.GetValue(Path+'Data/Value', '');
if S<>'' then if S<>'' then
@ -4267,11 +4264,10 @@ procedure TfrPictureView.LoadFromStream(Stream: TStream);
var var
b: Byte; b: Byte;
n: Integer; n: Integer;
AGraphicClass: TGraphicClass;
Graphic: TGraphic; Graphic: TGraphic;
Ext: string;
begin begin
inherited LoadFromStream(Stream); inherited LoadFromStream(Stream);
b := 0;
Stream.Read(b, 1); Stream.Read(b, 1);
if b=pkAny then if b=pkAny then
@ -4281,6 +4277,7 @@ begin
FSharedName := Stream.ReadAnsiString; FSharedName := Stream.ReadAnsiString;
n := 0;
Stream.Read(n, 4); Stream.Read(n, 4);
Picture.Graphic := Graphic; Picture.Graphic := Graphic;
@ -4314,7 +4311,7 @@ begin
inherited LoadFromXML(XML, Path); inherited LoadFromXML(XML, Path);
SharedName := XML.GetValue(Path+'Picture/SharedName/Value',''); SharedName := XML.GetValue(Path+'Picture/SharedName/Value','');
b := XML.GetValue(Path+'Picture/Type/Value', pkNone); b := XML.GetValue(Path+'Picture/Type/Value'{%H-}, pkNone);
Ext := XML.GetValue(Path+'Picture/Type/Ext', ''); Ext := XML.GetValue(Path+'Picture/Type/Ext', '');
M := nil; M := nil;
@ -4376,14 +4373,13 @@ end;
procedure TfrPictureView.SaveToXML(XML: TLrXMLConfig; const Path: String); procedure TfrPictureView.SaveToXML(XML: TLrXMLConfig; const Path: String);
var var
b: Byte; b: Byte;
n, o: Integer;
m: TMemoryStream; m: TMemoryStream;
begin begin
inherited SaveToXML(XML, Path); inherited SaveToXML(XML, Path);
b := GetPictureType; b := GetPictureType;
XML.SetValue(Path+'Picture/SharedName/Value', SharedName); XML.SetValue(Path+'Picture/SharedName/Value', SharedName);
XML.SetValue(Path+'Picture/Type/Value', b); XML.SetValue(Path+'Picture/Type/Value'{%H-}, b);
if b <> pkNone then if b <> pkNone then
begin begin
XML.SetValue(Path+'Picture/Type/Ext', XML.SetValue(Path+'Picture/Type/Ext',
@ -4660,7 +4656,7 @@ end;
function TfrLineView.PointInView(aX, aY: Integer): Boolean; function TfrLineView.PointInView(aX, aY: Integer): Boolean;
var var
bx, by, bx1, by1, w1, w2: Integer; bx, by, bx1, by1, w1: Integer;
begin begin
if FrameStyle=frsDouble then if FrameStyle=frsDouble then
w1 := Round(FrameWidth * 1.5) w1 := Round(FrameWidth * 1.5)
@ -5194,6 +5190,7 @@ begin
{$ENDIF} {$ENDIF}
end; end;
end; end;
Result := true;
end; end;
procedure TfrBand.DrawPageBreak; procedure TfrBand.DrawPageBreak;
@ -6581,8 +6578,6 @@ var
var var
WasPrinted: Boolean; WasPrinted: Boolean;
b, b1, b2: TfrBand; b, b1, b2: TfrBand;
BM : Pointer;
procedure InitGroups(b: TfrBand); procedure InitGroups(b: TfrBand);
begin begin
while b <> nil do while b <> nil do
@ -6861,12 +6856,14 @@ begin
Read(pgSize, 4); Read(pgSize, 4);
Read(dx, 4); //Width Read(dx, 4); //Width
Read(dy, 4); //Height Read(dy, 4); //Height
Read(Rc, Sizeof(Rc)); Read(Rc{%H-}, Sizeof(Rc));
Margins.AsRect:=Rc; Margins.AsRect:=Rc;
b := 0;
Read(b, 1); Read(b, 1);
Orientation:=TPrinterOrientation(b); Orientation:=TPrinterOrientation(b);
if frVersion < 23 then if frVersion < 23 then
Read(s[1], 6); Read({%H-}s[1], 6);
Bool := false;
Read(Bool, 2); Read(Bool, 2);
PrintToPrevPage:=Bool; PrintToPrevPage:=Bool;
Read(Bool, 2); Read(Bool, 2);
@ -6886,9 +6883,9 @@ var
begin begin
inherited LoadFromXML(XML,Path); inherited LoadFromXML(XML,Path);
dx := XML.GetValue(Path+'Width/Value', 0); // TODO chk dx := XML.GetValue(Path+'Width/Value'{%H-}, 0); // TODO chk
dy := XML.GetValue(Path+'Height/Value', 0); // TODO chk dy := XML.GetValue(Path+'Height/Value'{%H-}, 0); // TODO chk
b := XML.GetValue(Path+'Height/PageType', ord(PageType)); b := XML.GetValue(Path+'Height/PageType'{%H-}, ord(PageType));
PageType:=TfrPageType(b); PageType:=TfrPageType(b);
end; end;
@ -6921,9 +6918,9 @@ end;
procedure TfrPage.SavetoXML(XML: TLrXMLConfig; const Path: String); procedure TfrPage.SavetoXML(XML: TLrXMLConfig; const Path: String);
begin begin
Inherited SavetoXML(XML,Path); Inherited SavetoXML(XML,Path);
XML.SetValue(Path+'Width/Value', Width); XML.SetValue(Path+'Width/Value'{%H-}, Width);
XML.SetValue(Path+'Height/Value', Height); XML.SetValue(Path+'Height/Value'{%H-}, Height);
XML.SetValue(Path+'Height/PageType', ord(PageType)); XML.SetValue(Path+'Height/PageType'{%H-}, ord(PageType));
end; end;
{-----------------------------------------------------------------------} {-----------------------------------------------------------------------}
@ -7055,16 +7052,14 @@ begin
AddObject(b, ''); AddObject(b, '');
t.LoadFromStream(Stream); t.LoadFromStream(Stream);
if AnsiUpperCase(s) = 'TFRFRAMEDMEMOVIEW' then if AnsiUpperCase(s) = 'TFRFRAMEDMEMOVIEW' then
Stream.Read(buf[1], 8); Stream.Read({%H-}buf[1], 8);
end; end;
end; end;
end; end;
procedure TfrPages.LoadFromXML(XML: TLrXMLConfig; const Path: String); procedure TfrPages.LoadFromXML(XML: TLrXMLConfig; const Path: String);
var var
b: Byte;
t: TfrView; t: TfrView;
s: string;
procedure AddObject(aPage: TFrPage; ot: Byte; clname: String); procedure AddObject(aPage: TFrPage; ot: Byte; clname: String);
begin begin
aPage.Objects.Add(frCreateObject(ot, clname)); aPage.Objects.Add(frCreateObject(ot, clname));
@ -7079,11 +7074,11 @@ begin
{$IFDEF DebugLR} {$IFDEF DebugLR}
DebugLn('TfrPages.LoadFromXML: LoadingFrom: ', Path); DebugLn('TfrPages.LoadFromXML: LoadingFrom: ', Path);
{$ENDIF} {$ENDIF}
Parent.PrintToDefault:= XML.GetValue(Path+'PrintToDefault/Value', True); Parent.PrintToDefault:= XML.GetValue(Path+'PrintToDefault/Value'{%H-}, True);
Parent.DoublePass := XML.GetValue(Path+'DoublePass/Value', False); // TODO: check default Parent.DoublePass := XML.GetValue(Path+'DoublePass/Value'{%H-}, False); // TODO: check default
clName := XML.GetValue(Path+'SelectedPrinter/Value',''); clName := XML.GetValue(Path+'SelectedPrinter/Value','');
Parent.SetPrinterTo(clName); // TODO: check default Parent.SetPrinterTo(clName); // TODO: check default
aCount := XML.GetValue(Path+'PageCount/Value', 0); aCount := XML.GetValue(Path+'PageCount/Value'{%H-}, 0);
for i := 0 to aCount - 1 do // adding pages at first for i := 0 to aCount - 1 do // adding pages at first
begin begin
aPath := Path+'Page'+IntToStr(i+1)+'/'; aPath := Path+'Page'+IntToStr(i+1)+'/';
@ -7091,7 +7086,7 @@ begin
add(clName); add(clName);
Pages[i].LoadFromXML(XML, aPath); Pages[i].LoadFromXML(XML, aPath);
oCount := XML.GetValue(aPath+'ObjectCount/Value', 0); oCount := XML.GetValue(aPath+'ObjectCount/Value'{%H-}, 0);
for j:=0 to oCount - 1 do for j:=0 to oCount - 1 do
begin begin
aSubPath := aPath + 'Object'+IntTostr(j+1)+'/'; aSubPath := aPath + 'Object'+IntTostr(j+1)+'/';
@ -7121,7 +7116,6 @@ var
b: Byte; b: Byte;
i, j: Integer; i, j: Integer;
t: TfrView; t: TfrView;
S:string;
begin begin
Stream.Write(Parent.PrintToDefault, 2); Stream.Write(Parent.PrintToDefault, 2);
Stream.Write(Parent.DoublePass, 2); Stream.Write(Parent.DoublePass, 2);
@ -7161,20 +7155,19 @@ end;
procedure TfrPages.SavetoXML(XML: TLrXMLConfig; const Path: String); procedure TfrPages.SavetoXML(XML: TLrXMLConfig; const Path: String);
var var
b: Byte;
i, j: Integer; i, j: Integer;
t: TfrView; t: TfrView;
aPath,aSubPath: String; aPath,aSubPath: String;
begin begin
XML.SetValue(Path+'PrintToDefault/Value', Parent.PrintToDefault); XML.SetValue(Path+'PrintToDefault/Value'{%H-}, Parent.PrintToDefault);
XML.SetValue(Path+'DoublePass/Value', Parent.DoublePass); XML.SetValue(Path+'DoublePass/Value'{%H-}, Parent.DoublePass);
XML.SetValue(Path+'SelectedPrinter/Value', Prn.Printers[Prn.PrinterIndex]); XML.SetValue(Path+'SelectedPrinter/Value', Prn.Printers[Prn.PrinterIndex]);
XML.SetValue(Path+'PageCount/Value', Count); XML.SetValue(Path+'PageCount/Value'{%H-}, Count);
for i := 0 to Count - 1 do // adding pages at first for i := 0 to Count - 1 do // adding pages at first
begin begin
aPath := Path+'Page'+IntToStr(i+1)+'/'; aPath := Path+'Page'+IntToStr(i+1)+'/';
Pages[i].SaveToXML(XML, aPath); Pages[i].SaveToXML(XML, aPath);
XML.SetValue(aPath+'ObjectCount/Value', Pages[i].Objects.count); XML.SetValue(aPath+'ObjectCount/Value'{%H-}, Pages[i].Objects.count);
for j:=0 to Pages[i].Objects.count - 1 do for j:=0 to Pages[i].Objects.count - 1 do
begin begin
aSubPath := aPath + 'Object'+IntTostr(j+1)+'/'; aSubPath := aPath + 'Object'+IntTostr(j+1)+'/';
@ -7299,6 +7292,7 @@ begin
Stream.Read(frVersion, 1); Stream.Read(frVersion, 1);
while Stream.Position < Stream.Size do while Stream.Position < Stream.Size do
begin begin
b := 0;
Stream.Read(b, 1); Stream.Read(b, 1);
if b = gtAddIn then if b = gtAddIn then
s := ReadString(Stream) else s := ReadString(Stream) else
@ -7329,6 +7323,7 @@ begin
Stream.Read(frVersion, 1); Stream.Read(frVersion, 1);
while Stream.Position < Stream.Size do while Stream.Position < Stream.Size do
begin begin
b := 0;
Stream.Read(b, 1); Stream.Read(b, 1);
if b = gtAddIn then if b = gtAddIn then
s := ReadString(Stream) s := ReadString(Stream)
@ -7416,8 +7411,6 @@ var
i, o, c: Integer; i, o, c: Integer;
b, compr: Byte; b, compr: Byte;
p: PfrPageInfo; p: PfrPageInfo;
s: TMemoryStream;
procedure ReadVersion22; procedure ReadVersion22;
var var
Pict: TfrPictureView; Pict: TfrPictureView;
@ -7463,6 +7456,7 @@ var
begin begin
Clear; Clear;
compr := 0;
AStream.Read(compr, 1); AStream.Read(compr, 1);
if not (compr in [0, 1, 255]) then if not (compr in [0, 1, 255]) then
begin begin
@ -7483,6 +7477,7 @@ var
begin begin
if AReadHeader then begin if AReadHeader then begin
compr := 0;
AStream.Read(compr, 1); AStream.Read(compr, 1);
if not (compr in [0, 1, 255]) then if not (compr in [0, 1, 255]) then
begin begin
@ -7490,9 +7485,11 @@ begin
end; end;
end; end;
Parent.SetPrinterTo(frReadString(AStream)); Parent.SetPrinterTo(frReadString(AStream));
c := 0;
AStream.Read(c, 4); AStream.Read(c, 4);
i := 0; i := 0;
repeat repeat
o := 0;
AStream.Read(o, 4); AStream.Read(o, 4);
GetMem(p, SizeOf(TfrPageInfo)); GetMem(p, SizeOf(TfrPageInfo));
FillChar(p^, SizeOf(TfrPageInfo), #0); FillChar(p^, SizeOf(TfrPageInfo), #0);
@ -7502,6 +7499,7 @@ begin
AStream.Read(pgSize, 2); AStream.Read(pgSize, 2);
AStream.Read(pgWidth, 4); AStream.Read(pgWidth, 4);
AStream.Read(pgHeight, 4); AStream.Read(pgHeight, 4);
b := 0;
AStream.Read(b, 1); AStream.Read(b, 1);
pgOr := TPrinterOrientation(b); pgOr := TPrinterOrientation(b);
AStream.Read(b, 1); AStream.Read(b, 1);
@ -7629,13 +7627,13 @@ var
i: integer; i: integer;
aSubPath: String; aSubPath: String;
begin begin
XML.SetValue(Path+'Count/Value', FItems.Count); XML.SetValue(Path+'Count/Value'{%H-}, FItems.Count);
for i:= 0 to FItems.Count-1 do for i:= 0 to FItems.Count-1 do
with Objects[i] do with Objects[i] do
begin begin
aSubPath := Path+'Objects'+InttoStr(i+1)+'/'; aSubPath := Path+'Objects'+InttoStr(i+1)+'/';
XML.SetValue(aSubPath+'Typ/Value', Ord(Typ)); XML.SetValue(aSubPath+'Typ/Value'{%H-}, Ord(Typ));
XML.SetValue(aSubPath+'OtherKind/Value', OtherKind); XML.SetValue(aSubPath+'OtherKind/Value'{%H-}, OtherKind);
XML.SetValue(aSubPath+'Dataset/Value', DataSet); XML.SetValue(aSubPath+'Dataset/Value', DataSet);
XML.SetValue(aSubPath+'Field/Value', Field); XML.SetValue(aSubPath+'Field/Value', Field);
XML.SetValue(aSubPath+'Item/Value', FItems[i]); XML.SetValue(aSubPath+'Item/Value', FItems[i]);
@ -7650,6 +7648,7 @@ var
var var
n: Byte; n: Byte;
begin begin
n := 0;
Stream.Read(n, 1); Stream.Read(n, 1);
SetLength(Result, n); SetLength(Result, n);
Stream.Read(Result[1], n); Stream.Read(Result[1], n);
@ -7660,6 +7659,7 @@ begin
FItems.Sorted := False; FItems.Sorted := False;
with Stream do with Stream do
begin begin
n := 0;
ReadBuffer(n, SizeOf(n)); ReadBuffer(n, SizeOf(n));
for i := 0 to n - 1 do for i := 0 to n - 1 do
begin begin
@ -7683,15 +7683,15 @@ var
begin begin
clear; clear;
FItems.Sorted := False; FItems.Sorted := False;
n := XML.GetValue(Path+'Count/Value', 0); n := XML.GetValue(Path+'Count/Value'{%H-}, 0);
for i:= 0 to n - 1 do for i:= 0 to n - 1 do
begin begin
j := AddValue; j := AddValue;
with Objects[j] do with Objects[j] do
begin begin
aSubPath := Path+'Objects'+InttoStr(i+1)+'/'; aSubPath := Path+'Objects'+InttoStr(i+1)+'/';
Typ := TfrValueType(XML.GetValue(aSubPath+'Typ/Value', 0)); // TODO check default value Typ := TfrValueType(XML.GetValue(aSubPath+'Typ/Value'{%H-}, 0)); // TODO check default value
OtherKind := XML.GetValue( aSubPath+'OtherKind/Value', 0); // TODO check default value OtherKind := XML.GetValue( aSubPath+'OtherKind/Value'{%H-}, 0); // TODO check default value
DataSet := XML.GetValue(aSubPath+'Dataset/Value', ''); // TODO check default value DataSet := XML.GetValue(aSubPath+'Dataset/Value', ''); // TODO check default value
Field := XML.GetValue(aSubPath+'Field/Value', ''); // TODO check default value Field := XML.GetValue(aSubPath+'Field/Value', ''); // TODO check default value
FItems[j] := XML.GetValue(aSubPath+'Item/Value', ''); // TODO check default value FItems[j] := XML.GetValue(aSubPath+'Item/Value', ''); // TODO check default value
@ -7821,6 +7821,7 @@ procedure TfrReport.ReadBinaryData(Stream: TStream);
var var
n: Integer; n: Integer;
begin begin
n := 0;
Stream.Read(n, 4); // version Stream.Read(n, 4); // version
if FStoreInDFM then if FStoreInDFM then
begin begin
@ -7870,8 +7871,6 @@ procedure TfrReport.InternalOnGetValue(ParName: String; var ParValue: String);
var var
i, j, AFormat: Integer; i, j, AFormat: Integer;
AFormatStr: String; AFormatStr: String;
V : Variant;
ValStr: String;
begin begin
SubValue := ''; SubValue := '';
AFormat := CurView.Format; AFormat := CurView.Format;
@ -8214,7 +8213,7 @@ var
ATitle: string; ATitle: string;
begin begin
CurReport := Self; CurReport := Self;
frVersion := XML.GetValue(Path+'Version/Value', 21); frVersion := XML.GetValue(Path+'Version/Value'{%H-}, 21);
fComments.Text := XML.GetValue(Path+'Comments/Value', ''); fComments.Text := XML.GetValue(Path+'Comments/Value', '');
fKeyWords := XML.GetValue(Path+'KeyWords/Value', ''); fKeyWords := XML.GetValue(Path+'KeyWords/Value', '');
fSubject := XML.GetValue(Path+'Subject/Value', ''); fSubject := XML.GetValue(Path+'Subject/Value', '');
@ -8327,7 +8326,7 @@ procedure TfrReport.SavetoXML(XML: TLrXMLConfig; const Path: String);
begin begin
CurReport := Self; CurReport := Self;
frVersion := frCurrentVersion; frVersion := frCurrentVersion;
XML.SetValue(Path+'Version/Value', frVersion); XML.SetValue(Path+'Version/Value'{%H-}, frVersion);
XML.SetValue(Path+'Title/Value', fTitle); XML.SetValue(Path+'Title/Value', fTitle);
XML.SetValue(Path+'Subject/Value', fSubject); XML.SetValue(Path+'Subject/Value', fSubject);
@ -8443,7 +8442,9 @@ begin
if Load then if Load then
begin begin
ReadMemo(Stream, fm); ReadMemo(Stream, fm);
pos := 0;
Stream.Read(pos, 4); Stream.Read(pos, 4);
b := 0;
Stream.Read(b, 1); Stream.Read(b, 1);
if b <> 0 then if b <> 0 then
fb.LoadFromStream(Stream); fb.LoadFromStream(Stream);