}
}
-
+
}
ResetSaveProcessData();
- // Process Label.
+ // Build the values for the ANNIVERSARY property.
+
+ // ALTID
+
+ if (!ContactEditorData.AnniversaryAltID.IsEmpty()){
- strValue3 = ContactEditorData.AnniversaryAltID;
+ wxString DataValue;
+ DataValue = ContactEditorData.AnniversaryAltID;
+
+ EscapeString(&DataValue, FALSE);
+
+ strValue3.Append("ALTID=");
+ strValue3.Append(DataValue);
+
+ boolValue2 = TRUE;
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
- boolValue2 = TRUE;
- strValue2.Append(wxT("ALTID=\"") + strValue3 + wxT("\""));
-
- boolValue = TRUE;
-
}
- //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
- //strValue2 =
+ // CALSCALE.
- // Process Language.
+ if (!ContactEditorData.AnniversaryCalScale.IsEmpty()){
- strValue3 = ContactEditorData.AnniversaryCalScale;
+ wxString DataValue;
+ DataValue = ContactEditorData.AnniversaryCalScale;
+
+ EscapeString(&DataValue, FALSE);
+
+ if (boolValue2 == TRUE){
+
+ strValue3.Append(";");
+
+ }
+
+ strValue3.Append("CALSCALE=");
+ strValue3.Append(DataValue);
+
+ boolValue2 = TRUE;
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("CALSCALE=") + strValue3);
-
- boolValue = TRUE;
-
}
- // Process Tokens.
+ // Extra tokens.
+
+ if (!ContactEditorData.AnniversaryTokens.IsEmpty()){
- strValue2 = ContactEditorData.AnniversaryTokens;
+ wxString DataValue;
+ DataValue = ContactEditorData.AnniversaryTokens;
+
+ EscapeString(&DataValue, FALSE);
+
+ if (boolValue2 == TRUE){
+
+ strValue3.Append(";");
+
+ }
+
+ strValue3.Append(DataValue);
- // Deal with ANNIVERSARY.
+ }
+
+ // Write the ANNIVERSARY property.
if (!txtAnniversary->IsEmpty()){
-
- strValue = txtAnniversary->GetValue();
-
- if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
-
- if (!strValue2.IsEmpty()){
-
- EscapeString(&strValue2, FALSE);
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("ANNIVERSARY;VALUE=text;") + strValue2 + wxT(";"), strValue);
-
- } else {
-
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("ANNIVERSARY;VALUE=text"), strValue);
-
- }
-
- }
-
+
+ if (!txtAnniversary->GetValue().IsEmpty()){
+
+ strValue = txtAnniversary->GetValue();
+
+ if (!strValue3.IsEmpty()){
+
+ ContactData.AddRaw("ANNIVERSARY;VALUE=text;" + strValue3, strValue);
+
+ } else {
+
+ ContactData.AddRaw("ANNIVERSARY;VALUE=text", strValue);
+
+ }
+
+ }
+
} else {
-
+
// Look for T and replace data before this.
// Get Day, Month & Year.
}
- if (!FinalAnniversaryString.IsEmpty() || !strValue2.IsEmpty()){
+ if (!FinalAnniversaryString.IsEmpty() || !strValue3.IsEmpty()){
- if (!strValue2.IsEmpty()){
+ if (!strValue3.IsEmpty()){
EscapeString(&strValue2, FALSE);
EscapeString(&strValue, FALSE);
- ContactData.AddRaw(wxT("ANNIVERSARY") + strValue2 + wxT(";"), FinalAnniversaryString);
+ ContactData.AddRaw(wxT("ANNIVERSARY;") + strValue3, FinalAnniversaryString);
} else {