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:
inoussa
2008-06-06 14:49:11 +00:00
parent 4bf1ccf6cc
commit 1dc0744989

View File

@ -80,7 +80,6 @@ type
procedure DoOnMessage(const AMsgType : TMessageType; const AMsg : string);
private
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}
procedure Prepare();
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 }
function TCustomXsdSchemaParser.AddNameSpace(const AValue: string): TStrings;
begin
Result := parserutils.AddNameSpace(AValue,FNameSpaceList)
end;
constructor TCustomXsdSchemaParser.Create(
ADoc : TXMLDocument;
ASchemaNode : TDOMNode;
@ -423,12 +417,11 @@ var
shortNameSpace, longNameSpace : string;
typeModule : TPasModule;
begin
sct := nil;
DoOnMessage(mtInfo, Format('Parsing "%s" ...',[AName]));
try
embededType := False;
aliasType := nil;
Result := nil;
typeModule := nil;
ExplodeQName(AName,localTypeName,shortNameSpace);
if IsStrEmpty(shortNameSpace) then begin
typeModule := FModule;
@ -478,6 +471,8 @@ begin
except
on e : EXsdTypeNotFoundException do begin
Result := CreateUnresolveType();
if ( sct = nil ) then
sct := FModule.InterfaceSection;
sct.Declarations.Add(Result);
sct.Types.Add(Result);
end;