From d610474e1e93e72cfdc4541e9ef7bdec999a4718 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 15:37:20 +0000 Subject: [PATCH] Added code to process the EXDATE property in CalendarJournalObject. --- .../calendarjournal/CalendarJournal.cpp | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index ad2939c..b0afd4d 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -936,4 +936,63 @@ void CalendarJournalObject::ProcessData(){ } + // Process the data from EXDATE. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "EXDATE"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + ExcludeDateDataTokens.push_back(""); + ExcludeDateDataValue.push_back(""); + ExcludeDateDataTimeZoneParam.push_back(""); + ExcludeDateData.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 == "VALUE"){ + + ExcludeDateDataValue[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "TZID"){ + + ExcludeDateDataTimeZoneParam[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + ExcludeDateDataTokens[ObjectSeekCount] = PropertyTokens; + } + + ExcludeDateData[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } + } \ No newline at end of file -- 2.39.5