From 9bb46ebb7c0bf80597f677b59ae057526f0cec13 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 27 Jan 2016 17:09:01 +0000 Subject: [PATCH] Added code to process CATEGORIES in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index a3b3578..1d762eb 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -996,5 +996,59 @@ void CalendarEventObject::ProcessData(){ ObjectSeekCount++; } + + // Process the data from CATEGORIES. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "CATEGORIES"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + CategoriesListTokens.push_back(""); + CategoriesListLanguage.push_back(""); + CategoriesList.push_back(""); + + bool TokenData = false; + string PropertyTokens; + + PropertyNameData = (string*)&iter->first; + + PropertyData = SplitValues(*PropertyNameData); + + for(map::iterator dataiter = PropertyData.begin(); + dataiter != PropertyData.end(); dataiter++){ + + if (dataiter->first == "LANGUAGE"){ + + CategoriesListLanguage[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + CategoriesListTokens[ObjectSeekCount] = PropertyTokens; + } + + CategoriesList[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } } -- 2.39.5