Changeset 735 for cprs/branches/tmg-cprs/CPRS-Chart/Templates
- Timestamp:
- Apr 9, 2010, 9:13:04 AM (15 years ago)
- Location:
- cprs/branches/tmg-cprs/CPRS-Chart/Templates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/tmg-cprs/CPRS-Chart/Templates/fTemplateDialog.pas
r729 r735 219 219 frmTemplateDialog.HTMLAnswerOpenTag := '<I>'; //kt 12/28/09 220 220 //SL.Text := RemoveHTMLTags(SL.Text); //elh 221 HideFormulas(SL,frmTemplateDialog.Formulas); //kt added 3/26/10 221 222 AssignFieldIDs(SL,frmTemplateDialog.NameToObjID); //kt added NameToObjID param 3/26/10 222 HideFormulas(SL,frmTemplateDialog.Formulas); //kt added 3/26/10223 223 HideTxtObjects(SL,frmTemplateDialog.TxtObjects); //kt added 3/28/10 224 224 frmTemplateDialog.SL := SL; … … 230 230 frmTemplateDialog.FirstIndent := 99999; 231 231 repeat 232 //messagedlg(Txt,mtInformation,mbOKCancel,0); 232 233 i := pos(ObjMarker, Txt); 233 234 if(i > 1) then begin … … 280 281 //kt -- end mod -- 281 282 GetText(SL, TRUE); {TRUE = Include embedded fields} 282 {283 if uTemplates.bUsingHTMLMode then begin284 SL.Text := FormatHTMLTags(SL.Text);285 end else begin286 SL.Text := RemoveHTMLTags(SL.Text);287 end;288 }289 283 end else begin 290 284 if (not PreviewMode) and (not frmTemplateDialog.Silent) and (not uInit.TimedOut) then begin -
cprs/branches/tmg-cprs/CPRS-Chart/Templates/uTemplateFields.pas
r729 r735 198 198 function StripEmbedded(iItems: string): string; 199 199 function CloseCharPos(OpenChar, CloseChar : char; var Txt : string; StartingPos : integer=1) : integer; //kt added 200 function FormatFormula(test: string): string; //elh 04/09/10 200 201 201 202 type … … 549 550 //p2 := PosEx(FN_END_TAG,Txt,p1); 550 551 p2 := CloseCharPos(FN_BEGIN_TAG, FN_END_TAG, Txt, p1); 551 SubStrB := MidStr(Txt,p2+1,999 );552 SubStrB := MidStr(Txt,p2+1,99999); //Changed from 999 to 99999. Some characters were getting lost including the dialog tags that trigger the dialog box elh 04/08/10 552 553 FnStr := MidStr(Txt,p1, (p2-p1)); 553 554 FnStr := AnsiReplaceText(FnStr,#9,''); … … 647 648 FldName := NameToObjID.Strings[i]; 648 649 for j := 0 to i do begin 649 if NameToObjID.Strings[ i] = FldName then inc(CountofSimilar);650 if NameToObjID.Strings[j] = FldName then inc(CountofSimilar); //Changed from i to j elh 04/08/10 650 651 end; 651 652 CountOfSimStr := IntToStr(CountofSimilar); … … 1123 1124 FnObjStr := FN_OBJ_TAG + FnObjStr + ']'; 1124 1125 end; 1126 FnObjStr := FormatFormula(FnObjStr); //Added to remove all characters from the formula elh 4/9/10 1125 1127 if (Pos(FN_OBJ_TAG,FnObjStr)>0) then begin 1126 1128 EvalTIUObjects(FnObjStr); … … 3021 3023 end; 3022 3024 3025 function FormatFormula(test: string): string; 3026 var 3027 test2: string; 3028 i: integer; 3029 begin 3030 for i := 1 to length(test) do begin 3031 if test[i] in ['0'..'9','+','-','*','/','(',')','^'] then begin 3032 test2 := test2 + test[i]; 3033 end; 3034 end; 3035 Result := test2; 3036 end; 3037 3023 3038 initialization 3024 3039
Note:
See TracChangeset
for help on using the changeset viewer.