X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2Fcdo%2FContactDataObject-Save.cpp;h=642ea5cab739e9e2088290786f9e752305d292c8;hb=eb3920b819b84e8a61cd21f302026379b4480a2b;hp=540b5ec585ca0df3aa303f5ee5fc3aa2b9212748;hpb=ce2d9416fe90ea64e2f9e9fe7b4b3bad5f9a0192;p=xestiaab%2F.git diff --git a/source/contacteditor/cdo/ContactDataObject-Save.cpp b/source/contacteditor/cdo/ContactDataObject-Save.cpp index 540b5ec..642ea5c 100644 --- a/source/contacteditor/cdo/ContactDataObject-Save.cpp +++ b/source/contacteditor/cdo/ContactDataObject-Save.cpp @@ -592,6 +592,13 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){ &SoundsListPref, &SoundsListTokens, SaveData); + // Process CALURI. + + SaveCalendarURI(&CalendarList, &CalendarListMediatype, + &CalendarListAltID, &CalendarListPID, + &CalendarListType, &CalendarListPref, + &CalendarListTokens, SaveData); + // Write the end part of the vCard data file. SaveData->Append("END:VCARD"); @@ -1942,4 +1949,83 @@ void ContactDataObject::SaveSound(map *SoundsList, map *CalendarList, map *CalendarListMediatype, + map *CalendarListAltID, map *CalendarListPID, + map *CalendarListType, map *CalendarListPref, + map *CalendarListTokens, wxString *SaveData){ + + wxString ProcessData = ""; + + for (std::map::iterator CalendarIter = CalendarList->begin(); + CalendarIter != CalendarList->end(); CalendarIter++){ + + ProcessData.Append("CALURI"); + + // Check if there is a value for TYPE. + + if ((*CalendarListType)[CalendarIter->first].size() > 0){ + + ProcessData.Append(";TYPE="); + ProcessData.Append((*CalendarListType)[CalendarIter->first]); + + } + + // Check if there is a value for ALTID. + + if ((*CalendarListAltID)[CalendarIter->first].size() > 0){ + + ProcessData.Append(";ALTID="); + ProcessData.Append((*CalendarListAltID)[CalendarIter->first]); + + } + + // Check if there is a value for MEDIATYPE. + + if ((*CalendarListMediatype)[CalendarIter->first].size() > 0){ + + ProcessData.Append(";MEDIATYPE="); + ProcessData.Append((*CalendarListMediatype)[CalendarIter->first]); + + } + + // Check if there is a value for PID. + + if ((*CalendarListPID)[CalendarIter->first].size() > 0){ + + ProcessData.Append(";PID="); + ProcessData.Append((*CalendarListPID)[CalendarIter->first]); + + } + + // Check if there is a value for PREF. + + if ((*CalendarListPref)[CalendarIter->first] > 0){ + + ProcessData.Append(";PREF="); + ProcessData.Append(wxString::Format("%i", (*CalendarListPref)[CalendarIter->first])); + + } + + // Check if there is a value for tokens. + + if ((*CalendarListTokens)[CalendarIter->first].size() > 0){ + + ProcessData.Append(";"); + ProcessData.Append((*CalendarListTokens)[CalendarIter->first]); + + } + + ProcessData.Append(":"); + ProcessData.Append(CalendarIter->second); + ProcessData.Append("\n"); + + ProcessData = OutputText(&ProcessData); + + SaveData->Append(ProcessData); + ProcessData.clear(); + + } + } \ No newline at end of file