From: Olivier S. <ob...@us...> - 2003-11-16 11:39:59
|
Update of /cvsroot/jvcl/dev/JVCL3/devtools/PackagesGenerator In directory sc8-pr-cvs1:/tmp/cvs-serv31974/dev/JVCL3/devtools/PackagesGenerator Modified Files: GenerateUtils.pas Log Message: corrected a bug that affected the generation of cpp files for BCB Index: GenerateUtils.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/devtools/PackagesGenerator/GenerateUtils.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GenerateUtils.pas 16 Nov 2003 07:17:32 -0000 1.10 --- GenerateUtils.pas 16 Nov 2003 11:39:16 -0000 1.11 *************** *** 184,187 **** --- 184,189 ---- formNameAndType : string; incFileName : string; + openPos : Integer; + closePos : Integer; begin formNameAndType := fileNode.Properties.ItemNamed['FormName'].Value; *************** *** 205,214 **** [rfReplaceAll]); if formName = '' then begin ! StrReplace(Lines, '{', '', [rfReplaceAll]); ! StrReplace(Lines, '}', '', [rfReplaceAll]); ! StrReplace(Lines, '/*', '', [rfReplaceAll]); ! StrReplace(Lines, '*/', '', [rfReplaceAll]); StrReplace(Lines, '%FORMNAME%', '', [rfReplaceAll]); StrReplace(Lines, '%FORMTYPE%', '', [rfReplaceAll]); --- 207,232 ---- [rfReplaceAll]); + if (formType = '') or (formName = '') then + begin + openPos := Pos('/*', Lines); + if openPos > 0 then + begin + closePos := Pos('*/', Lines); + Lines := Copy(Lines, 1, openPos-1)+Copy(Lines,closePos+2,Length(Lines)); + end; + end; + if formName = '' then begin ! //StrReplace(Lines, '{', '', [rfReplaceAll]); ! //StrReplace(Lines, '}', '', [rfReplaceAll]); ! //StrReplace(Lines, '/*', '', [rfReplaceAll]); ! //StrReplace(Lines, '*/', '', [rfReplaceAll]); ! openPos := Pos('{', Lines); ! if openPos > 0 then ! begin ! closePos := Pos('}', Lines); ! Lines := Copy(Lines, 1, openPos-1)+Copy(Lines,closePos+1,Length(Lines)); ! end; StrReplace(Lines, '%FORMNAME%', '', [rfReplaceAll]); StrReplace(Lines, '%FORMTYPE%', '', [rfReplaceAll]); |