Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Stop XAB crashing when pressing Modify/Delete
[xestiaab/.git] / source / contacteditor / cdo / ContactDataObject.cpp
index afa3a42..1449286 100644 (file)
@@ -20,6 +20,8 @@
 
 ContactLoadStatus ContactDataObject::LoadFile(wxString Filename){
        
+       // Load the ContactDataObject using the Filename given.
+       
        if (!wxFileExists(Filename)){
        
                return CONTACTLOAD_FILEMISSING;
@@ -429,6 +431,8 @@ ContactLoadStatus ContactDataObject::LoadFile(wxString Filename){
 
 void ContactDataObject::ProcessKind(wxString KindType){
 
+       // Process the type of contact.
+       
        if (KindType == wxT("individual")){
                        
                ContactKind = CONTACTKIND_INDIVIDUAL;
@@ -454,7 +458,8 @@ void ContactDataObject::ProcessKind(wxString KindType){
 
 void ContactDataObject::ProcessRevision(wxString PropertySeg1, wxString PropertySeg2){
 
-       size_t intPropertyLen = PropertySeg1.Len();
+       // Process the revision date.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -463,8 +468,6 @@ void ContactDataObject::ProcessRevision(wxString PropertySeg1, wxString Property
        wxString PropertyValue;
        wxString PropertyTokens;
        bool FirstToken = TRUE;
-       int intSplitsFound = 0;
-       int intSplitSize = 0;
        int intPrevValue = 5;
        
        SplitValues(&PropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -517,7 +520,8 @@ void ContactDataObject::ProcessRevision(wxString PropertySeg1, wxString Property
 
 void ContactDataObject::ProcessSource(wxString PropertySeg1, wxString PropertySeg2, int *SourceCount){
 
-       size_t intPropertyLen = PropertySeg1.Len();
+       // Process the source address.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -527,8 +531,6 @@ void ContactDataObject::ProcessSource(wxString PropertySeg1, wxString PropertySe
        wxString PropertyTokens;
        bool FirstToken = TRUE;
        bool PropertyMatched = FALSE;
-       int intSplitsFound = 0;
-       int intSplitSize = 0;
        int intPrevValue = 8;
        
        SplitValues(&PropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -589,11 +591,8 @@ void ContactDataObject::ProcessSource(wxString PropertySeg1, wxString PropertySe
        
        }       
        
-       intPropertyLen = PropertySeg2.Len();
        SplitPoints.clear();
        SplitLength.clear();
-       intSplitsFound = 0;
-       intSplitSize = 0;
        intPrevValue = 0;
        
        CaptureString(&PropertySeg2, FALSE);
@@ -623,6 +622,8 @@ void ContactDataObject::ProcessSource(wxString PropertySeg1, wxString PropertySe
 
 void ContactDataObject::ProcessXML(wxString PropertySeg1, wxString PropertySeg2, int *XMLCount){
 
+       // Process the XML data.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -637,7 +638,6 @@ void ContactDataObject::ProcessXML(wxString PropertySeg1, wxString PropertySeg2,
        wxString PropertyData;
        wxString PropertyTokens;
        std::map<int,int>::iterator SLiter;
-       bool FirstToken = TRUE;
        bool PropertyMatched = FALSE;
        
        for (std::map<int, int>::iterator intiter = SplitPoints.begin(); 
@@ -667,6 +667,8 @@ void ContactDataObject::ProcessXML(wxString PropertySeg1, wxString PropertySeg2,
 
 void ContactDataObject::ProcessMember(wxString PropertySeg1, wxString PropertySeg2, int *GroupCount){
 
+       // Process the membership data.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -723,6 +725,8 @@ void ContactDataObject::ProcessMember(wxString PropertySeg1, wxString PropertySe
 
 void ContactDataObject::ProcessFN(wxString PropertySeg1, wxString PropertySeg2, int *FNCount){
 
+       // Process the full name.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -792,6 +796,8 @@ void ContactDataObject::ProcessFN(wxString PropertySeg1, wxString PropertySeg2,
 
 void ContactDataObject::ProcessN(wxString PropertySeg1, wxString PropertySeg2){
 
+       // Process the name.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -931,7 +937,8 @@ void ContactDataObject::ProcessN(wxString PropertySeg1, wxString PropertySeg2){
 
 void ContactDataObject::ProcessClientPIDMap(wxString PropertySeg1, wxString PropertySeg2, int *ClientPIDCount){
 
-       size_t intPropertyLen = PropertySeg1.Len();
+       // Process the Client PID Map.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -940,8 +947,6 @@ void ContactDataObject::ProcessClientPIDMap(wxString PropertySeg1, wxString Prop
        wxString PropertyValue;
        wxString PropertyTokens;
        bool FirstToken = TRUE;
-       int intSplitsFound = 0;
-       int intSplitSize = 0;
        int intPrevValue = 14;
        
        SplitValues(&PropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -978,6 +983,8 @@ void ContactDataObject::ProcessClientPIDMap(wxString PropertySeg1, wxString Prop
 
 void ContactDataObject::ProcessNickname(wxString PropertySeg1, wxString PropertySeg2, int *NicknameCount){
 
+       // Process the Nickname.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -1081,6 +1088,8 @@ void ContactDataObject::ProcessNickname(wxString PropertySeg1, wxString Property
 
 void ContactDataObject::ProcessGender(wxString PropertySeg1, wxString PropertySeg2){
 
+       // Process the gender.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -1151,7 +1160,7 @@ void ContactDataObject::ProcessGender(wxString PropertySeg1, wxString PropertySe
 
 void ContactDataObject::ProcessBirthday(wxString PropertySeg1, wxString PropertySeg2){
 
-       // Process date. Preserve the remainder in the string.
+       // Process birthday date.
 
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
@@ -1253,7 +1262,7 @@ void ContactDataObject::ProcessBirthday(wxString PropertySeg1, wxString Property
 
 void ContactDataObject::ProcessAnniversary(wxString PropertySeg1, wxString PropertySeg2){
 
-       // Process date. Preserve the remainder in the string.
+       // Process the anniversary.
 
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
@@ -1355,6 +1364,8 @@ void ContactDataObject::ProcessAnniversary(wxString PropertySeg1, wxString Prope
 
 void ContactDataObject::ProcessTimeZone(wxString PropertySeg1, wxString PropertySeg2, int *TimeZoneCount){
 
+       // Process the timezone.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -1463,6 +1474,8 @@ void ContactDataObject::ProcessTimeZone(wxString PropertySeg1, wxString Property
 
 void ContactDataObject::ProcessAddress(wxString PropertySeg1, wxString PropertySeg2, int *AddressCount){
 
+       // Process the address.
+       
        size_t intPropertyLen = PropertySeg1.Len();
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
@@ -1762,6 +1775,8 @@ void ContactDataObject::ProcessAddress(wxString PropertySeg1, wxString PropertyS
 
 void ContactDataObject::ProcessEmail(wxString PropertySeg1, wxString PropertySeg2, int *EmailCount){
 
+       // Process the email address.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -1863,6 +1878,8 @@ void ContactDataObject::ProcessEmail(wxString PropertySeg1, wxString PropertySeg
 
 void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2, int *IMCount){
 
+       // Process the IM.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -1984,6 +2001,8 @@ void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2,
 
 void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString PropertySeg2, int *TelephoneCount){
 
+       // Process the telephone.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;
@@ -2006,7 +2025,6 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert
        int intSplitSize = 0;
        int intSplitsFound = 0;
        int intSplitPoint = 0;
-       int intType = 0;
        int intPrevValue = 5;
                
        SplitValues(&PropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -2082,6 +2100,7 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert
                        TypeSplitLength.insert(std::make_pair(intSplitsFound, intSplitSize));                                                           
                
                        int intTypeSeek = 0;
+                       bool TypeFound = FALSE;
                
                        for (std::map<int, int>::iterator typeiter = TypeSplitPoints.begin(); 
                        typeiter != TypeSplitPoints.end(); ++typeiter){
@@ -2101,17 +2120,18 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert
                                
                                }
 
-                               if (TypePropertyName == wxT("home")){
+                               if (TypePropertyName == wxT("home") && TypeFound == FALSE){
                                
                                        PropType = PROPERTY_HOME;
+                                       TypeFound = TRUE;
                                
-                               } else if (TypePropertyName == wxT("work")){
+                               } else if (TypePropertyName == wxT("work") && TypeFound == FALSE){
                                
                                        PropType = PROPERTY_WORK;
-                                                                       
+                                       TypeFound = TRUE;
+                                               
                                }
                                
-                               
                                if (TypePropertyName == wxT("text")){
                                
                                        TelTypeUI.Append(_("text"));
@@ -2268,6 +2288,8 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert
 
 void ContactDataObject::ProcessLanguage(wxString PropertySeg1, wxString PropertySeg2, int *LanguageCount){
 
+       // Process the language.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -2368,6 +2390,8 @@ void ContactDataObject::ProcessLanguage(wxString PropertySeg1, wxString Property
 
 void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString PropertySeg2, int *GeographicCount){
 
+       // Process the geographic location.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
 
@@ -2389,6 +2413,7 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper
        std::map<int, wxString> *GeopositionListPID = NULL;
        std::map<int, wxString> *GeopositionListTokens = NULL;
        std::map<int, wxString> *GeopositionListMediatype = NULL;
+       std::map<int, wxString> *GeopositionListDataType = NULL;
        std::map<int, int> *GeopositionListPref = NULL;
 
        switch(PropType){
@@ -2399,6 +2424,7 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper
                        GeopositionListPID = &GeneralGeographyListPID;
                        GeopositionListTokens = &GeneralGeographyListTokens;
                        GeopositionListMediatype = &GeneralGeographyListMediatype;
+                       GeopositionListDataType = &GeneralGeographyListDataType;
                        GeopositionListPref = &GeneralGeographyListPref;        
                        break;
                case PROPERTY_HOME:
@@ -2408,6 +2434,7 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper
                        GeopositionListPID = &HomeGeographyListPID;
                        GeopositionListTokens = &HomeGeographyListTokens;
                        GeopositionListMediatype = &HomeGeographyListMediatype;
+                       GeopositionListDataType = &HomeGeographyListDataType;
                        GeopositionListPref = &HomeGeographyListPref;   
                        break;
                case PROPERTY_WORK:
@@ -2416,7 +2443,8 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper
                        GeopositionListAltID = &BusinessGeographyListAltID;
                        GeopositionListPID = &BusinessGeographyListPID;
                        GeopositionListTokens = &BusinessGeographyListTokens;
-                       GeopositionListMediatype = &BusinessGeographyListMediatype;     
+                       GeopositionListMediatype = &BusinessGeographyListMediatype;
+                       GeopositionListDataType = &BusinessGeographyListDataType;
                        GeopositionListPref = &BusinessGeographyListPref;
                        break;
        }
@@ -2458,9 +2486,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()){
@@ -2473,7 +2513,8 @@ void ContactDataObject::ProcessGeographic(wxString PropertySeg1, wxString Proper
 
 void ContactDataObject::ProcessRelated(wxString PropertySeg1, wxString PropertySeg2, int *RelatedCount){
 
-       size_t intPropertyLen = PropertySeg1.Len();
+       // Process the relation.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -2485,8 +2526,6 @@ void ContactDataObject::ProcessRelated(wxString PropertySeg1, wxString PropertyS
        wxString RelatedTypeOriginal;                   
        wxString RelatedName;
        bool FirstToken = TRUE;                 
-       int intSplitsFound = 0;
-       int intSplitSize = 0;
        int intPrevValue = 9;
        
        SplitValues(&PropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -2661,6 +2700,8 @@ void ContactDataObject::ProcessRelated(wxString PropertySeg1, wxString PropertyS
 
 void ContactDataObject::ProcessURL(wxString PropertySeg1, wxString PropertySeg2, int *URLCount){
 
+       // Process the URL.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -2785,6 +2826,8 @@ void ContactDataObject::ProcessURL(wxString PropertySeg1, wxString PropertySeg2,
 
 void ContactDataObject::ProcessTitle(wxString PropertySeg1, wxString PropertySeg2, int *TitleCount){
 
+       // Process the title.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -2909,6 +2952,8 @@ void ContactDataObject::ProcessTitle(wxString PropertySeg1, wxString PropertySeg
 
 void ContactDataObject::ProcessRole(wxString PropertySeg1, wxString PropertySeg2, int *RoleCount){
 
+       // Process the role.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -3033,6 +3078,8 @@ void ContactDataObject::ProcessRole(wxString PropertySeg1, wxString PropertySeg2
 
 void ContactDataObject::ProcessOrganisation(wxString PropertySeg1, wxString PropertySeg2, int *OrganisationCount){
 
+       // Process the organisation.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -3162,6 +3209,8 @@ void ContactDataObject::ProcessOrganisation(wxString PropertySeg1, wxString Prop
 
 void ContactDataObject::ProcessNote(wxString PropertySeg1, wxString PropertySeg2, int *NoteCount){
 
+       // Process the note.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -3286,6 +3335,8 @@ void ContactDataObject::ProcessNote(wxString PropertySeg1, wxString PropertySeg2
 
 void ContactDataObject::ProcessCategory(wxString PropertySeg1, wxString PropertySeg2, int *CategoryCount){
 
+       // Process the category.
+       
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -3536,6 +3587,8 @@ void ContactDataObject::ProcessCategory(wxString PropertySeg1, wxString Property
 
 void ContactDataObject::ProcessPhoto(wxString PropertySeg1, wxString PropertySeg2, int *PhotoCount){
 
+       // Process the photo.
+       
        size_t intPropertyLen = PropertySeg1.Len();
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
@@ -3704,6 +3757,8 @@ void ContactDataObject::ProcessPhoto(wxString PropertySeg1, wxString PropertySeg
 
 void ContactDataObject::ProcessLogo(wxString PropertySeg1, wxString PropertySeg2, int *LogoCount){
 
+       // Process the logo.
+       
        size_t intPropertyLen = PropertySeg1.Len();
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
@@ -3872,6 +3927,8 @@ void ContactDataObject::ProcessLogo(wxString PropertySeg1, wxString PropertySeg2
 
 void ContactDataObject::ProcessSound(wxString PropertySeg1, wxString PropertySeg2, int *SoundCount){
 
+       // Process the sound.
+       
        size_t intPropertyLen = PropertySeg1.Len();
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
@@ -4041,6 +4098,8 @@ void ContactDataObject::ProcessSound(wxString PropertySeg1, wxString PropertySeg
 
 void ContactDataObject::ProcessCalendarURI(wxString PropertySeg1, wxString PropertySeg2, int *CalURICount){
 
+       // Process the calendar URI.
+       
        size_t intPropertyLen = PropertySeg1.Len();
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
@@ -4050,8 +4109,6 @@ void ContactDataObject::ProcessCalendarURI(wxString PropertySeg1, wxString Prope
        wxString PropertyValue;
        wxString PropertyTokens;
        bool FirstToken = TRUE;
-       int intSplitsFound = 0;
-       int intSplitSize = 0;
        int intPrevValue = 8;
        
        SplitValues(&PropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -4110,11 +4167,8 @@ void ContactDataObject::ProcessCalendarURI(wxString PropertySeg1, wxString Prope
        
        }       
        
-       intPropertyLen = PropertySeg2.Len();
        SplitPoints.clear();
        SplitLength.clear();
-       intSplitsFound = 0;
-       intSplitSize = 0;
        intPrevValue = 0;
        
        CaptureString(&PropertySeg2, FALSE);
@@ -4144,7 +4198,8 @@ void ContactDataObject::ProcessCalendarURI(wxString PropertySeg1, wxString Prope
 
 void ContactDataObject::ProcessCalendarAddressURI(wxString PropertySeg1, wxString PropertySeg2, int *CalAdrURICount){
 
-       size_t intPropertyLen = PropertySeg1.Len();
+       // Process the calendar address URI.
+
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -4153,8 +4208,6 @@ void ContactDataObject::ProcessCalendarAddressURI(wxString PropertySeg1, wxStrin
        wxString PropertyValue;
        wxString PropertyTokens;
        bool FirstToken = TRUE;
-       int intSplitsFound = 0;
-       int intSplitSize = 0;
        int intPrevValue = 8;
        
        SplitValues(&PropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -4213,11 +4266,8 @@ void ContactDataObject::ProcessCalendarAddressURI(wxString PropertySeg1, wxStrin
        
        }       
        
-       intPropertyLen = PropertySeg2.Len();
        SplitPoints.clear();
        SplitLength.clear();
-       intSplitsFound = 0;
-       intSplitSize = 0;
        intPrevValue = 0;
        
        CaptureString(&PropertySeg2, FALSE);
@@ -4247,6 +4297,8 @@ void ContactDataObject::ProcessCalendarAddressURI(wxString PropertySeg1, wxStrin
 
 void ContactDataObject::ProcessCalendarFreeBusy(wxString PropertySeg1, wxString PropertySeg2, int *FreeBusyAddressCount){
 
+       // Process the calendar free busy URL.
+       
        size_t intPropertyLen = PropertySeg1.Len();
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
@@ -4256,8 +4308,6 @@ void ContactDataObject::ProcessCalendarFreeBusy(wxString PropertySeg1, wxString
        wxString PropertyValue;
        wxString PropertyTokens;
        bool FirstToken = TRUE;
-       int intSplitsFound = 0;
-       int intSplitSize = 0;
        int intPrevValue = 7;
        
        SplitValues(&PropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -4319,8 +4369,6 @@ void ContactDataObject::ProcessCalendarFreeBusy(wxString PropertySeg1, wxString
        intPropertyLen = PropertySeg2.Len();
        SplitPoints.clear();
        SplitLength.clear();
-       intSplitsFound = 0;
-       intSplitSize = 0;
        intPrevValue = 0;
        
        CaptureString(&PropertySeg2, FALSE);
@@ -4350,7 +4398,8 @@ void ContactDataObject::ProcessCalendarFreeBusy(wxString PropertySeg1, wxString
 
 void ContactDataObject::ProcessKey(wxString PropertySeg1, wxString PropertySeg2, int *KeyCount){
 
-       size_t intPropertyLen = PropertySeg1.Len();
+       // Process the key.
+
        std::map<int, int> SplitPoints;
        std::map<int, int> SplitLength;
        std::map<int, int>::iterator SLiter;                    
@@ -4416,7 +4465,7 @@ void ContactDataObject::ProcessKey(wxString PropertySeg1, wxString PropertySeg2,
        
        }                               
        
-       intPropertyLen = PropertySeg2.Len();
+       size_t intPropertyLen = PropertySeg2.Len();
        SplitPoints.clear();
        SplitLength.clear();
        intSplitsFound = 0;
@@ -4531,6 +4580,8 @@ void ContactDataObject::ProcessKey(wxString PropertySeg1, wxString PropertySeg2,
 
 void ContactDataObject::ProcessVendor(wxString PropertySeg1, wxString PropertySeg2, int *VendorCount){
 
+       // Process the vendor information.
+       
        // Split the Vendor three ways.
        
        wxStringTokenizer wSTVendorDetails(PropertySeg1, wxT("-"));
@@ -4565,505 +4616,507 @@ void ContactDataObject::ProcessVendor(wxString PropertySeg1, wxString PropertySe
 
 void ContactDataObject::ClearData(){
 
-    NameTitle.clear();
-    NameForename.clear();
-    NameSurname.clear();
-    NameOtherNames.clear();
-    NameSuffix.clear();
-    NameNickname.clear();
-    NameDisplayAs.clear();
-    NameLanguage.clear();
-    NameAltID.clear();
-    NameTokens.clear();
-    
-    Birthday.clear();
-    BirthdayAltID.clear();
-    BirthdayCalScale.clear();
-    BirthdayTokens.clear();
-    Anniversary.clear();
-    AnniversaryAltID.clear();
-    AnniversaryCalScale.clear();
-    AnniversaryTokens.clear();
-    
-    Gender.clear();
-    GenderDetails.clear();
-    GenderTokens.clear();
-    
-    UIDToken.clear();
-    Revision.clear();
-    RevisionTokens.clear();
-    
-    SourceList.clear();
-    SourceListAltID.clear();
-    SourceListPID.clear();
-    SourceListType.clear();
-    SourceListTokens.clear();
-    SourceListMediatype.clear();
-    SourceListPref.clear();
-    
-    XMLList.clear();
-    XMLListAltID.clear();
-    
-    ClientPIDList.clear();
-    ClientPIDListTokens.clear();
-    
-    FullNamesList.clear();    
-    FullNamesListType.clear();
-    FullNamesListLanguage.clear();
-    FullNamesListAltID.clear();
-    FullNamesListPID.clear();
-    FullNamesListTokens.clear();
-    FullNamesListPref.clear();
-    
-    GeneralNicknamesList.clear();
-    GeneralNicknamesListType.clear();
-    GeneralNicknamesListLanguage.clear();
-    GeneralNicknamesListAltID.clear();
-    GeneralNicknamesListPID.clear();
-    GeneralNicknamesListTokens.clear();        
-    GeneralNicknamesListPref.clear();        
-    
-    GeneralAddressList.clear();
-    GeneralAddressListTown.clear();
-    GeneralAddressListCounty.clear();
-    GeneralAddressListPostCode.clear();
-    GeneralAddressListCountry.clear();
-    GeneralAddressListLabel.clear();
-    GeneralAddressListLang.clear();        
-    GeneralAddressListAltID.clear();
-    GeneralAddressListPID.clear();
-    GeneralAddressListTokens.clear();
-    GeneralAddressListGeo.clear();
-    GeneralAddressListTimezone.clear();        
-    GeneralAddressListType.clear();
-    GeneralAddressListMediatype.clear();
-    GeneralAddressListPref.clear();
-    
-    GeneralEmailList.clear();
-    GeneralEmailListAltID.clear();
-    GeneralEmailListPID.clear();
-    GeneralEmailListType.clear();
-    GeneralEmailListTokens.clear();
-    GeneralEmailListPref.clear();
-    
-    GeneralIMList.clear();
-    GeneralIMListAltID.clear();
-    GeneralIMListPID.clear();
-    GeneralIMListType.clear();
-    GeneralIMListTypeInfo.clear();
-    GeneralIMListTokens.clear();
-    GeneralIMListMediatype.clear();
-    GeneralIMListPref.clear();
-    
-    GeneralTelephoneList.clear();
-    GeneralTelephoneListAltID.clear();
-    GeneralTelephoneListPID.clear();
-    GeneralTelephoneListType.clear();
-    GeneralTelephoneListTokens.clear();
-    GeneralTelephoneListTypeInfo.clear();
-    GeneralTelephoneListPref.clear();
-    
-    GeneralLanguageList.clear();
-    GeneralLanguageListAltID.clear();
-    GeneralLanguageListPID.clear();
-    GeneralLanguageListType.clear();
-    GeneralLanguageListTokens.clear();
-    GeneralLanguageListPref.clear();
-    
-    GeneralTZList.clear();
-    GeneralTZListAltID.clear();
-    GeneralTZListPID.clear();
-    GeneralTZListType.clear();
-    GeneralTZListTokens.clear();
-    GeneralTZListMediatype.clear();
-    GeneralTZListPref.clear();
-    
-    GeneralGeographyList.clear();
-    GeneralGeographyListAltID.clear();
-    GeneralGeographyListPID.clear();
-    GeneralGeographyListType.clear();
-    GeneralGeographyListTokens.clear();
-    GeneralGeographyListMediatype.clear();
-    GeneralGeographyListPref.clear();
-    
-    GeneralRelatedList.clear();
-    GeneralRelatedListRelType.clear();
-    GeneralRelatedListLanguage.clear();
-    GeneralRelatedListAltID.clear();
-    GeneralRelatedListPID.clear();
-    GeneralRelatedListType.clear();
-    GeneralRelatedListTokens.clear();
-    GeneralRelatedListPref.clear();
-    
-    GeneralWebsiteList.clear();
-    GeneralWebsiteListAltID.clear();
-    GeneralWebsiteListPID.clear();
-    GeneralWebsiteListType.clear();
-    GeneralWebsiteListTokens.clear();
-    GeneralWebsiteListMediatype.clear();
-    GeneralWebsiteListPref.clear();
-    
-    GeneralTitleList.clear();
-    GeneralTitleListLanguage.clear();        
-    GeneralTitleListAltID.clear();
-    GeneralTitleListPID.clear();
-    GeneralTitleListType.clear();
-    GeneralTitleListTokens.clear();
-    GeneralTitleListPref.clear();
-    
-    GeneralRoleList.clear();
-    GeneralRoleListLanguage.clear();        
-    GeneralRoleListAltID.clear();
-    GeneralRoleListPID.clear();
-    GeneralRoleListType.clear();
-    GeneralRoleListTokens.clear();
-    GeneralRoleListPref.clear();
-    
-    GeneralOrganisationsList.clear();
-    GeneralOrganisationsListLanguage.clear();        
-    GeneralOrganisationsListAltID.clear();
-    GeneralOrganisationsListPID.clear();
-    GeneralOrganisationsListType.clear();
-    GeneralOrganisationsListTokens.clear();
-    GeneralOrganisationsListSortAs.clear();
-    GeneralOrganisationsListPref.clear();
-    
-    GeneralNoteList.clear();
-    GeneralNoteListLanguage.clear();        
-    GeneralNoteListAltID.clear();
-    GeneralNoteListPID.clear();
-    GeneralNoteListType.clear();
-    GeneralNoteListTokens.clear();
-    GeneralNoteListPref.clear();
-    
-    /* Items on Home Tab */        
-    
-    HomeNicknamesList.clear();
-    HomeNicknamesListType.clear();
-    HomeNicknamesListLanguage.clear();
-    HomeNicknamesListAltID.clear();
-    HomeNicknamesListPID.clear();
-    HomeNicknamesListTokens.clear();        
-    HomeNicknamesListPref.clear();        
-    
-    HomeAddressList.clear();
-    HomeAddressListTown.clear();
-    HomeAddressListCounty.clear();
-    HomeAddressListPostCode.clear();
-    HomeAddressListCountry.clear();
-    HomeAddressListLabel.clear();
-    HomeAddressListLang.clear();        
-    HomeAddressListAltID.clear();
-    HomeAddressListPID.clear();
-    HomeAddressListTokens.clear();
-    HomeAddressListGeo.clear();
-    HomeAddressListTimezone.clear();        
-    HomeAddressListType.clear();
-    HomeAddressListMediatype.clear();
-    HomeAddressListPref.clear();
-    
-    HomeEmailList.clear();
-    HomeEmailListAltID.clear();
-    HomeEmailListPID.clear();
-    HomeEmailListType.clear();
-    HomeEmailListTokens.clear();
-    HomeEmailListPref.clear();
-    
-    HomeIMList.clear();
-    HomeIMListAltID.clear();
-    HomeIMListPID.clear();
-    HomeIMListType.clear();
-    HomeIMListTypeInfo.clear();
-    HomeIMListTokens.clear();
-    HomeIMListMediatype.clear();
-    HomeIMListPref.clear();
-    
-    HomeTelephoneList.clear();
-    HomeTelephoneListAltID.clear();
-    HomeTelephoneListPID.clear();
-    HomeTelephoneListType.clear();
-    HomeTelephoneListTokens.clear();
-    HomeTelephoneListTypeInfo.clear();
-    HomeTelephoneListPref.clear();
-    
-    HomeLanguageList.clear();
-    HomeLanguageListAltID.clear();
-    HomeLanguageListPID.clear();
-    HomeLanguageListType.clear();
-    HomeLanguageListTokens.clear();
-    HomeLanguageListPref.clear();
-    
-    HomeTZList.clear();
-    HomeTZListAltID.clear();
-    HomeTZListPID.clear();
-    HomeTZListType.clear();
-    HomeTZListTokens.clear();
-    HomeTZListMediatype.clear();
-    HomeTZListPref.clear();
-    
-    HomeGeographyList.clear();
-    HomeGeographyListAltID.clear();
-    HomeGeographyListPID.clear();
-    HomeGeographyListType.clear();
-    HomeGeographyListTokens.clear();
-    HomeGeographyListMediatype.clear();
-    HomeGeographyListPref.clear();       
-    
-    HomeWebsiteList.clear();
-    HomeWebsiteListAltID.clear();
-    HomeWebsiteListPID.clear();
-    HomeWebsiteListType.clear();
-    HomeWebsiteListTokens.clear();
-    HomeWebsiteListMediatype.clear();
-    HomeWebsiteListPref.clear();
-    
-    HomeTitleList.clear();
-    HomeTitleListLanguage.clear();
-    HomeTitleListAltID.clear();
-    HomeTitleListPID.clear();
-    HomeTitleListType.clear();
-    HomeTitleListTokens.clear();
-    HomeTitleListPref.clear();
-    
-    HomeRoleList.clear();
-    HomeRoleListLanguage.clear();        
-    HomeRoleListAltID.clear();
-    HomeRoleListPID.clear();
-    HomeRoleListType.clear();
-    HomeRoleListTokens.clear();
-    HomeRoleListPref.clear();
-    
-    HomeOrganisationsList.clear();
-    HomeOrganisationsListLanguage.clear();        
-    HomeOrganisationsListAltID.clear();
-    HomeOrganisationsListPID.clear();
-    HomeOrganisationsListType.clear();
-    HomeOrganisationsListTokens.clear();
-    HomeOrganisationsListSortAs.clear();
-    HomeOrganisationsListPref.clear();
-    
-    HomeNoteList.clear();
-    HomeNoteListLanguage.clear();        
-    HomeNoteListAltID.clear();
-    HomeNoteListPID.clear();
-    HomeNoteListType.clear();
-    HomeNoteListTokens.clear();
-    HomeNoteListPref.clear();        
-    
-    /* Items on the Business tab */
-    
-    BusinessNicknamesList.clear();
-    BusinessNicknamesListType.clear();
-    BusinessNicknamesListLanguage.clear();
-    BusinessNicknamesListAltID.clear();
-    BusinessNicknamesListPID.clear();
-    BusinessNicknamesListTokens.clear();        
-    BusinessNicknamesListPref.clear();        
-    
-    BusinessAddressList.clear();
-    BusinessAddressListTown.clear();
-    BusinessAddressListCounty.clear();
-    BusinessAddressListPostCode.clear();
-    BusinessAddressListCountry.clear();
-    BusinessAddressListLabel.clear();
-    BusinessAddressListLang.clear();        
-    BusinessAddressListAltID.clear();
-    BusinessAddressListPID.clear();
-    BusinessAddressListTokens.clear();
-    BusinessAddressListGeo.clear();
-    BusinessAddressListTimezone.clear();        
-    BusinessAddressListType.clear();
-    BusinessAddressListMediatype.clear();
-    BusinessAddressListPref.clear();
-    
-    BusinessEmailList.clear();
-    BusinessEmailListAltID.clear();
-    BusinessEmailListPID.clear();
-    BusinessEmailListType.clear();
-    BusinessEmailListTokens.clear();
-    BusinessEmailListPref.clear();
-    
-    BusinessIMList.clear();
-    BusinessIMListAltID.clear();
-    BusinessIMListPID.clear();
-    BusinessIMListType.clear();
-    BusinessIMListTokens.clear();
-    BusinessIMListMediatype.clear();
-    BusinessIMListPref.clear();
-    
-    BusinessTelephoneList.clear();
-    BusinessTelephoneListAltID.clear();
-    BusinessTelephoneListPID.clear();
-    BusinessTelephoneListType.clear();
-    BusinessTelephoneListTokens.clear();
-    BusinessTelephoneListPref.clear();
-    
-    BusinessLanguageList.clear();
-    BusinessLanguageListAltID.clear();
-    BusinessLanguageListPID.clear();
-    BusinessLanguageListType.clear();
-    BusinessLanguageListTokens.clear();
-    BusinessLanguageListPref.clear();
-    
-    BusinessTZList.clear();
-    BusinessTZListAltID.clear();
-    BusinessTZListPID.clear();
-    BusinessTZListType.clear();
-    BusinessTZListTokens.clear();
-    BusinessTZListMediatype.clear();
-    BusinessTZListPref.clear();
-    
-    BusinessGeographyList.clear();
-    BusinessGeographyListAltID.clear();
-    BusinessGeographyListPID.clear();
-    BusinessGeographyListType.clear();
-    BusinessGeographyListTokens.clear();
-    BusinessGeographyListMediatype.clear();
-    BusinessGeographyListPref.clear();          
-    
-    BusinessWebsiteList.clear();
-    BusinessWebsiteListAltID.clear();
-    BusinessWebsiteListPID.clear();
-    BusinessWebsiteListType.clear();
-    BusinessWebsiteListTokens.clear();
-    BusinessWebsiteListMediatype.clear();
-    BusinessWebsiteListPref.clear();
-    
-    BusinessTitleList.clear();
-    BusinessTitleListLanguage.clear();        
-    BusinessTitleListAltID.clear();
-    BusinessTitleListPID.clear();
-    BusinessTitleListType.clear();
-    BusinessTitleListTokens.clear();
-    BusinessTitleListPref.clear();
-    
-    BusinessRoleList.clear();
-    BusinessRoleListLanguage.clear();        
-    BusinessRoleListAltID.clear();
-    BusinessRoleListPID.clear();
-    BusinessRoleListType.clear();
-    BusinessRoleListTokens.clear();
-    BusinessRoleListPref.clear();
-    
-    BusinessOrganisationsList.clear();
-    BusinessOrganisationsListLanguage.clear();        
-    BusinessOrganisationsListAltID.clear();
-    BusinessOrganisationsListPID.clear();
-    BusinessOrganisationsListType.clear();
-    BusinessOrganisationsListTokens.clear();
-    BusinessOrganisationsListSortAs.clear();        
-    BusinessOrganisationsListPref.clear();
-    
-    BusinessNoteList.clear();
-    BusinessNoteListLanguage.clear();        
-    BusinessNoteListAltID.clear();
-    BusinessNoteListPID.clear();
-    BusinessNoteListType.clear();
-    BusinessNoteListTokens.clear();
-    BusinessNoteListPref.clear();        
-    
-    /* Items on the Categories tab */
-    
-    CategoriesList.clear();
-    CategoriesListAltID.clear();
-    CategoriesListPID.clear();
-    CategoriesListType.clear();
-    CategoriesListTokens.clear();
-    CategoriesListLanguage.clear();
-    CategoriesListPref.clear();    
-    
-    /* Items on the Groups tab */
-    
-    GroupsList.clear();
-    GroupsListAltID.clear();
-    GroupsListPID.clear();
-    GroupsListType.clear();
-    GroupsListMediaType.clear();
-    GroupsListTokens.clear();
-    GroupsListPref.clear();
-    
-    /* Items on the Pictures tab */
-    
-    PicturesList.clear();
-    PicturesListAltID.clear();
-    PicturesListPID.clear();
-    PicturesListType.clear();
-    PicturesListPicEncType.clear();
-    PicturesListPictureType.clear();
-    PicturesListTokens.clear();
-    PicturesListMediatype.clear();        
-    PicturesListPref.clear();
-    
-    /* Items on the Logos tab */
-    
-    LogosList.clear();
-    LogosListAltID.clear();
-    LogosListPID.clear();
-    LogosListType.clear();
-    LogosListPicEncType.clear();        
-    LogosListPictureType.clear();
-    LogosListTokens.clear();
-    LogosListMediatype.clear();        
-    LogosListPref.clear();
-    
-    /* Items on the Sounds tab */
-    
-    SoundsList.clear();
-    SoundsListAltID.clear();
-    SoundsListPID.clear();
-    SoundsListType.clear();
-    SoundsListAudioEncType.clear();        
-    SoundsListAudioType.clear();        
-    SoundsListTokens.clear();
-    SoundsListMediatype.clear();        
-    SoundsListPref.clear();    
-    
-    /* Items on the Calendaring tab */
-    
-    CalendarList.clear();
-    CalendarListAltID.clear();
-    CalendarListPID.clear();
-    CalendarListType.clear();
-    CalendarListTokens.clear();
-    CalendarListMediatype.clear();        
-    CalendarListPref.clear();
-    
-    CalendarRequestList.clear();
-    CalendarRequestListAltID.clear();
-    CalendarRequestListPID.clear();
-    CalendarRequestListType.clear();
-    CalendarRequestListTokens.clear();
-    CalendarRequestListMediatype.clear();        
-    CalendarRequestListPref.clear();        
-    
-    FreeBusyList.clear();
-    FreeBusyListAltID.clear();
-    FreeBusyListPID.clear();
-    FreeBusyListType.clear();
-    FreeBusyListTokens.clear();
-    FreeBusyListMediatype.clear();        
-    FreeBusyListPref.clear();
-    
-    /* Items on the Security tab */
-    
-    KeyList.clear();
-    KeyListAltID.clear();
-    KeyListPID.clear();
-    KeyListKeyType.clear();        
-    KeyListDataType.clear();        
-    KeyListDataEncType.clear();
-    KeyListType.clear();
-    KeyListTokens.clear();
-    KeyListPref.clear();
-    
-    /* Items on the Other tab */
-    
-    VendorList.clear();
-    VendorListPEN.clear();
-    VendorListElement.clear();
-    
-    XTokenList.clear();
-    XTokenListTokens.clear();
+       // Clear the contact information.
+
+       NameTitle.clear();
+       NameForename.clear();
+       NameSurname.clear();
+       NameOtherNames.clear();
+       NameSuffix.clear();
+       NameNickname.clear();
+       NameDisplayAs.clear();
+       NameLanguage.clear();
+       NameAltID.clear();
+       NameTokens.clear();
+
+       Birthday.clear();
+       BirthdayAltID.clear();
+       BirthdayCalScale.clear();
+       BirthdayTokens.clear();
+       Anniversary.clear();
+       AnniversaryAltID.clear();
+       AnniversaryCalScale.clear();
+       AnniversaryTokens.clear();
+
+       Gender.clear();
+       GenderDetails.clear();
+       GenderTokens.clear();
+
+       UIDToken.clear();
+       Revision.clear();
+       RevisionTokens.clear();
+
+       SourceList.clear();
+       SourceListAltID.clear();
+       SourceListPID.clear();
+       SourceListType.clear();
+       SourceListTokens.clear();
+       SourceListMediatype.clear();
+       SourceListPref.clear();
+
+       XMLList.clear();
+       XMLListAltID.clear();
+
+       ClientPIDList.clear();
+       ClientPIDListTokens.clear();
+
+       FullNamesList.clear();    
+       FullNamesListType.clear();
+       FullNamesListLanguage.clear();
+       FullNamesListAltID.clear();
+       FullNamesListPID.clear();
+       FullNamesListTokens.clear();
+       FullNamesListPref.clear();
+
+       GeneralNicknamesList.clear();
+       GeneralNicknamesListType.clear();
+       GeneralNicknamesListLanguage.clear();
+       GeneralNicknamesListAltID.clear();
+       GeneralNicknamesListPID.clear();
+       GeneralNicknamesListTokens.clear();        
+       GeneralNicknamesListPref.clear();        
+
+       GeneralAddressList.clear();
+       GeneralAddressListTown.clear();
+       GeneralAddressListCounty.clear();
+       GeneralAddressListPostCode.clear();
+       GeneralAddressListCountry.clear();
+       GeneralAddressListLabel.clear();
+       GeneralAddressListLang.clear();        
+       GeneralAddressListAltID.clear();
+       GeneralAddressListPID.clear();
+       GeneralAddressListTokens.clear();
+       GeneralAddressListGeo.clear();
+       GeneralAddressListTimezone.clear();        
+       GeneralAddressListType.clear();
+       GeneralAddressListMediatype.clear();
+       GeneralAddressListPref.clear();
+
+       GeneralEmailList.clear();
+       GeneralEmailListAltID.clear();
+       GeneralEmailListPID.clear();
+       GeneralEmailListType.clear();
+       GeneralEmailListTokens.clear();
+       GeneralEmailListPref.clear();
+
+       GeneralIMList.clear();
+       GeneralIMListAltID.clear();
+       GeneralIMListPID.clear();
+       GeneralIMListType.clear();
+       GeneralIMListTypeInfo.clear();
+       GeneralIMListTokens.clear();
+       GeneralIMListMediatype.clear();
+       GeneralIMListPref.clear();
+
+       GeneralTelephoneList.clear();
+       GeneralTelephoneListAltID.clear();
+       GeneralTelephoneListPID.clear();
+       GeneralTelephoneListType.clear();
+       GeneralTelephoneListTokens.clear();
+       GeneralTelephoneListTypeInfo.clear();
+       GeneralTelephoneListPref.clear();
+
+       GeneralLanguageList.clear();
+       GeneralLanguageListAltID.clear();
+       GeneralLanguageListPID.clear();
+       GeneralLanguageListType.clear();
+       GeneralLanguageListTokens.clear();
+       GeneralLanguageListPref.clear();
+
+       GeneralTZList.clear();
+       GeneralTZListAltID.clear();
+       GeneralTZListPID.clear();
+       GeneralTZListType.clear();
+       GeneralTZListTokens.clear();
+       GeneralTZListMediatype.clear();
+       GeneralTZListPref.clear();
+
+       GeneralGeographyList.clear();
+       GeneralGeographyListAltID.clear();
+       GeneralGeographyListPID.clear();
+       GeneralGeographyListType.clear();
+       GeneralGeographyListTokens.clear();
+       GeneralGeographyListMediatype.clear();
+       GeneralGeographyListPref.clear();
+
+       GeneralRelatedList.clear();
+       GeneralRelatedListRelType.clear();
+       GeneralRelatedListLanguage.clear();
+       GeneralRelatedListAltID.clear();
+       GeneralRelatedListPID.clear();
+       GeneralRelatedListType.clear();
+       GeneralRelatedListTokens.clear();
+       GeneralRelatedListPref.clear();
+
+       GeneralWebsiteList.clear();
+       GeneralWebsiteListAltID.clear();
+       GeneralWebsiteListPID.clear();
+       GeneralWebsiteListType.clear();
+       GeneralWebsiteListTokens.clear();
+       GeneralWebsiteListMediatype.clear();
+       GeneralWebsiteListPref.clear();
+
+       GeneralTitleList.clear();
+       GeneralTitleListLanguage.clear();        
+       GeneralTitleListAltID.clear();
+       GeneralTitleListPID.clear();
+       GeneralTitleListType.clear();
+       GeneralTitleListTokens.clear();
+       GeneralTitleListPref.clear();
+
+       GeneralRoleList.clear();
+       GeneralRoleListLanguage.clear();        
+       GeneralRoleListAltID.clear();
+       GeneralRoleListPID.clear();
+       GeneralRoleListType.clear();
+       GeneralRoleListTokens.clear();
+       GeneralRoleListPref.clear();
+
+       GeneralOrganisationsList.clear();
+       GeneralOrganisationsListLanguage.clear();        
+       GeneralOrganisationsListAltID.clear();
+       GeneralOrganisationsListPID.clear();
+       GeneralOrganisationsListType.clear();
+       GeneralOrganisationsListTokens.clear();
+       GeneralOrganisationsListSortAs.clear();
+       GeneralOrganisationsListPref.clear();
+
+       GeneralNoteList.clear();
+       GeneralNoteListLanguage.clear();        
+       GeneralNoteListAltID.clear();
+       GeneralNoteListPID.clear();
+       GeneralNoteListType.clear();
+       GeneralNoteListTokens.clear();
+       GeneralNoteListPref.clear();
+
+       /* Items on Home Tab */        
+
+       HomeNicknamesList.clear();
+       HomeNicknamesListType.clear();
+       HomeNicknamesListLanguage.clear();
+       HomeNicknamesListAltID.clear();
+       HomeNicknamesListPID.clear();
+       HomeNicknamesListTokens.clear();        
+       HomeNicknamesListPref.clear();        
+
+       HomeAddressList.clear();
+       HomeAddressListTown.clear();
+       HomeAddressListCounty.clear();
+       HomeAddressListPostCode.clear();
+       HomeAddressListCountry.clear();
+       HomeAddressListLabel.clear();
+       HomeAddressListLang.clear();        
+       HomeAddressListAltID.clear();
+       HomeAddressListPID.clear();
+       HomeAddressListTokens.clear();
+       HomeAddressListGeo.clear();
+       HomeAddressListTimezone.clear();        
+       HomeAddressListType.clear();
+       HomeAddressListMediatype.clear();
+       HomeAddressListPref.clear();
+
+       HomeEmailList.clear();
+       HomeEmailListAltID.clear();
+       HomeEmailListPID.clear();
+       HomeEmailListType.clear();
+       HomeEmailListTokens.clear();
+       HomeEmailListPref.clear();
+
+       HomeIMList.clear();
+       HomeIMListAltID.clear();
+       HomeIMListPID.clear();
+       HomeIMListType.clear();
+       HomeIMListTypeInfo.clear();
+       HomeIMListTokens.clear();
+       HomeIMListMediatype.clear();
+       HomeIMListPref.clear();
+
+       HomeTelephoneList.clear();
+       HomeTelephoneListAltID.clear();
+       HomeTelephoneListPID.clear();
+       HomeTelephoneListType.clear();
+       HomeTelephoneListTokens.clear();
+       HomeTelephoneListTypeInfo.clear();
+       HomeTelephoneListPref.clear();
+
+       HomeLanguageList.clear();
+       HomeLanguageListAltID.clear();
+       HomeLanguageListPID.clear();
+       HomeLanguageListType.clear();
+       HomeLanguageListTokens.clear();
+       HomeLanguageListPref.clear();
+
+       HomeTZList.clear();
+       HomeTZListAltID.clear();
+       HomeTZListPID.clear();
+       HomeTZListType.clear();
+       HomeTZListTokens.clear();
+       HomeTZListMediatype.clear();
+       HomeTZListPref.clear();
+
+       HomeGeographyList.clear();
+       HomeGeographyListAltID.clear();
+       HomeGeographyListPID.clear();
+       HomeGeographyListType.clear();
+       HomeGeographyListTokens.clear();
+       HomeGeographyListMediatype.clear();
+       HomeGeographyListPref.clear();       
+
+       HomeWebsiteList.clear();
+       HomeWebsiteListAltID.clear();
+       HomeWebsiteListPID.clear();
+       HomeWebsiteListType.clear();
+       HomeWebsiteListTokens.clear();
+       HomeWebsiteListMediatype.clear();
+       HomeWebsiteListPref.clear();
+
+       HomeTitleList.clear();
+       HomeTitleListLanguage.clear();
+       HomeTitleListAltID.clear();
+       HomeTitleListPID.clear();
+       HomeTitleListType.clear();
+       HomeTitleListTokens.clear();
+       HomeTitleListPref.clear();
+
+       HomeRoleList.clear();
+       HomeRoleListLanguage.clear();        
+       HomeRoleListAltID.clear();
+       HomeRoleListPID.clear();
+       HomeRoleListType.clear();
+       HomeRoleListTokens.clear();
+       HomeRoleListPref.clear();
+
+       HomeOrganisationsList.clear();
+       HomeOrganisationsListLanguage.clear();        
+       HomeOrganisationsListAltID.clear();
+       HomeOrganisationsListPID.clear();
+       HomeOrganisationsListType.clear();
+       HomeOrganisationsListTokens.clear();
+       HomeOrganisationsListSortAs.clear();
+       HomeOrganisationsListPref.clear();
+
+       HomeNoteList.clear();
+       HomeNoteListLanguage.clear();        
+       HomeNoteListAltID.clear();
+       HomeNoteListPID.clear();
+       HomeNoteListType.clear();
+       HomeNoteListTokens.clear();
+       HomeNoteListPref.clear();        
+
+       /* Items on the Business tab */
+
+       BusinessNicknamesList.clear();
+       BusinessNicknamesListType.clear();
+       BusinessNicknamesListLanguage.clear();
+       BusinessNicknamesListAltID.clear();
+       BusinessNicknamesListPID.clear();
+       BusinessNicknamesListTokens.clear();        
+       BusinessNicknamesListPref.clear();        
+
+       BusinessAddressList.clear();
+       BusinessAddressListTown.clear();
+       BusinessAddressListCounty.clear();
+       BusinessAddressListPostCode.clear();
+       BusinessAddressListCountry.clear();
+       BusinessAddressListLabel.clear();
+       BusinessAddressListLang.clear();        
+       BusinessAddressListAltID.clear();
+       BusinessAddressListPID.clear();
+       BusinessAddressListTokens.clear();
+       BusinessAddressListGeo.clear();
+       BusinessAddressListTimezone.clear();        
+       BusinessAddressListType.clear();
+       BusinessAddressListMediatype.clear();
+       BusinessAddressListPref.clear();
+
+       BusinessEmailList.clear();
+       BusinessEmailListAltID.clear();
+       BusinessEmailListPID.clear();
+       BusinessEmailListType.clear();
+       BusinessEmailListTokens.clear();
+       BusinessEmailListPref.clear();
+
+       BusinessIMList.clear();
+       BusinessIMListAltID.clear();
+       BusinessIMListPID.clear();
+       BusinessIMListType.clear();
+       BusinessIMListTokens.clear();
+       BusinessIMListMediatype.clear();
+       BusinessIMListPref.clear();
+
+       BusinessTelephoneList.clear();
+       BusinessTelephoneListAltID.clear();
+       BusinessTelephoneListPID.clear();
+       BusinessTelephoneListType.clear();
+       BusinessTelephoneListTokens.clear();
+       BusinessTelephoneListPref.clear();
+
+       BusinessLanguageList.clear();
+       BusinessLanguageListAltID.clear();
+       BusinessLanguageListPID.clear();
+       BusinessLanguageListType.clear();
+       BusinessLanguageListTokens.clear();
+       BusinessLanguageListPref.clear();
+
+       BusinessTZList.clear();
+       BusinessTZListAltID.clear();
+       BusinessTZListPID.clear();
+       BusinessTZListType.clear();
+       BusinessTZListTokens.clear();
+       BusinessTZListMediatype.clear();
+       BusinessTZListPref.clear();
+
+       BusinessGeographyList.clear();
+       BusinessGeographyListAltID.clear();
+       BusinessGeographyListPID.clear();
+       BusinessGeographyListType.clear();
+       BusinessGeographyListTokens.clear();
+       BusinessGeographyListMediatype.clear();
+       BusinessGeographyListPref.clear();          
+
+       BusinessWebsiteList.clear();
+       BusinessWebsiteListAltID.clear();
+       BusinessWebsiteListPID.clear();
+       BusinessWebsiteListType.clear();
+       BusinessWebsiteListTokens.clear();
+       BusinessWebsiteListMediatype.clear();
+       BusinessWebsiteListPref.clear();
+
+       BusinessTitleList.clear();
+       BusinessTitleListLanguage.clear();        
+       BusinessTitleListAltID.clear();
+       BusinessTitleListPID.clear();
+       BusinessTitleListType.clear();
+       BusinessTitleListTokens.clear();
+       BusinessTitleListPref.clear();
+
+       BusinessRoleList.clear();
+       BusinessRoleListLanguage.clear();        
+       BusinessRoleListAltID.clear();
+       BusinessRoleListPID.clear();
+       BusinessRoleListType.clear();
+       BusinessRoleListTokens.clear();
+       BusinessRoleListPref.clear();
+
+       BusinessOrganisationsList.clear();
+       BusinessOrganisationsListLanguage.clear();        
+       BusinessOrganisationsListAltID.clear();
+       BusinessOrganisationsListPID.clear();
+       BusinessOrganisationsListType.clear();
+       BusinessOrganisationsListTokens.clear();
+       BusinessOrganisationsListSortAs.clear();        
+       BusinessOrganisationsListPref.clear();
+
+       BusinessNoteList.clear();
+       BusinessNoteListLanguage.clear();        
+       BusinessNoteListAltID.clear();
+       BusinessNoteListPID.clear();
+       BusinessNoteListType.clear();
+       BusinessNoteListTokens.clear();
+       BusinessNoteListPref.clear();        
+
+       /* Items on the Categories tab */
+
+       CategoriesList.clear();
+       CategoriesListAltID.clear();
+       CategoriesListPID.clear();
+       CategoriesListType.clear();
+       CategoriesListTokens.clear();
+       CategoriesListLanguage.clear();
+       CategoriesListPref.clear();    
+
+       /* Items on the Groups tab */
+
+       GroupsList.clear();
+       GroupsListAltID.clear();
+       GroupsListPID.clear();
+       GroupsListType.clear();
+       GroupsListMediaType.clear();
+       GroupsListTokens.clear();
+       GroupsListPref.clear();
+
+       /* Items on the Pictures tab */
+
+       PicturesList.clear();
+       PicturesListAltID.clear();
+       PicturesListPID.clear();
+       PicturesListType.clear();
+       PicturesListPicEncType.clear();
+       PicturesListPictureType.clear();
+       PicturesListTokens.clear();
+       PicturesListMediatype.clear();        
+       PicturesListPref.clear();
+
+       /* Items on the Logos tab */
+
+       LogosList.clear();
+       LogosListAltID.clear();
+       LogosListPID.clear();
+       LogosListType.clear();
+       LogosListPicEncType.clear();        
+       LogosListPictureType.clear();
+       LogosListTokens.clear();
+       LogosListMediatype.clear();        
+       LogosListPref.clear();
+
+       /* Items on the Sounds tab */
+
+       SoundsList.clear();
+       SoundsListAltID.clear();
+       SoundsListPID.clear();
+       SoundsListType.clear();
+       SoundsListAudioEncType.clear();        
+       SoundsListAudioType.clear();        
+       SoundsListTokens.clear();
+       SoundsListMediatype.clear();        
+       SoundsListPref.clear();    
+
+       /* Items on the Calendaring tab */
+
+       CalendarList.clear();
+       CalendarListAltID.clear();
+       CalendarListPID.clear();
+       CalendarListType.clear();
+       CalendarListTokens.clear();
+       CalendarListMediatype.clear();        
+       CalendarListPref.clear();
+
+       CalendarRequestList.clear();
+       CalendarRequestListAltID.clear();
+       CalendarRequestListPID.clear();
+       CalendarRequestListType.clear();
+       CalendarRequestListTokens.clear();
+       CalendarRequestListMediatype.clear();        
+       CalendarRequestListPref.clear();        
+
+       FreeBusyList.clear();
+       FreeBusyListAltID.clear();
+       FreeBusyListPID.clear();
+       FreeBusyListType.clear();
+       FreeBusyListTokens.clear();
+       FreeBusyListMediatype.clear();        
+       FreeBusyListPref.clear();
+
+       /* Items on the Security tab */
+
+       KeyList.clear();
+       KeyListAltID.clear();
+       KeyListPID.clear();
+       KeyListKeyType.clear();        
+       KeyListDataType.clear();        
+       KeyListDataEncType.clear();
+       KeyListType.clear();
+       KeyListTokens.clear();
+       KeyListPref.clear();
+
+       /* Items on the Other tab */
+
+       VendorList.clear();
+       VendorListPEN.clear();
+       VendorListElement.clear();
+
+       XTokenList.clear();
+       XTokenListTokens.clear();
 
 }
 
@@ -5071,6 +5124,8 @@ void ProcessNameValue(wxString *PropertyData,
        wxString *PropertyName, 
        wxString *PropertyValue){
 
+       // Proces the name and value information.
+               
        wxStringTokenizer PropertyElement (*PropertyData, wxT("="));
        *PropertyName = PropertyElement.GetNextToken();                         
        *PropertyValue = PropertyElement.GetNextToken();
@@ -5082,6 +5137,8 @@ void ProcessTokens(wxString *PropertyName,
        wxString *PropertyTokens,
        bool *FirstToken){
        
+       // Process the tokens.
+               
        if (!PropertyName->IsEmpty() && !PropertyValue->IsEmpty() && *PropertyName != wxT("TYPE")){
                
                if (*FirstToken == TRUE){
@@ -5106,6 +5163,8 @@ void ProcessStringValue(wxString *PropertyName,
        int *ItemCount,
        bool *PropertyMatched){
        
+       // Process the string value.
+               
        if (*PropertyName == PropertyNameMatch){
                MapPtr->erase(*ItemCount);
                MapPtr->insert(std::make_pair(*ItemCount, *PropertyValue));
@@ -5121,6 +5180,8 @@ void ProcessIntegerValue(wxString *PropertyName,
        int *ItemCount,
        bool *PropertyMatched){
 
+       // Process the integer value.
+               
        if (*PropertyName == PropertyNameMatch){
                *PropertyMatched = TRUE;
        } else {
@@ -5151,7 +5212,9 @@ void SplitValues(wxString *PropertyLine,
        std::map<int,int> *SplitPoints, 
        std::map<int,int> *SplitLength, 
        int intSize){
-       
+               
+       // Split values from a string supplied by PropertyLine.
+               
        size_t intPropertyLen = PropertyLine->Len();
        int intSplitsFound = 0;
        int intSplitSize = 0;
@@ -5204,6 +5267,8 @@ void CheckType(wxString *PropertySeg1,
        int *intPrevValue, 
        PropertyType *PropType){
        
+       // Check the information type.
+               
        wxString PropertyData;
        wxString PropertyName;
        wxString PropertyValue;
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy