From f10cd3208d61792beb75122fd177014312f85b43 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 27 Jan 2016 19:16:07 +0000 Subject: [PATCH] Added code to process COMMENT in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 1d762eb..4d4e7ea 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -1051,4 +1051,63 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from COMMENT. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "COMMENT"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + CommentListTokens.push_back(""); + CommentListAltRep.push_back(""); + CommentListLanguage.push_back(""); + CommentList.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 == "ALTREP"){ + + CommentListAltRep[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "LANGUAGE"){ + + CommentListLanguage[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + CommentListTokens[ObjectSeekCount] = PropertyTokens; + } + + CommentList[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } + } -- 2.39.5