Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added SEQUENCE property for saving data from a CalendarTaskObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 21:36:18 +0000 (22:36 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 21:36:18 +0000 (22:36 +0100)
Added the code and unit tests for the SEQUENCE property.

source/objects/calendartask/CalendarTask-Save.cpp
source/tests/xestiacalendar_icaltasksave.h

index 410fc56..1b7ad70 100644 (file)
@@ -485,6 +485,32 @@ void CalendarTaskObject::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:VTODO\n";
        
 }
\ No newline at end of file
index aa3b88b..482e107 100644 (file)
@@ -75,6 +75,7 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        "PRIORITY;STATUS=DEFAULT:5\n"
        "RECURRENCE-ID;TZID=Europe/Truro;RANGE=THISANDFUTURE;VALUE=DATE;EXAMPLE=DATA:2\n"
        " 0160131\n"
+       "SEQUENCE;TEST=YAY:3\n"
        "END:VTODO\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