wxString PropertyValue;
wxString PropertyTokens;
bool FirstToken = TRUE;
+ bool PropertyMatched = FALSE;
for (std::map<int, int>::iterator intiter = SplitPoints.begin();
intiter != SplitPoints.end(); ++intiter){
// Process properties.
- if (PropertyName == wxT("ALTID")){
-
- EmailListAltID->erase(*EmailCount);
- EmailListAltID->insert(std::make_pair(*EmailCount, PropertyValue));
+ ProcessStringValue(&PropertyName, "ALTID", EmailListAltID, &PropertyValue, EmailCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", EmailListPID, &PropertyValue, EmailCount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", EmailListPref, &PropertyValue, EmailCount, &PropertyMatched);
- } else if (PropertyName == wxT("PID")){
-
- EmailListPID->erase(*EmailCount);
- EmailListPID->insert(std::make_pair(*EmailCount, PropertyValue));
+ if (PropertyMatched == TRUE){
- } else if (PropertyName == wxT("PREF")){
-
- ProcessIntegerValue(EmailListPref, &PropertyValue, EmailCount);
+ PropertyMatched = FALSE;
+ continue;
- } else {
+ }
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ if (FirstToken == TRUE){
+
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
+
+ } else {
+
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
}
-
+
}
}