mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 03:12:32 +02:00
laz_xml: fixed TXMLConfig.Create(nil)
git-svn-id: trunk@31616 -
This commit is contained in:
parent
07768dff6b
commit
4c0026a1c7
@ -84,7 +84,7 @@ procedure TMyApplication.Test1;
|
||||
x1:=Laz_XMLCfg.TXMLConfig.Create(Filename)
|
||||
else
|
||||
x2:=Laz2_XMLCfg.TXMLConfig.Create(Filename);
|
||||
for i:=8 to 13 do begin
|
||||
for i:=1 to 130 do begin
|
||||
CheckValue('Item'+IntToStr(i)+'/Value',chr(i));
|
||||
end;
|
||||
CheckValue('AUmlaut/Value','Ä');
|
||||
|
@ -75,6 +75,7 @@ type
|
||||
CreateNodes: boolean = false): TDomNode;
|
||||
procedure InternalCleanNode(Node: TDomNode);
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
constructor Create(const AFilename: String); overload; // create and load
|
||||
constructor CreateClean(const AFilename: String); // create new
|
||||
constructor CreateWithSource(const AFilename, Source: String); // create new and load from Source
|
||||
@ -136,14 +137,19 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
constructor TXMLConfig.Create(const AFilename: String);
|
||||
constructor TXMLConfig.Create(AOwner: TComponent);
|
||||
begin
|
||||
//DebugLn(['TXMLConfig.Create ',AFilename]);
|
||||
{$IFDEF NewXMLCfg}
|
||||
// for compatibility with old TXMLConfig, which wrote #13 as #13, not as &xD;
|
||||
FReadFlags:=[xrfAllowLowerThanInAttributeValue,xrfAllowSpecialCharsInAttributeValue];
|
||||
// for compatibility with old TXMLConfig, which can not read &xD;, but needs #13
|
||||
FWriteFlags:=[xwfSpecialCharsInAttributeValue];
|
||||
{$ENDIF}
|
||||
inherited Create(AOwner);
|
||||
end;
|
||||
|
||||
constructor TXMLConfig.Create(const AFilename: String);
|
||||
begin
|
||||
inherited Create(nil);
|
||||
SetFilename(AFilename);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user