From 066fc64772d690ade7d9bf154e18a41ee8a4d916 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 12:01:08 +0000 Subject: [PATCH] Added code to process PERCENT-COMPLETE in CalendarTaskObject. --- source/objects/calendartask/CalendarTask.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 -- 2.39.5