From 652d2d959bc9917311c07331bb4d8e21f487defb Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 27 Jan 2016 12:05:35 +0000 Subject: [PATCH] Added code to process DURATION in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) 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; + + } + + } + } -- 2.39.5