From: Steve Brokenshire Date: Wed, 27 Jan 2016 12:05:35 +0000 (+0000) Subject: Added code to process DURATION in CalendarEventObject. X-Git-Tag: release-0.02~650 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=652d2d959bc9917311c07331bb4d8e21f487defb;p=xestiacalendar%2F.git Added code to process DURATION in CalendarEventObject. --- diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 0623177..50b535b 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -807,4 +807,27 @@ void CalendarEventObject::ProcessData(){ } + if (DateTimeEndProcessed == false){ + + // Process the data from DURATION if DTEND + // hasn't already been processed. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DURATION"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + DurationDataTokens = DataReceived.begin()->first.substr(9); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + DurationData = DataReceived.begin()->second; + + } + + } + }