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

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

index 2b357fa..44924cc 100644 (file)
@@ -303,6 +303,32 @@ void CalendarJournalObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the SEQUENCE value.
+       
+       if (SequenceData > -1 && SequenceData < 10){
+               
+               DataLine += "SEQUENCE";
+               
+               if (SequenceTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += SequenceTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += to_string(SequenceData);
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VJOURNAL\n";
        
 }
\ No newline at end of file
index f60bf8e..13f149b 100644 (file)
@@ -75,6 +75,7 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        " eply@example.com\";LANGUAGE=kw;HAPPY=DAYS:mailto:organiser@example.com\n"
        "RECURRENCE-ID;TZID=Europe/Truro;RANGE=THISANDFUTURE;VALUE=DATE;EXAMPLE=DATA:2\n"
        " 0160131\n"
+       "SEQUENCE;TEST=YAY:7\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