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); Inc(locClassPropNbr);
if SymbolTable.IsOfType(p.VarType,TPasArrayType) then if SymbolTable.IsOfType(p.VarType,TPasArrayType) then
Inc(locArrayPropsNbr); 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); Inc(locOptionalPropsNbr);
end; end;
end; end;
@ -2464,7 +2464,7 @@ var
IncIndent(); IncIndent();
for k := 0 to Pred(locPropCount) do begin for k := 0 to Pred(locPropCount) do begin
p := TPasProperty(locPropList[k]); 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(); Indent();
WriteLn('function %s() : Boolean;',[p.StoredAccessorName]); WriteLn('function %s() : Boolean;',[p.StoredAccessorName]);
end; end;
@ -2550,7 +2550,7 @@ var
end; end;
for k := 0 to Pred(locPropCount) do begin for k := 0 to Pred(locPropCount) do begin
p := TPasProperty(locPropList[k]); 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(); NewLine();
WriteLn('function %s.%s() : Boolean;',[ASymbol.Name,p.StoredAccessorName]); WriteLn('function %s.%s() : Boolean;',[ASymbol.Name,p.StoredAccessorName]);
WriteLn('begin'); WriteLn('begin');

View File

@ -1190,7 +1190,7 @@ begin
end; end;
if AnsiSameText(propTyp.StoredAccessorName,'False') then if AnsiSameText(propTyp.StoredAccessorName,'False') then
locStrBuffer := s_prohibited 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 locStrBuffer := s_optional
else else
locStrBuffer := s_required; locStrBuffer := s_required;

View File

@ -897,7 +897,9 @@ var
typeHelper : IXsdSpecialTypeHelper; typeHelper : IXsdSpecialTypeHelper;
begin begin
p := AProp; 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 if AContainer.IsAttributeProperty(p) then begin
s := Format('%s:%s',[s_xs_short,s_attribute]); s := Format('%s:%s',[s_xs_short,s_attribute]);
if Assigned(derivationNode) then if Assigned(derivationNode) then
@ -943,13 +945,13 @@ var
if ( Length(p.DefaultValue) > 0 ) then if ( Length(p.DefaultValue) > 0 ) then
propNode.SetAttribute(s_default,p.DefaultValue); propNode.SetAttribute(s_default,p.DefaultValue);
if AContainer.IsAttributeProperty(p) then begin 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')} {propNode.SetAttribute(s_use,'optional')}
end else begin end else begin
propNode.SetAttribute(s_use,'required'); propNode.SetAttribute(s_use,'required');
end; end;
end else begin 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'); propNode.SetAttribute(s_minOccurs,'0');
if isEmbeddedArray then begin if isEmbeddedArray then begin
propNode.SetAttribute(s_maxOccurs,s_unbounded); propNode.SetAttribute(s_maxOccurs,s_unbounded);