From: Steve Brokenshire Date: Sun, 31 Jan 2016 12:01:08 +0000 (+0000) Subject: Added code to process PERCENT-COMPLETE in CalendarTaskObject. X-Git-Tag: release-0.02~561 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=066fc64772d690ade7d9bf154e18a41ee8a4d916;p=xestiacalendar%2F.git Added code to process PERCENT-COMPLETE in CalendarTaskObject. --- diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index d3ad6dd..beb1780 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -485,4 +485,22 @@ void CalendarTaskObject::ProcessData(){ } + // Process the data from PERCENT-COMPLETE. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "PERCENT-COMPLETE"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + PercentCompleteTokens = DataReceived.begin()->first.substr(17); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + PercentCompleteData = DataReceived.begin()->second; + + } + } \ No newline at end of file