From 81481f0fb98ff9c987eccba71f240ec118a1f796 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 14:59:54 +0000 Subject: [PATCH] Added code to process the SUMMARY property in CalendarJournalObject. --- .../calendarjournal/CalendarJournal.cpp | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index dd920bc..4312bcf 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -453,4 +453,72 @@ void CalendarJournalObject::ProcessData(){ } + // Process the data from SUMMARY. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "SUMMARY"); + + 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"){ + + SummaryDataAltRep = iter->second; + + } else if (iter->first == "LANGUAGE"){ + + SummaryDataLanguage = iter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + + SummaryDataTokens = PropertyTokens; + + } + + SummaryData = DataReceived.begin()->second; + + } + + // Process the data from URL. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "URL"); + + if (DataReceived.begin() != DataReceived.end()){ + + try { + URLDataTokens = DataReceived.begin()->first.substr(4); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + URLData = DataReceived.begin()->second; + + } + } \ No newline at end of file -- 2.39.5