You've already forked lazarus-ccr
Remove not used variables, fix uninitialized variables.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2970 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -853,7 +853,7 @@ var
|
|||||||
var AMaxUnboundded : Boolean
|
var AMaxUnboundded : Boolean
|
||||||
);
|
);
|
||||||
var
|
var
|
||||||
locAttCursor, locPartCursor : IObjectCursor;
|
locPartCursor : IObjectCursor;
|
||||||
locMin, locMax : Integer;
|
locMin, locMax : Integer;
|
||||||
locMaxOccurUnbounded : Boolean;
|
locMaxOccurUnbounded : Boolean;
|
||||||
locStrBuffer : string;
|
locStrBuffer : string;
|
||||||
@ -914,6 +914,7 @@ var
|
|||||||
locType := nil;
|
locType := nil;
|
||||||
locTypeName := '';
|
locTypeName := '';
|
||||||
locTypeHint := '';
|
locTypeHint := '';
|
||||||
|
locInternalEltName := '';
|
||||||
locAttCursor := CreateAttributesCursor(AElement,cetRttiNode);
|
locAttCursor := CreateAttributesCursor(AElement,cetRttiNode);
|
||||||
locPartCursor := CreateCursorOn(locAttCursor.Clone() as IObjectCursor,ParseFilter(Format('%s = %s',[s_NODE_NAME,QuotedStr(s_name)]),TDOMNodeRttiExposer));
|
locPartCursor := CreateCursorOn(locAttCursor.Clone() as IObjectCursor,ParseFilter(Format('%s = %s',[s_NODE_NAME,QuotedStr(s_name)]),TDOMNodeRttiExposer));
|
||||||
locPartCursor.Reset();
|
locPartCursor.Reset();
|
||||||
@ -928,9 +929,9 @@ var
|
|||||||
locIsRefElement := True;
|
locIsRefElement := True;
|
||||||
end;
|
end;
|
||||||
locName := (locPartCursor.GetCurrent() as TDOMNodeRttiExposer).NodeValue;
|
locName := (locPartCursor.GetCurrent() as TDOMNodeRttiExposer).NodeValue;
|
||||||
if locIsRefElement then begin
|
if locIsRefElement then
|
||||||
locName := ExtractNameFromQName(locName);
|
locName := ExtractNameFromQName(locName);
|
||||||
end;
|
locInternalEltName := ExtractIdentifier(locName);
|
||||||
if IsStrEmpty(locName) then
|
if IsStrEmpty(locName) then
|
||||||
raise EXsdParserException.Create(SERR_InvalidElementDef_EmptyName);
|
raise EXsdParserException.Create(SERR_InvalidElementDef_EmptyName);
|
||||||
if locIsRefElement then begin
|
if locIsRefElement then begin
|
||||||
@ -1113,12 +1114,14 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
locNode, locAnyNode, locAnyAttNode : TDOMNode;
|
locNode : TDOMNode;
|
||||||
locNS, locLN : string;
|
locNS, locLN : string;
|
||||||
locEltCrs, locEltAttCrs : IObjectCursor;
|
locEltCrs, locEltAttCrs : IObjectCursor;
|
||||||
locBoundInfos : TOccurrenceRec;
|
locBoundInfos : TOccurrenceRec;
|
||||||
begin
|
begin
|
||||||
|
FillChar(locBoundInfos,SizeOf(locBoundInfos),#0);
|
||||||
if Assigned(AEltCrs) then begin
|
if Assigned(AEltCrs) then begin
|
||||||
|
locEltAttCrs := nil;
|
||||||
AEltCrs.Reset();
|
AEltCrs.Reset();
|
||||||
while AEltCrs.MoveNext() do begin
|
while AEltCrs.MoveNext() do begin
|
||||||
locNode := (AEltCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject;
|
locNode := (AEltCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject;
|
||||||
@ -1439,6 +1442,7 @@ var
|
|||||||
locName := ExtractNameFromQName(locName);
|
locName := ExtractNameFromQName(locName);
|
||||||
if IsStrEmpty(locName) then
|
if IsStrEmpty(locName) then
|
||||||
raise EXsdInvalidDefinitionException.Create(SERR_InvalidAttributeDef_EmptyName);
|
raise EXsdInvalidDefinitionException.Create(SERR_InvalidAttributeDef_EmptyName);
|
||||||
|
locInternalEltName := ExtractIdentifier(locName);
|
||||||
|
|
||||||
if locIsRefElement then begin
|
if locIsRefElement then begin
|
||||||
locTypeName := locName;
|
locTypeName := locName;
|
||||||
@ -1486,7 +1490,7 @@ var
|
|||||||
locStoreOptIdx := 1{optional by default!}; //0;
|
locStoreOptIdx := 1{optional by default!}; //0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
locInternalEltName := locName;
|
locInternalEltName := ExtractIdentifier(locName);
|
||||||
locHasInternalName := IsReservedKeyWord(locInternalEltName);
|
locHasInternalName := IsReservedKeyWord(locInternalEltName);
|
||||||
if locHasInternalName then
|
if locHasInternalName then
|
||||||
locInternalEltName := Format('_%s',[locInternalEltName]);
|
locInternalEltName := Format('_%s',[locInternalEltName]);
|
||||||
|
@ -398,10 +398,9 @@ function FindAttributeByValueInNode(
|
|||||||
const AStartingWith : string = ''
|
const AStartingWith : string = ''
|
||||||
):boolean;overload;
|
):boolean;overload;
|
||||||
var
|
var
|
||||||
i,c : Integer;
|
|
||||||
b : Boolean;
|
|
||||||
k : Integer;
|
k : Integer;
|
||||||
begin
|
begin
|
||||||
|
k := 0;
|
||||||
Result := FindAttributeByValueInNode(
|
Result := FindAttributeByValueInNode(
|
||||||
AAttValue,ANode,AResAtt,AStartIndex,AStartingWith,k
|
AAttValue,ANode,AResAtt,AStartIndex,AStartingWith,k
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user