From: Steve Brokenshire Date: Sun, 31 Jan 2016 14:52:01 +0000 (+0000) Subject: Added code to process the SEQUENCE property in CalendarJournalObject. X-Git-Tag: release-0.02~480 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=f2fb4a3be092201439d6e76bc517dbe931e4e332;p=xestiacalendar%2F.git Added code to process the SEQUENCE property in CalendarJournalObject. --- diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index a6e3ddc..61beba0 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -382,5 +382,29 @@ void CalendarJournalObject::ProcessData(){ RecurranceIDData = DataReceived.begin()->second; } + + // Process the data from SEQUENCE. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "SEQUENCE"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + SequenceTokens = DataReceived.begin()->first.substr(9); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + try { + SequenceData = stoi(DataReceived.begin()->second); + } + + catch(const invalid_argument &oor){ + SequenceTokens.clear(); + } + + } } \ No newline at end of file