Replace property "store" prefix by sWST_PROP_STORE_PREFIX( = 'wstHas_') (fix)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1350 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2010-10-15 13:43:44 +00:00
parent a1121fb2ec
commit 2e7fa04712
3 changed files with 9 additions and 7 deletions

View File

@ -2360,7 +2360,7 @@ var
Inc(locClassPropNbr);
if SymbolTable.IsOfType(p.VarType,TPasArrayType) then
Inc(locArrayPropsNbr);
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,3)) then
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,Length(sWST_PROP_STORE_PREFIX))) then
Inc(locOptionalPropsNbr);
end;
end;
@ -2464,7 +2464,7 @@ var
IncIndent();
for k := 0 to Pred(locPropCount) do begin
p := TPasProperty(locPropList[k]);
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,3)) then begin
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,Length(sWST_PROP_STORE_PREFIX))) then begin
Indent();
WriteLn('function %s() : Boolean;',[p.StoredAccessorName]);
end;
@ -2550,7 +2550,7 @@ var
end;
for k := 0 to Pred(locPropCount) do begin
p := TPasProperty(locPropList[k]);
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,3)) then begin
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,Length(sWST_PROP_STORE_PREFIX))) then begin
NewLine();
WriteLn('function %s.%s() : Boolean;',[ASymbol.Name,p.StoredAccessorName]);
WriteLn('begin');

View File

@ -1190,7 +1190,7 @@ begin
end;
if AnsiSameText(propTyp.StoredAccessorName,'False') then
locStrBuffer := s_prohibited
else if AnsiSameText(Copy(propTyp.StoredAccessorName,1,3),sWST_PROP_STORE_PREFIX) then
else if AnsiSameText(Copy(propTyp.StoredAccessorName,1,Length(sWST_PROP_STORE_PREFIX)),sWST_PROP_STORE_PREFIX) then
locStrBuffer := s_optional
else
locStrBuffer := s_required;

View File

@ -897,7 +897,9 @@ var
typeHelper : IXsdSpecialTypeHelper;
begin
p := AProp;
if AnsiSameText('Has',Copy(p.StoredAccessorName,1,3)) or AnsiSameText('True',p.StoredAccessorName) then begin
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,Length(sWST_PROP_STORE_PREFIX))) or
AnsiSameText('True',p.StoredAccessorName)
then begin
if AContainer.IsAttributeProperty(p) then begin
s := Format('%s:%s',[s_xs_short,s_attribute]);
if Assigned(derivationNode) then
@ -943,13 +945,13 @@ var
if ( Length(p.DefaultValue) > 0 ) then
propNode.SetAttribute(s_default,p.DefaultValue);
if AContainer.IsAttributeProperty(p) then begin
if AnsiSameText('Has',Copy(p.StoredAccessorName,1,3)) then begin
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,Length(sWST_PROP_STORE_PREFIX))) then begin
{propNode.SetAttribute(s_use,'optional')}
end else begin
propNode.SetAttribute(s_use,'required');
end;
end else begin
if AnsiSameText('Has',Copy(p.StoredAccessorName,1,3)) then
if AnsiSameText(sWST_PROP_STORE_PREFIX,Copy(p.StoredAccessorName,1,Length(sWST_PROP_STORE_PREFIX))) then
propNode.SetAttribute(s_minOccurs,'0');
if isEmbeddedArray then begin
propNode.SetAttribute(s_maxOccurs,s_unbounded);