From b21237b45546b4a35a2cbf3bcb098a23cc090e15 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 11:50:02 +0000 Subject: [PATCH] Added code to process LOCATION in CalendarTaskObject. --- source/objects/calendartask/CalendarTask.cpp | 50 ++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index 216f372..5858ac6 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -377,4 +377,54 @@ void CalendarTaskObject::ProcessData(){ } + // Process the data from LOCATION. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "LOCATION"); + + 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"){ + + LocationDataAltRep = iter->second; + + } else if (iter->first == "LANGUAGE"){ + + LocationDataLanguage = iter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + + LocationDataTokens = PropertyTokens; + + } + + LocationData = DataReceived.begin()->second; + + } + } \ No newline at end of file -- 2.39.5