mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 23:19:29 +02:00
lazutils: txmlconfig.create(nil): set readflags
git-svn-id: trunk@35958 -
This commit is contained in:
parent
218272b7e0
commit
42ce8bcc1c
@ -68,6 +68,7 @@ type
|
||||
CreateNodes: boolean = false): TDomNode;
|
||||
procedure InternalCleanNode(Node: TDomNode);
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override; overload;
|
||||
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
|
||||
@ -130,10 +131,7 @@ implementation
|
||||
constructor TXMLConfig.Create(const AFilename: String);
|
||||
begin
|
||||
//DebugLn(['TXMLConfig.Create ',AFilename]);
|
||||
// for compatibility with old TXMLConfig, which wrote #13 as #13, not as &xD;
|
||||
FReadFlags:=[xrfAllowLowerThanInAttributeValue,xrfAllowSpecialCharsInAttributeValue];
|
||||
FWriteFlags:=[xwfSpecialCharsInAttributeValue];
|
||||
inherited Create(nil);
|
||||
Create(nil);
|
||||
SetFilename(AFilename);
|
||||
end;
|
||||
|
||||
@ -550,6 +548,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TXMLConfig.Create(AOwner: TComponent);
|
||||
begin
|
||||
// for compatibility with old TXMLConfig, which wrote #13 as #13, not as &xD;
|
||||
FReadFlags:=[xrfAllowLowerThanInAttributeValue,xrfAllowSpecialCharsInAttributeValue];
|
||||
FWriteFlags:=[xwfSpecialCharsInAttributeValue];
|
||||
inherited Create(AOwner);
|
||||
end;
|
||||
|
||||
procedure TXMLConfig.SetFilename(const AFilename: String);
|
||||
var
|
||||
cfg: TDOMElement;
|
||||
|
@ -48,7 +48,7 @@ uses
|
||||
contnrs, StringHashList, Translations, LResources,
|
||||
// codetools
|
||||
CodeToolsConfig, CodeToolManager, CodeCache, CodeToolsStructs, BasicCodeTools,
|
||||
FileProcs, Laz2_XMLCfg, laz2_XMLRead,
|
||||
FileProcs, Laz2_XMLCfg,
|
||||
// IDE Interface
|
||||
SrcEditorIntf, NewItemIntf, ProjectIntf, PackageIntf, CompOptsIntf,
|
||||
MenuIntf, IDEWindowIntf, PropEdits, MacroIntf, LazIDEIntf,
|
||||
@ -2233,7 +2233,6 @@ begin
|
||||
try
|
||||
XMLConfig:=TCodeBufXMLConfig.Create(nil);
|
||||
try
|
||||
XMLConfig.ReadFlags:=XMLConfig.ReadFlags+[xrfAllowLowerThanInAttributeValue];
|
||||
APackage.Filename:=AFilename;
|
||||
Result:=LoadXMLConfigFromCodeBuffer(AFilename,XMLConfig,
|
||||
Code,[lbfUpdateFromDisk,lbfRevert],ShowAbort);
|
||||
|
Loading…
Reference in New Issue
Block a user