Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added SUMMARY property for saving data from a CalendarJournalObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 21:54:03 +0000 (22:54 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 21:54:03 +0000 (22:54 +0100)
Added the code and unit tests for the SUMMARY property.

source/objects/calendarjournal/CalendarJournal-Save.cpp
source/tests/xestiacalendar_icaljournalsave.h

index 7235419..12578b7 100644 (file)
@@ -65,6 +65,47 @@ void CalendarJournalObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the SUMMARY.
+       
+       if (SummaryData.size() > 0){
+               
+               DataLine += "SUMMARY";
+               
+               if (SummaryDataAltRep.size() > 0){
+               
+                       DataLine += ";ALTREP=\"";
+                       DataLine += SummaryDataAltRep;
+                       DataLine += "\"";
+                       
+               }
+               
+               if (SummaryDataLanguage.size() > 0){
+               
+                       DataLine += ";LANGUAGE=";
+                       DataLine += SummaryDataLanguage;                        
+                       
+               }
+               
+               if (SummaryDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += SummaryDataTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += SummaryData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VJOURNAL\n";
        
 }
\ No newline at end of file
index eb2263b..9561f55 100644 (file)
@@ -39,6 +39,9 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        "BEGIN:VJOURNAL\n"
        "UID:329128-12939123-123123-13\n"
        "DTSTAMP:20160116T190200Z\n"
+       "SUMMARY:Unit Test Event 1 which has to be a really long summary as we don't k\n"
+       " now if multiple line processing is going to work without it. I mean seriousl\n"
+       " y, how annoying can this potentially be?\n"
        "END:VJOURNAL\n"
        "END:VCALENDAR";
        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy