Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added GEO property for saving data from a CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 1 Jun 2016 22:52:10 +0000 (23:52 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 1 Jun 2016 22:52:10 +0000 (23:52 +0100)
Added the code and unit tests for the GEO property.

source/objects/calendarevent/CalendarEvent-Save.cpp
source/tests/xestiacalendar_icaleventsave.h

index 849a196..ceeb1c4 100644 (file)
@@ -284,6 +284,34 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the GEO value.
+       
+       if (GeographicData.size() > 0){
+               
+               if (GeographicTokens.size() > 0){
+               
+                       DataLine += "GEO;";
+                       DataLine += GeographicTokens;
+                       
+               } else {
+
+                       DataLine += "GEO";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += GeographicData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VEVENT\n";
        
 }
\ No newline at end of file
index ef5f60a..b365b11 100644 (file)
@@ -82,6 +82,7 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "CREATED;CARAMEL=PLEASE:20160123T081100Z\n"
        "DESCRIPTION;ALTREP=\"null:nodata\";LANGUAGE=kw;EXAMPLE=TOKEN;MOREDATA=YES:This \n"
        " is a description of the event.\n"
+       "GEO;EXAMPLE=MEEP:5.0;5.0\n"
        "END:VEVENT\n"
        "END:VCARD";
 
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