|
@@ -95,13 +95,35 @@ procedure Register;
|
|
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
|
|
-uses LCLType;
|
|
|
|
|
|
|
+uses LCLType, XMLRead;
|
|
|
|
|
|
|
|
procedure Register;
|
|
procedure Register;
|
|
|
begin
|
|
begin
|
|
|
RegisterComponents('BGRA Themes', [TBGRASVGImageList]);
|
|
RegisterComponents('BGRA Themes', [TBGRASVGImageList]);
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
+{$IF FPC_FULLVERSION < 30203}
|
|
|
|
|
+type
|
|
|
|
|
+
|
|
|
|
|
+ { TPatchedXMLConfig }
|
|
|
|
|
+
|
|
|
|
|
+ TPatchedXMLConfig = class(TXMLConfig)
|
|
|
|
|
+ public
|
|
|
|
|
+ procedure LoadFromStream(S : TStream); reintroduce;
|
|
|
|
|
+ end;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+{ TPatchedXMLConfig }
|
|
|
|
|
+
|
|
|
|
|
+procedure TPatchedXMLConfig.LoadFromStream(S: TStream);
|
|
|
|
|
+begin
|
|
|
|
|
+ FreeAndNil(Doc);
|
|
|
|
|
+ ReadXMLFile(Doc,S);
|
|
|
|
|
+ FModified := False;
|
|
|
|
|
+ if (Doc.DocumentElement.NodeName<>RootName) then
|
|
|
|
|
+ raise EXMLConfigError.CreateFmt(SWrongRootName,[RootName,Doc.DocumentElement.NodeName]);
|
|
|
|
|
+end;
|
|
|
|
|
+{$ENDIF}
|
|
|
{ TBGRASVGImageList }
|
|
{ TBGRASVGImageList }
|
|
|
|
|
|
|
|
procedure TBGRASVGImageList.ReadData(Stream: TStream);
|
|
procedure TBGRASVGImageList.ReadData(Stream: TStream);
|
|
@@ -140,7 +162,7 @@ begin
|
|
|
FDataLineBreak:= GetLineEnding(Stream);
|
|
FDataLineBreak:= GetLineEnding(Stream);
|
|
|
// Actually load the XML file
|
|
// Actually load the XML file
|
|
|
Stream.Position := 0;
|
|
Stream.Position := 0;
|
|
|
- FXMLConf.LoadFromStream(Stream);
|
|
|
|
|
|
|
+ {$IF FPC_FULLVERSION < 30203}TPatchedXMLConfig(FXMLConf){$ELSE}FXMLConf{$ENDIF}.LoadFromStream(Stream);
|
|
|
Load(FXMLConf);
|
|
Load(FXMLConf);
|
|
|
finally
|
|
finally
|
|
|
FXMLConf.Free;
|
|
FXMLConf.Free;
|