- wxString replacement = (wxChar)-1;
- while ( fmt2.Find(replacement) != wxNOT_FOUND )
- {
- replacement << (wxChar)-1;
- }
-
- wxString replacement2 = (wxChar)-2;
- while ( fmt2.Find(replacement) != wxNOT_FOUND )
- {
- replacement << (wxChar)-2;
- }
-
+ wxString replacement,replacement2,replacement3,replacement4;
+ for (int rnr=1; rnr<5 ; rnr++) {
+ wxString r = (wxChar)-rnr;
+ while ( fmt2.Find(r) != wxNOT_FOUND )
+ {
+ r << (wxChar)-rnr;
+ }
+
+ switch (rnr) {
+ case 1: replacement=r; break;
+ case 2: replacement2=r; break;
+ case 3: replacement3=r; break;
+ case 4: replacement4=r; break;
+ }
+ }