X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;ds=sidebyside;f=source%2Fcontacteditor%2Fcdo%2FContactDataObject.cpp;h=50854091cbd52f289771c2452e3b84a677f6d03c;hb=96a36fb1c4c7e04b5bf17cf07f63f2792d23f067;hp=cda6933e4572d5f30166ffc1ded678b6ca07124d;hpb=adc92a22d0a1313dceb6e17b68263fe657933f30;p=xestiaab%2F.git diff --git a/source/contacteditor/cdo/ContactDataObject.cpp b/source/contacteditor/cdo/ContactDataObject.cpp index cda6933..5085409 100644 --- a/source/contacteditor/cdo/ContactDataObject.cpp +++ b/source/contacteditor/cdo/ContactDataObject.cpp @@ -1586,7 +1586,15 @@ void ContactDataObject::ProcessAddress(wxString PropertySeg1, wxString PropertyS ProcessNameValue(&PropertyData, &PropertyName, &PropertyValue); intPrevValue = intiter->second; - CaptureString(&PropertyValue, FALSE); + if (PropertyName == "GEO"){ + + CaptureString(&PropertyValue, TRUE); + + } else { + + CaptureString(&PropertyValue, FALSE); + + } // Process properties. @@ -2074,6 +2082,7 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert TypeSplitLength.insert(std::make_pair(intSplitsFound, intSplitSize)); int intTypeSeek = 0; + bool TypeFound = FALSE; for (std::map::iterator typeiter = TypeSplitPoints.begin(); typeiter != TypeSplitPoints.end(); ++typeiter){ @@ -2093,17 +2102,22 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert } - if (TypePropertyName == wxT("home")){ + if (TypePropertyName == wxT("home") && TypeFound == FALSE){ PropType = PROPERTY_HOME; + TelTypeUI.Append("home"); + intTypeSeek++; + TypeFound = TRUE; - } else if (TypePropertyName == wxT("work")){ + } else if (TypePropertyName == wxT("work") && TypeFound == FALSE){ PropType = PROPERTY_WORK; - + TelTypeUI.Append("work"); + intTypeSeek++; + TypeFound = TRUE; + } - if (TypePropertyName == wxT("text")){ TelTypeUI.Append(_("text")); @@ -2381,6 +2395,7 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper std::map *GeopositionListPID = NULL; std::map *GeopositionListTokens = NULL; std::map *GeopositionListMediatype = NULL; + std::map *GeopositionListDataType = NULL; std::map *GeopositionListPref = NULL; switch(PropType){ @@ -2391,6 +2406,7 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper GeopositionListPID = &GeneralGeographyListPID; GeopositionListTokens = &GeneralGeographyListTokens; GeopositionListMediatype = &GeneralGeographyListMediatype; + GeopositionListDataType = &GeneralGeographyListDataType; GeopositionListPref = &GeneralGeographyListPref; break; case PROPERTY_HOME: @@ -2400,6 +2416,7 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper GeopositionListPID = &HomeGeographyListPID; GeopositionListTokens = &HomeGeographyListTokens; GeopositionListMediatype = &HomeGeographyListMediatype; + GeopositionListDataType = &HomeGeographyListDataType; GeopositionListPref = &HomeGeographyListPref; break; case PROPERTY_WORK: @@ -2408,7 +2425,8 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper GeopositionListAltID = &BusinessGeographyListAltID; GeopositionListPID = &BusinessGeographyListPID; GeopositionListTokens = &BusinessGeographyListTokens; - GeopositionListMediatype = &BusinessGeographyListMediatype; + GeopositionListMediatype = &BusinessGeographyListMediatype; + GeopositionListDataType = &BusinessGeographyListDataType; GeopositionListPref = &BusinessGeographyListPref; break; } @@ -2450,9 +2468,21 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken); } + + wxStringTokenizer GeoSplitData(PropertySeg2, wxT(":")); - GeopositionList->insert(std::make_pair(*GeographicCount, PropertySeg2)); + if (GeoSplitData.CountTokens() > 1){ + + GeopositionListDataType->insert(std::make_pair(*GeographicCount, GeoSplitData.GetNextToken())); + GeopositionList->insert(std::make_pair(*GeographicCount, GeoSplitData.GetString())); + } else { + + GeopositionList->insert(std::make_pair(*GeographicCount, PropertySeg2)); + GeopositionListDataType->insert(std::make_pair(*GeographicCount, "tel")); + + } + // Add the name token data. if (!PropertyTokens.IsEmpty()){