From f2fb4a3be092201439d6e76bc517dbe931e4e332 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 14:52:01 +0000 Subject: [PATCH] Added code to process the SEQUENCE property in CalendarJournalObject. --- .../calendarjournal/CalendarJournal.cpp | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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 -- 2.39.5