X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2Fcdo%2FContactDataObject.cpp;h=50854091cbd52f289771c2452e3b84a677f6d03c;hb=96a36fb1c4c7e04b5bf17cf07f63f2792d23f067;hp=1a6e6be5c79f30bd52815a66fb37bad1f7b0a925;hpb=21bab5986bad8151515155f3d0b85350c2849f64;p=xestiaab%2F.git diff --git a/source/contacteditor/cdo/ContactDataObject.cpp b/source/contacteditor/cdo/ContactDataObject.cpp index 1a6e6be..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. @@ -1875,7 +1883,8 @@ void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2, std::map *IMListAltID = NULL; std::map *IMListPID = NULL; std::map *IMListTokens = NULL; - std::map *IMListMediatype = NULL; + std::map *IMListMediatype = NULL; + std::map *IMListTypeInfo = NULL; std::map *IMListPref = NULL; switch(PropType){ @@ -1886,6 +1895,7 @@ void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2, IMListPID = &GeneralIMListPID; IMListTokens = &GeneralIMListTokens; IMListMediatype = &GeneralIMListMediatype; + IMListTypeInfo = &GeneralIMListTypeInfo; IMListPref = &GeneralIMListPref; break; case PROPERTY_HOME: @@ -1894,7 +1904,8 @@ void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2, IMListAltID = &HomeIMListAltID; IMListPID = &HomeIMListPID; IMListTokens = &HomeIMListTokens; - IMListMediatype = &HomeIMListMediatype; + IMListMediatype = &HomeIMListMediatype; + IMListTypeInfo = &HomeIMListTypeInfo; IMListPref = &HomeIMListPref; break; case PROPERTY_WORK: @@ -1903,7 +1914,8 @@ void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2, IMListAltID = &BusinessIMListAltID; IMListPID = &BusinessIMListPID; IMListTokens = &BusinessIMListTokens; - IMListMediatype = &BusinessIMListMediatype; + IMListMediatype = &BusinessIMListMediatype; + IMListTypeInfo = &BusinessIMListTypeInfo; IMListPref = &BusinessIMListPref; break; } @@ -1946,7 +1958,19 @@ void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2, } - IMList->insert(std::make_pair(*IMCount, PropertySeg2)); + wxStringTokenizer IMPPSplitData(PropertySeg2, wxT(":")); + + if (IMPPSplitData.CountTokens() > 1){ + + IMListTypeInfo->insert(std::make_pair(*IMCount, IMPPSplitData.GetNextToken())); + IMList->insert(std::make_pair(*IMCount, IMPPSplitData.GetString())); + + } else { + + IMList->insert(std::make_pair(*IMCount, PropertySeg2)); + IMListTypeInfo->insert(std::make_pair(*IMCount, "none")); + + } // Add the name token data. @@ -2058,10 +2082,11 @@ 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){ - + wxString TypePropertyName; TSLiter = TypeSplitLength.find(typeiter->first); @@ -2076,18 +2101,23 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert TelTypeUI.Append(wxT(",")); } - - 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")); @@ -2105,7 +2135,7 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert } else if (TypePropertyName == wxT("cell")){ - TelTypeUI.Append(_("mobile")); + TelTypeUI.Append(_("cell")); intTypeSeek++; } else if (TypePropertyName == wxT("video")){ @@ -2136,7 +2166,8 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert std::map *TelephoneListAltID = NULL; std::map *TelephoneListPID = NULL; std::map *TelephoneListTokens = NULL; - std::map *TelephoneListTypeInfo = NULL; + std::map *TelephoneListTypeInfo = NULL; + std::map *TelephoneListDataType = NULL; std::map *TelephoneListPref = NULL; switch(PropType){ @@ -2147,6 +2178,7 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert TelephoneListPID = &GeneralTelephoneListPID; TelephoneListTokens = &GeneralTelephoneListTokens; TelephoneListTypeInfo = &GeneralTelephoneListTypeInfo; + TelephoneListDataType = &GeneralTelephoneListDataType; TelephoneListPref = &GeneralTelephoneListPref; break; case PROPERTY_HOME: @@ -2155,7 +2187,8 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert TelephoneListAltID = &HomeTelephoneListAltID; TelephoneListPID = &HomeTelephoneListPID; TelephoneListTokens = &HomeTelephoneListTokens; - TelephoneListTypeInfo = &HomeTelephoneListTypeInfo; + TelephoneListTypeInfo = &HomeTelephoneListTypeInfo; + TelephoneListDataType = &HomeTelephoneListDataType; TelephoneListPref = &HomeTelephoneListPref; break; case PROPERTY_WORK: @@ -2164,7 +2197,8 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert TelephoneListAltID = &BusinessTelephoneListAltID; TelephoneListPID = &BusinessTelephoneListPID; TelephoneListTokens = &BusinessTelephoneListTokens; - TelephoneListTypeInfo = &BusinessTelephoneListTypeInfo; + TelephoneListTypeInfo = &BusinessTelephoneListTypeInfo; + TelephoneListDataType = &BusinessTelephoneListDataType; TelephoneListPref = &BusinessTelephoneListPref; break; } @@ -2210,9 +2244,24 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert } - TelephoneList->insert(std::make_pair(*TelephoneCount, PropertySeg2)); - TelephoneListTypeInfo->insert(std::make_pair(*TelephoneCount, TelTypeUI)); + // Check for the type information and split it down. + + wxStringTokenizer TelSplitData(PropertySeg2, wxT(":")); + + if (TelSplitData.CountTokens() > 1){ + + TelephoneListDataType->insert(std::make_pair(*TelephoneCount, TelSplitData.GetNextToken())); + TelephoneList->insert(std::make_pair(*TelephoneCount, TelSplitData.GetString())); + + } else { + TelephoneList->insert(std::make_pair(*TelephoneCount, PropertySeg2)); + TelephoneListDataType->insert(std::make_pair(*TelephoneCount, "tel")); + + } + + TelephoneListTypeInfo->insert(std::make_pair(*TelephoneCount, TelTypeUI)); + // Add the name token data. if (!PropertyTokens.IsEmpty()){ @@ -2346,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){ @@ -2356,6 +2406,7 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper GeopositionListPID = &GeneralGeographyListPID; GeopositionListTokens = &GeneralGeographyListTokens; GeopositionListMediatype = &GeneralGeographyListMediatype; + GeopositionListDataType = &GeneralGeographyListDataType; GeopositionListPref = &GeneralGeographyListPref; break; case PROPERTY_HOME: @@ -2365,6 +2416,7 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper GeopositionListPID = &HomeGeographyListPID; GeopositionListTokens = &HomeGeographyListTokens; GeopositionListMediatype = &HomeGeographyListMediatype; + GeopositionListDataType = &HomeGeographyListDataType; GeopositionListPref = &HomeGeographyListPref; break; case PROPERTY_WORK: @@ -2373,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; } @@ -2415,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()){