Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code for saving data in the ContactDataObject [FN]
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 27 Jun 2016 22:18:53 +0000 (23:18 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 27 Jun 2016 22:18:53 +0000 (23:18 +0100)
Code added to the SaveString function of ContactDataObject for saving
the FN data.

source/contacteditor/cdo/ContactDataObject-Save.cpp

index 8a0f2b7..4046edf 100644 (file)
@@ -47,7 +47,63 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
        for (std::map<int, wxString>::iterator FNIter = FullNamesList.begin();
                FNIter != FullNamesList.end(); FNIter++){
                
-               SaveData->Append("FN:");
+               SaveData->Append("FN");
+
+               // Check if there is a value for TYPE.
+               
+               if (FullNamesListType[FNIter->first].size() > 0){
+               
+                       SaveData->Append(";TYPE=");
+                       SaveData->Append(FullNamesListType[FNIter->first]);
+                       
+               }
+
+               // Check if there is a value for LANGUAGE.
+               
+               if (FullNamesListLanguage[FNIter->first].size() > 0){
+               
+                       SaveData->Append(";LANGUAGE=");
+                       SaveData->Append(FullNamesListLanguage[FNIter->first]);
+                       
+               }
+               
+               // Check if there is a value for ALTID.
+               
+               if (FullNamesListAltID[FNIter->first].size() > 0){
+               
+                       SaveData->Append(";ALTID=");
+                       SaveData->Append(FullNamesListAltID[FNIter->first]);
+                       
+               }
+               
+               // Check if there is a value for PID.
+
+               if (FullNamesListPID[FNIter->first].size() > 0){
+               
+                       SaveData->Append(";PID=");
+                       SaveData->Append(FullNamesListPID[FNIter->first]);
+                       
+               }
+
+               // Check if there is a value for PREF.
+
+               if (FullNamesListPref[FNIter->first] > 0){
+               
+                       SaveData->Append(";PREF=");
+                       SaveData->Append(wxString::Format("%i", FullNamesListPref[FNIter->first]));
+                       
+               }
+
+               // Check if there is a value for tokens.
+
+               if (FullNamesListTokens[FNIter->first].size() > 0){
+               
+                       SaveData->Append(";");
+                       SaveData->Append(FullNamesListTokens[FNIter->first]);
+                       
+               }
+               
+               SaveData->Append(":");
                SaveData->Append(FNIter->second);
                SaveData->Append("\n");
                        
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