}
intPrevValue = 4;
+ bool PropertyMatched = FALSE;
for (std::map<int, int>::iterator intiter = SplitPoints.begin();
intiter != SplitPoints.end(); ++intiter){
CaptureString(&PropertyValue, FALSE);
- if (PropertyName == wxT("ALTID")){
-
- OrganisationsListAltID->erase(*OrganisationCount);
- OrganisationsListAltID->insert(std::make_pair(*OrganisationCount, PropertyValue));
-
- } else if (PropertyName == wxT("PID")){
-
- OrganisationsListPID->erase(*OrganisationCount);
- OrganisationsListPID->insert(std::make_pair(*OrganisationCount, PropertyValue));
+ ProcessStringValue(&PropertyName, "ALTID", OrganisationsListAltID, &PropertyValue, OrganisationCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", OrganisationsListPID, &PropertyValue, OrganisationCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "LANGUAGE", OrganisationsListLanguage, &PropertyValue, OrganisationCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "SORT-AS", OrganisationsListSortAs, &PropertyValue, OrganisationCount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", OrganisationsListPref, &PropertyValue, OrganisationCount, &PropertyMatched);
- } else if (PropertyName == wxT("SORT-AS")){
-
- OrganisationsListSortAs->erase(*OrganisationCount);
- OrganisationsListSortAs->insert(std::make_pair(*OrganisationCount, PropertyValue));
+ if (PropertyMatched == TRUE){
- } else if (PropertyName == wxT("PREF")){
-
- ProcessIntegerValue(OrganisationsListPref, &PropertyValue, OrganisationCount);
-
- } else if (PropertyName == wxT("LANGUAGE")){
+ PropertyMatched = FALSE;
+ continue;
- OrganisationsListLanguage->erase(*OrganisationCount);
- OrganisationsListLanguage->insert(std::make_pair(*OrganisationCount, PropertyValue));
+ }
- } else {
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+
+ if (FirstToken == TRUE){
- // Something else we don't know about so append
- // to the tokens variable.
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ } else {
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
}
-
- }
+ }
+
}
// Add the data to the General/Home/Work address variables.