X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2Fcalendarevent%2FCalendarEvent-Save.cpp;h=a5afcd5d27c82a032ea50882335f6e0e7044fd3c;hb=3b462406bd52d9c05c86d2099ec9ffaaa7f2de95;hp=ee48352faad390a0ca56fe3fc2a704e6e01e7415;hpb=6b1023322f3c0d967816c6b4436de3ff1b22e89c;p=xestiacalendar%2F.git diff --git a/source/objects/calendarevent/CalendarEvent-Save.cpp b/source/objects/calendarevent/CalendarEvent-Save.cpp index ee48352..a5afcd5 100644 --- a/source/objects/calendarevent/CalendarEvent-Save.cpp +++ b/source/objects/calendarevent/CalendarEvent-Save.cpp @@ -242,6 +242,104 @@ void CalendarEventObject::SaveObjectData(string *SaveData){ } + // Process the DESCRIPTION values. Write out the + // first DESCRPITION only as per RFC5545 specifcation. + + if (DescriptionList.size() > 0){ + + DataLine += "DESCRIPTION"; + + if (DescriptionListAltRep[0].size() > 0){ + + DataLine += ";ALTREP=\""; + DataLine += DescriptionListAltRep[0]; + DataLine += "\""; + + } + + if (DescriptionListLanguage[0].size() > 0){ + + DataLine += ";LANGUAGE="; + DataLine += DescriptionListLanguage[0]; + + } + + if (DescriptionListTokens[0].size() > 0){ + + DataLine += ";"; + DataLine += DescriptionListTokens[0]; + + } + + DataLine += ":"; + DataLine += DescriptionList[0]; + DataLine += "\n"; + + DataLineProcessed = OutputText(&DataLine); + + *SaveData += DataLineProcessed; + + DataLine.clear(); + DataLineProcessed.clear(); + + } + + // Process the GEO value. + + if (GeographicData.size() > 0){ + + if (GeographicTokens.size() > 0){ + + DataLine += "GEO;"; + DataLine += GeographicTokens; + + } else { + + DataLine += "GEO"; + + } + + DataLine += ":"; + DataLine += GeographicData; + DataLine += "\n"; + + DataLineProcessed = OutputText(&DataLine); + + *SaveData += DataLineProcessed; + + DataLine.clear(); + DataLineProcessed.clear(); + + } + + // Process the LAST-MODIFIED value. + + if (LastModifiedData.size() > 0){ + + if (LastModifiedTokens.size() > 0){ + + DataLine += "LAST-MODIFIED;"; + DataLine += LastModifiedTokens; + + } else { + + DataLine += "LAST-MODIFIED"; + + } + + DataLine += ":"; + DataLine += LastModifiedData; + DataLine += "\n"; + + DataLineProcessed = OutputText(&DataLine); + + *SaveData += DataLineProcessed; + + DataLine.clear(); + DataLineProcessed.clear(); + + } + *SaveData += "END:VEVENT\n"; } \ No newline at end of file