You've already forked lazarus-ccr
Correct an AV bug and drop a non-used method
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@464 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -80,7 +80,6 @@ type
|
|||||||
procedure DoOnMessage(const AMsgType : TMessageType; const AMsg : string);
|
procedure DoOnMessage(const AMsgType : TMessageType; const AMsg : string);
|
||||||
private
|
private
|
||||||
function FindNamedNode(AList : IObjectCursor; const AName : WideString; const AOrder : Integer = 0):TDOMNode;
|
function FindNamedNode(AList : IObjectCursor; const AName : WideString; const AOrder : Integer = 0):TDOMNode;
|
||||||
function AddNameSpace(const AValue : string) : TStrings; {$IFDEF USE_INLINE}inline;{$ENDIF}
|
|
||||||
function GetParentContext() : IParserContext;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
function GetParentContext() : IParserContext;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
procedure Prepare();
|
procedure Prepare();
|
||||||
function FindElement(const AName: String) : TPasElement; {$IFDEF USE_INLINE}inline;{$ENDIF}
|
function FindElement(const AName: String) : TPasElement; {$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
@ -128,11 +127,6 @@ uses ws_parser_imp, dom_cursors, parserutils, StrUtils, xsd_consts
|
|||||||
|
|
||||||
{ TCustomXsdSchemaParser }
|
{ TCustomXsdSchemaParser }
|
||||||
|
|
||||||
function TCustomXsdSchemaParser.AddNameSpace(const AValue: string): TStrings;
|
|
||||||
begin
|
|
||||||
Result := parserutils.AddNameSpace(AValue,FNameSpaceList)
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TCustomXsdSchemaParser.Create(
|
constructor TCustomXsdSchemaParser.Create(
|
||||||
ADoc : TXMLDocument;
|
ADoc : TXMLDocument;
|
||||||
ASchemaNode : TDOMNode;
|
ASchemaNode : TDOMNode;
|
||||||
@ -423,12 +417,11 @@ var
|
|||||||
shortNameSpace, longNameSpace : string;
|
shortNameSpace, longNameSpace : string;
|
||||||
typeModule : TPasModule;
|
typeModule : TPasModule;
|
||||||
begin
|
begin
|
||||||
|
sct := nil;
|
||||||
DoOnMessage(mtInfo, Format('Parsing "%s" ...',[AName]));
|
DoOnMessage(mtInfo, Format('Parsing "%s" ...',[AName]));
|
||||||
try
|
try
|
||||||
embededType := False;
|
embededType := False;
|
||||||
aliasType := nil;
|
aliasType := nil;
|
||||||
Result := nil;
|
|
||||||
typeModule := nil;
|
|
||||||
ExplodeQName(AName,localTypeName,shortNameSpace);
|
ExplodeQName(AName,localTypeName,shortNameSpace);
|
||||||
if IsStrEmpty(shortNameSpace) then begin
|
if IsStrEmpty(shortNameSpace) then begin
|
||||||
typeModule := FModule;
|
typeModule := FModule;
|
||||||
@ -478,6 +471,8 @@ begin
|
|||||||
except
|
except
|
||||||
on e : EXsdTypeNotFoundException do begin
|
on e : EXsdTypeNotFoundException do begin
|
||||||
Result := CreateUnresolveType();
|
Result := CreateUnresolveType();
|
||||||
|
if ( sct = nil ) then
|
||||||
|
sct := FModule.InterfaceSection;
|
||||||
sct.Declarations.Add(Result);
|
sct.Declarations.Add(Result);
|
||||||
sct.Types.Add(Result);
|
sct.Types.Add(Result);
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user