From: Steve Brokenshire Date: Sun, 31 Jan 2016 11:15:01 +0000 (+0000) Subject: Added code to process DESCRIPTION in CalendarTaskObject. X-Git-Tag: release-0.02~576 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=5976b363af7a20dde1358e4a7baf6e8b43b4018f;p=xestiacalendar%2F.git Added code to process DESCRIPTION in CalendarTaskObject. --- diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index 36933b1..5d4a59b 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -239,4 +239,56 @@ void CalendarTaskObject::ProcessData(){ } + // Process the data from DESCRIPTION. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DESCRIPTION"); + + if (DataReceived.begin() != DataReceived.end()){ + + bool TokenData = false; + string PropertyTokens; + + PropertyNameData = (string*)&DataReceived.begin()->first; + + PropertyData = SplitValues(*PropertyNameData); + + for(map::iterator iter = PropertyData.begin(); + iter != PropertyData.end(); iter++){ + + if (iter->first == "ALTREP"){ + + DescriptionListAltRep.clear(); + DescriptionListAltRep.push_back(iter->second); + + } else if (iter->first == "LANGUAGE"){ + + DescriptionListLanguage.clear(); + DescriptionListLanguage.push_back(iter->second); + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + DescriptionListTokens.clear(); + DescriptionListTokens.push_back(PropertyTokens); + } + + DescriptionList.clear(); + DescriptionList.push_back(DataReceived.begin()->second); + + } + } \ No newline at end of file