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

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

index 2827bb5..0d1a172 100644 (file)
@@ -756,6 +756,51 @@ void CalendarJournalObject::SaveObjectData(string *SaveData){
        
        }
        
+       // Process the EXDATE value.
+       
+       if (ExcludeDateData.size() > 0){
+               
+               for (int ExcludeDateDataSeek = 0; ExcludeDateDataSeek < ExcludeDateData.size();
+                       ExcludeDateDataSeek++){
+       
+                       DataLine += "EXDATE";
+                               
+                       if (ExcludeDateDataTimeZoneParam[ExcludeDateDataSeek].size() > 0){
+               
+                               DataLine += ";TZID=";
+                               DataLine += ExcludeDateDataTimeZoneParam[ExcludeDateDataSeek];
+                       
+                       }
+                       
+                       if (ExcludeDateDataValue[ExcludeDateDataSeek].size() > 0){
+               
+                               DataLine += ";VALUE=";
+                               DataLine += ExcludeDateDataValue[ExcludeDateDataSeek];
+                       
+                       }
+                       
+                       if (ExcludeDateDataTokens[ExcludeDateDataSeek].size() > 0){
+               
+                               DataLine += ";";
+                               DataLine += ExcludeDateDataTokens[ExcludeDateDataSeek];
+                       
+                       }
+                               
+                       DataLine += ":";
+                       DataLine += ExcludeDateData[ExcludeDateDataSeek];
+                       DataLine += "\n";
+               
+                       DataLineProcessed = OutputText(&DataLine);
+               
+                       *SaveData += DataLineProcessed;
+
+                       DataLine.clear();
+                       DataLineProcessed.clear();
+                               
+               }
+               
+       }
+       
        *SaveData += "END:VJOURNAL\n";
        
 }
\ No newline at end of file
index fb69016..8ea3eb0 100644 (file)
@@ -104,6 +104,9 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        "DESCRIPTION;ALTREP=\"null:nodata\";LANGUAGE=en-GB:This is the second journal de\n"
        " scription.\n"
        "DESCRIPTION;ZEBRAS=NO:This is the third journal description.\n"
+       "EXDATE:20160125T120000Z\n"
+       "EXDATE;TZID=Europe/Truro;VALUE=DATE-TIME:20160125T130000Z\n"
+       "EXDATE;ZOOP=ZIPPO:20160125T133000Z\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