You've already forked lazarus-ccr
Type Library Editor AV Correction
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1360 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2373,26 +2373,28 @@ var
|
|||||||
elt : TPasElement;
|
elt : TPasElement;
|
||||||
ultimAnc, trueAncestor : TPasType;
|
ultimAnc, trueAncestor : TPasType;
|
||||||
begin
|
begin
|
||||||
|
s := '';
|
||||||
if Assigned(ASymbol.AncestorType) then begin
|
if Assigned(ASymbol.AncestorType) then begin
|
||||||
trueAncestor := ASymbol.AncestorType;
|
trueAncestor := ASymbol.AncestorType;
|
||||||
if trueAncestor.InheritsFrom(TPasUnresolvedTypeRef) then begin
|
if trueAncestor.InheritsFrom(TPasUnresolvedTypeRef) then begin
|
||||||
elt := SymbolTable.FindElement(SymbolTable.GetExternalName(trueAncestor));
|
elt := SymbolTable.FindElement(SymbolTable.GetExternalName(trueAncestor));
|
||||||
if elt.InheritsFrom(TPasType) then begin
|
if (elt = nil) or (not elt.InheritsFrom(TPasType)) then
|
||||||
|
trueAncestor := nil
|
||||||
|
else
|
||||||
trueAncestor := TPasType(elt);
|
trueAncestor := TPasType(elt);
|
||||||
|
end;
|
||||||
|
if (trueAncestor <> nil) then begin
|
||||||
|
ultimAnc := GetUltimeType(trueAncestor);
|
||||||
|
if ultimAnc.InheritsFrom(TPasNativeSimpleType) then begin
|
||||||
|
trueAncestor := ultimAnc;
|
||||||
end;
|
end;
|
||||||
|
if trueAncestor.InheritsFrom(TPasNativeSimpleType) and
|
||||||
|
Assigned(TPasNativeSimpleType(trueAncestor).ExtendableType)
|
||||||
|
then begin
|
||||||
|
trueAncestor := TPasNativeSimpleType(trueAncestor).ExtendableType;
|
||||||
|
end;
|
||||||
|
s := Format('%s',[trueAncestor.Name]);
|
||||||
end;
|
end;
|
||||||
ultimAnc := GetUltimeType(trueAncestor);
|
|
||||||
if ultimAnc.InheritsFrom(TPasNativeSimpleType) then begin
|
|
||||||
trueAncestor := ultimAnc;
|
|
||||||
end;
|
|
||||||
if trueAncestor.InheritsFrom(TPasNativeSimpleType) and
|
|
||||||
Assigned(TPasNativeSimpleType(trueAncestor).ExtendableType)
|
|
||||||
then begin
|
|
||||||
trueAncestor := TPasNativeSimpleType(trueAncestor).ExtendableType;
|
|
||||||
end;
|
|
||||||
s := Format('%s',[trueAncestor.Name]);
|
|
||||||
end else begin
|
|
||||||
s := '';//'TBaseComplexRemotable';
|
|
||||||
end;
|
end;
|
||||||
if IsStrEmpty(s) then begin
|
if IsStrEmpty(s) then begin
|
||||||
decBuffer := '';
|
decBuffer := '';
|
||||||
|
@ -1003,37 +1003,39 @@ begin
|
|||||||
trueParent := typItm.AncestorType;
|
trueParent := typItm.AncestorType;
|
||||||
if trueParent.InheritsFrom(TPasUnresolvedTypeRef) then
|
if trueParent.InheritsFrom(TPasUnresolvedTypeRef) then
|
||||||
trueParent := AContainer.FindElement(AContainer.GetExternalName(trueParent)) as TPasType;
|
trueParent := AContainer.FindElement(AContainer.GetExternalName(trueParent)) as TPasType;
|
||||||
if trueParent.InheritsFrom(TPasNativeClassType) and AnsiSameText('THeaderBlock',trueParent.Name) then begin
|
if (trueParent <> nil) then begin
|
||||||
DeclareNameSpaceOf_WST(ADocument);
|
if trueParent.InheritsFrom(TPasNativeClassType) and AnsiSameText('THeaderBlock',trueParent.Name) then begin
|
||||||
DeclareAttributeOf_WST(cplxNode,s_WST_headerBlock,'true');
|
DeclareNameSpaceOf_WST(ADocument);
|
||||||
end else if trueParent.InheritsFrom(TPasNativeClassType) and AnsiSameText('TSimpleContentHeaderBlock',trueParent.Name) then begin
|
DeclareAttributeOf_WST(cplxNode,s_WST_headerBlock,'true');
|
||||||
DeclareNameSpaceOf_WST(ADocument);
|
end else if trueParent.InheritsFrom(TPasNativeClassType) and AnsiSameText('TSimpleContentHeaderBlock',trueParent.Name) then begin
|
||||||
DeclareAttributeOf_WST(cplxNode,s_WST_headerBlockSimpleContent,'true');
|
DeclareNameSpaceOf_WST(ADocument);
|
||||||
end;
|
DeclareAttributeOf_WST(cplxNode,s_WST_headerBlockSimpleContent,'true');
|
||||||
|
|
||||||
if trueParent.InheritsFrom(TPasAliasType) then
|
|
||||||
trueParent := GetUltimeType(trueParent);
|
|
||||||
if trueParent.InheritsFrom(TPasNativeSimpleContentClassType) or
|
|
||||||
trueParent.InheritsFrom(TPasNativeSimpleType)
|
|
||||||
then begin
|
|
||||||
typeCategory := tcSimpleContent;
|
|
||||||
end;
|
|
||||||
if trueParent.InheritsFrom(TPasNativeSimpleContentClassType) or
|
|
||||||
( not trueParent.InheritsFrom(TPasNativeClassType) )
|
|
||||||
then begin
|
|
||||||
if ( typeCategory = tcSimpleContent ) then begin
|
|
||||||
derivationNode := CreateElement(Format('%s:%s',[s_xs_short,s_simpleContent]),cplxNode,ADocument);
|
|
||||||
derivationNode := CreateElement(Format('%s:%s',[s_xs_short,s_extension]),derivationNode,ADocument);
|
|
||||||
end else begin
|
|
||||||
derivationNode := CreateElement(Format('%s:%s',[s_xs_short,s_extension]),cplxNode,ADocument);
|
|
||||||
end;
|
end;
|
||||||
s := Trim(GetNameSpaceShortName(GetTypeNameSpace(AContainer,trueParent),ADocument,GetOwner().GetPreferedShortNames()));
|
|
||||||
if ( Length(s) > 0 ) then
|
if trueParent.InheritsFrom(TPasAliasType) then
|
||||||
s := s + ':';
|
trueParent := GetUltimeType(trueParent);
|
||||||
s := s + AContainer.GetExternalName(trueParent);
|
if trueParent.InheritsFrom(TPasNativeSimpleContentClassType) or
|
||||||
derivationNode.SetAttribute(s_base,s);
|
trueParent.InheritsFrom(TPasNativeSimpleType)
|
||||||
|
then begin
|
||||||
|
typeCategory := tcSimpleContent;
|
||||||
|
end;
|
||||||
|
if trueParent.InheritsFrom(TPasNativeSimpleContentClassType) or
|
||||||
|
( not trueParent.InheritsFrom(TPasNativeClassType) )
|
||||||
|
then begin
|
||||||
|
if ( typeCategory = tcSimpleContent ) then begin
|
||||||
|
derivationNode := CreateElement(Format('%s:%s',[s_xs_short,s_simpleContent]),cplxNode,ADocument);
|
||||||
|
derivationNode := CreateElement(Format('%s:%s',[s_xs_short,s_extension]),derivationNode,ADocument);
|
||||||
|
end else begin
|
||||||
|
derivationNode := CreateElement(Format('%s:%s',[s_xs_short,s_extension]),cplxNode,ADocument);
|
||||||
|
end;
|
||||||
|
s := Trim(GetNameSpaceShortName(GetTypeNameSpace(AContainer,trueParent),ADocument,GetOwner().GetPreferedShortNames()));
|
||||||
|
if ( Length(s) > 0 ) then
|
||||||
|
s := s + ':';
|
||||||
|
s := s + AContainer.GetExternalName(trueParent);
|
||||||
|
derivationNode.SetAttribute(s_base,s);
|
||||||
|
end;
|
||||||
|
hasSequence := False;
|
||||||
end;
|
end;
|
||||||
hasSequence := False;
|
|
||||||
end;
|
end;
|
||||||
if ( typItm.Members.Count > 0 ) then
|
if ( typItm.Members.Count > 0 ) then
|
||||||
hasSequence := TypeHasSequence(typItm,typeCategory);
|
hasSequence := TypeHasSequence(typItm,typeCategory);
|
||||||
|
Reference in New Issue
Block a user