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")){
+ ProcessStringValue(&PropertyName, "ALTID", LanguageListAltID, &PropertyValue, LanguageCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", LanguageListPID, &PropertyValue, LanguageCount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", LanguageListPref, &PropertyValue, LanguageCount, &PropertyMatched);
- LanguageListAltID->erase(*LanguageCount);
- LanguageListAltID->insert(std::make_pair(*LanguageCount, PropertyValue));
+ if (PropertyMatched == TRUE){
- } else if (PropertyName == wxT("PID")){
-
- LanguageListPID->erase(*LanguageCount);
- LanguageListPID->insert(std::make_pair(*LanguageCount, PropertyValue));
+ PropertyMatched = FALSE;
+ continue;
- } else if (PropertyName == wxT("PREF")){
-
- ProcessIntegerValue(LanguageListPref, &PropertyValue, LanguageCount);
+ }
- } else {
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ if (FirstToken == TRUE){
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
+
+ } else {
+
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
}