Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Made FN used ProcessData to add data and then append to SaveData
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 28 Jun 2016 21:38:56 +0000 (22:38 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 28 Jun 2016 21:38:56 +0000 (22:38 +0100)
source/contacteditor/cdo/ContactDataObject-Save.cpp

index 3673839..01af8ed 100644 (file)
@@ -44,17 +44,19 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
        
        // Process FN.
        
+       wxString ProcessData = "";
+       
        for (std::map<int, wxString>::iterator FNIter = FullNamesList.begin();
                FNIter != FullNamesList.end(); FNIter++){
                
-               SaveData->Append("FN");
+               ProcessData.Append("FN");
 
                // Check if there is a value for TYPE.
                
                if (FullNamesListType[FNIter->first].size() > 0){
                
-                       SaveData->Append(";TYPE=");
-                       SaveData->Append(FullNamesListType[FNIter->first]);
+                       ProcessData.Append(";TYPE=");
+                       ProcessData.Append(FullNamesListType[FNIter->first]);
                        
                }
 
@@ -62,8 +64,8 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
                
                if (FullNamesListLanguage[FNIter->first].size() > 0){
                
-                       SaveData->Append(";LANGUAGE=");
-                       SaveData->Append(FullNamesListLanguage[FNIter->first]);
+                       ProcessData.Append(";LANGUAGE=");
+                       ProcessData.Append(FullNamesListLanguage[FNIter->first]);
                        
                }
                
@@ -71,8 +73,8 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
                
                if (FullNamesListAltID[FNIter->first].size() > 0){
                
-                       SaveData->Append(";ALTID=");
-                       SaveData->Append(FullNamesListAltID[FNIter->first]);
+                       ProcessData.Append(";ALTID=");
+                       ProcessData.Append(FullNamesListAltID[FNIter->first]);
                        
                }
                
@@ -80,8 +82,8 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
 
                if (FullNamesListPID[FNIter->first].size() > 0){
                
-                       SaveData->Append(";PID=");
-                       SaveData->Append(FullNamesListPID[FNIter->first]);
+                       ProcessData.Append(";PID=");
+                       ProcessData.Append(FullNamesListPID[FNIter->first]);
                        
                }
 
@@ -89,8 +91,8 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
 
                if (FullNamesListPref[FNIter->first] > 0){
                
-                       SaveData->Append(";PREF=");
-                       SaveData->Append(wxString::Format("%i", FullNamesListPref[FNIter->first]));
+                       ProcessData.Append(";PREF=");
+                       ProcessData.Append(wxString::Format("%i", FullNamesListPref[FNIter->first]));
                        
                }
 
@@ -98,14 +100,19 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
 
                if (FullNamesListTokens[FNIter->first].size() > 0){
                
-                       SaveData->Append(";");
-                       SaveData->Append(FullNamesListTokens[FNIter->first]);
+                       ProcessData.Append(";");
+                       ProcessData.Append(FullNamesListTokens[FNIter->first]);
                        
                }
                
-               SaveData->Append(":");
-               SaveData->Append(FNIter->second);
-               SaveData->Append("\n");
+               ProcessData.Append(":");
+               ProcessData.Append(FNIter->second);
+               ProcessData.Append("\n");
+               
+               ProcessData = OutputText(&ProcessData);
+               
+               SaveData->Append(ProcessData);
+               ProcessData.clear();
                        
        }
        
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