From: Steve Brokenshire Date: Sun, 31 Jan 2016 14:42:33 +0000 (+0000) Subject: Added code to process the LOCATION property in CalendarJournalObject. X-Git-Tag: release-0.02~489 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=8c8555951ff40cb6b22e38480ca463f2136ed344;p=xestiacalendar%2F.git Added code to process the LOCATION property in CalendarJournalObject. --- diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index 71d2727..d8201dc 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -271,4 +271,54 @@ void CalendarJournalObject::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