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

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

index 85f5692..4c49018 100644 (file)
@@ -287,6 +287,47 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the LOCATION value.
+
+       if (LocationData.size() > 0){
+               
+               DataLine += "LOCATION";
+               
+               if (LocationDataAltRep.size() > 0){
+               
+                       DataLine += ";ALTREP=\"";
+                       DataLine += LocationDataAltRep;
+                       DataLine += "\"";
+                       
+               }
+               
+               if (LocationDataLanguage.size() > 0){
+               
+                       DataLine += ";LANGUAGE=";
+                       DataLine += LocationDataLanguage;                       
+                       
+               }
+               
+               if (LocationDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += LocationDataTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += LocationData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VTODO\n";
        
 }
\ No newline at end of file
index 226fe41..fbe5341 100644 (file)
@@ -67,6 +67,8 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        " 03000Z\n"
        "GEO;EXAMPLE=MOOP:20.0;20.0\n"
        "LAST-MODIFIED;FUTURE=EVEN:20160131T114200Z\n"
+       "LOCATION;ALTREP=\"null:nodata\";LANGUAGE=kw;EXACT=YES:The Crystal Ceiling, Trur\n"
+       " o\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