Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added ANNIVERSARY to the SaveString function of ContactDataObject
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 3 Jul 2016 21:31:51 +0000 (22:31 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 3 Jul 2016 21:31:51 +0000 (22:31 +0100)
source/contacteditor/cdo/ContactDataObject-Save.cpp
source/tests/xestiaab_contactsave.h

index 72dad84..9e3db13 100644 (file)
@@ -452,6 +452,50 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
                
        }
        
+       // Process ANNIVERSARY.
+       
+       if (Anniversary.size() > 0){
+               
+               ProcessData.Append("ANNIVERSARY");
+
+               // Check if there is a value for ALTID.
+               
+               if (AnniversaryAltID.size() > 0){
+                       
+                       ProcessData.Append(";ALTID=");
+                       ProcessData.Append(AnniversaryAltID);
+                       
+               }
+
+               // Check if there is a value for CALSCALE.
+               
+               if (AnniversaryAltID.size() > 0){
+                       
+                       ProcessData.Append(";CALSCALE=");
+                       ProcessData.Append(AnniversaryCalScale);
+                       
+               }
+               
+               // Check if there is a value for tokens.
+               
+               if (AnniversaryTokens.size() > 0){
+               
+                       ProcessData.Append(";");
+                       ProcessData.Append(AnniversaryTokens);
+                       
+               }
+               
+               ProcessData.Append(":");
+               ProcessData.Append(Anniversary);
+               ProcessData.Append("\n");
+               
+               ProcessData = OutputText(&ProcessData);
+               
+               SaveData->Append(ProcessData);
+               ProcessData.clear();
+               
+       }
+       
        // Process TITLE.
 
        SaveTitle(&GeneralTitleList, &GeneralTitleListLanguage,
index 810322c..b3dde42 100644 (file)
@@ -91,6 +91,7 @@ TEST(ContactSave, ContactSaveTests){
        " :The Testing One\n"
        "GENDER;BEEP=Boop:F;Example Text\n"
        "BDAY;ALTID=35;CALSCALE=georgian;HAPPY=Days:20040101\n"
+       "ANNIVERSARY;ALTID=70;CALSCALE=georgian;WONDERFUL=Day:20200516\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"
        " arkness\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