From b70893070be0a7704922572153e01a1a8e1ec1a9 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 15:31:23 +0000 Subject: [PATCH] Added code to process the DESCRIPTION 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 9ce0ff0..ad2939c 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -877,4 +877,63 @@ void CalendarJournalObject::ProcessData(){ } + // Process the data from Description. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "DESCRIPTION"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + DescriptionListTokens.push_back(""); + DescriptionListAltRep.push_back(""); + DescriptionListLanguage.push_back(""); + DescriptionList.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"){ + + DescriptionListAltRep[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "LANGUAGE"){ + + DescriptionListLanguage[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + DescriptionListTokens[ObjectSeekCount] = PropertyTokens; + } + + DescriptionList[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } + } \ No newline at end of file -- 2.39.5