From ed780a6e2b4d722c3a3ad837824c769515a55bd1 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Tue, 28 Jun 2016 23:13:59 +0100 Subject: [PATCH] Added UID to the SaveString function of ContactDataObject --- .../cdo/ContactDataObject-Save.cpp | 18 +++++++++++++++--- source/tests/xestiaab_contactsave.h | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/source/contacteditor/cdo/ContactDataObject-Save.cpp b/source/contacteditor/cdo/ContactDataObject-Save.cpp index 2a436cb..0b059ea 100644 --- a/source/contacteditor/cdo/ContactDataObject-Save.cpp +++ b/source/contacteditor/cdo/ContactDataObject-Save.cpp @@ -41,10 +41,22 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){ SaveData->Append(wxT("//KW\n")); #endif - - // Process FN. - + wxString ProcessData = ""; + + // Process UID. + + if (UIDToken.size() > 0){ + + ProcessData.Append("UID:"); + ProcessData.Append(UIDToken); + ProcessData.Append("\n"); + SaveData->Append(ProcessData); + ProcessData.clear(); + + } + + // Process FN. for (std::map::iterator FNIter = FullNamesList.begin(); FNIter != FullNamesList.end(); FNIter++){ diff --git a/source/tests/xestiaab_contactsave.h b/source/tests/xestiaab_contactsave.h index 6020548..f82fd22 100644 --- a/source/tests/xestiaab_contactsave.h +++ b/source/tests/xestiaab_contactsave.h @@ -60,6 +60,7 @@ TEST(ContactSave, ContactSaveTests){ SaveDataCompare = "BEGIN:VCARD\n" "VERSION:4.0\n" "PRODID:-//Xestia//Address Book Unit Testing//KW\n" + "UID:903588-9082374-989120310-AAFECDBCDF\n" "FN;TYPE=work;LANGUAGE=kw;ALTID=500;PID=40;PREF=45;EXAMPLE=Baaa:Test Contact\n" "TITLE;ALTID=20;LANGUAGE=text/plain;PID=21;PREF=22;EEP=LIGHT:Lord of Light\n" "TITLE;TYPE=home;ALTID=30;LANGUAGE=grass/dry;PID=31;PREF=32;EEP=DARK:Lord of D\n" -- 2.39.5