From 4a697a411b0c36980a4dd22625b416bd4ace85e7 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 15:43:21 +0000 Subject: [PATCH] Added code to process the RELATED-TO property in CalendarJournalObject. --- .../calendarjournal/CalendarJournal.cpp | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index b0afd4d..6f7a9a7 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -995,4 +995,58 @@ void CalendarJournalObject::ProcessData(){ } + // Process the data from RELATED-TO. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RELATED-TO"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + RelatedToDataTokens.push_back(""); + RelatedToDataRelationType.push_back(""); + RelatedToData.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 == "RELTYPE"){ + + RelatedToDataRelationType[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + RelatedToDataTokens[ObjectSeekCount] = PropertyTokens; + } + + RelatedToData[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } + } \ No newline at end of file -- 2.39.5