From: Steve Brokenshire Date: Sun, 5 Jun 2016 22:35:45 +0000 (+0100) Subject: Added RRULE property for saving data from a CalendarJournalObject. X-Git-Tag: release-0.02~187 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=79aa3e385905310fd092ad02a8e4d5c54200809d;p=xestiacalendar%2F.git Added RRULE property for saving data from a CalendarJournalObject. Added the code and unit tests for the RRULE property. --- diff --git a/source/objects/calendarjournal/CalendarJournal-Save.cpp b/source/objects/calendarjournal/CalendarJournal-Save.cpp index 8849a93..a5704e1 100644 --- a/source/objects/calendarjournal/CalendarJournal-Save.cpp +++ b/source/objects/calendarjournal/CalendarJournal-Save.cpp @@ -388,6 +388,31 @@ void CalendarJournalObject::SaveObjectData(string *SaveData){ } + // Process the RRULE value. + + if (RecurranceRuleData.size() > 0){ + + DataLine += "RRULE"; + + if (RecurranceRuleDataTokens.size() > 0){ + + DataLine += ";"; + DataLine += RecurranceRuleDataTokens; + + } + + DataLine += ":"; + DataLine += RecurranceRuleData; + DataLine += "\n"; + + DataLineProcessed = OutputText(&DataLine); + + *SaveData += DataLineProcessed; + + DataLine.clear(); + DataLineProcessed.clear(); + + } *SaveData += "END:VJOURNAL\n"; } \ No newline at end of file diff --git a/source/tests/xestiacalendar_icaljournalsave.h b/source/tests/xestiacalendar_icaljournalsave.h index 5e19324..18ff886 100644 --- a/source/tests/xestiacalendar_icaljournalsave.h +++ b/source/tests/xestiacalendar_icaljournalsave.h @@ -78,6 +78,7 @@ TEST(iCalendarSaveJournal, SaveEventTests){ "SEQUENCE;TEST=YAY:7\n" "STATUS;LANGUAGE=kw;FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN:2.0;Success\n" "URL;EXTERNAL=YES:http://www.example.com/\n" + "RRULE;TEST=DATA:FREQ=DAILY;COUNT=10\n" "END:VJOURNAL\n" "END:VCALENDAR";