pimappservices/calendarvcalplugin/src/agmvcalx.cpp
branchRCL_3
changeset 65 12af337248b1
parent 0 f979ecb2b13e
child 66 bd7edf625bdd
--- a/pimappservices/calendarvcalplugin/src/agmvcalx.cpp	Thu Aug 19 09:53:43 2010 +0300
+++ b/pimappservices/calendarvcalplugin/src/agmvcalx.cpp	Tue Aug 31 15:13:43 2010 +0300
@@ -405,6 +405,11 @@
 			AddDesPropertyL(aParser, KVCalToken8ENTRYTYPE, KVCalTokenTypeTODO);
 			break;
 			}
+		case CCalEntry::ENote:
+			{
+			AddDesPropertyL(aParser,KVCalToken8ENTRYTYPE, KVCalTokenTypeNOTE);
+			break;
+			}
 		default: break;
 		}
 
@@ -432,9 +437,10 @@
 
 	// DTSTAMP
 	TCalTime dTStamp = aEntry->DTStampL();
-		
-   	if ( dTStamp.TimeUtcL() != Time::NullTTime() )
-      	{	
+
+	if ( dTStamp.TimeUtcL() != Time::NullTTime() &&
+		CCalEntry::ENote != aEntry->EntryTypeL() )
+		{
 		AddDateTimePropertyL(aParser, KVersitTokenXDTSTAMP, dTStamp.TimeUtcL(), TVersitDateTime::EIsUTC, iTimeFlag);
       	}
 	
@@ -665,6 +671,16 @@
 		CCalAttachment* attach = aEntry->AttachmentL(ii);
 		AddAttachmentPropertyL(aParser, *attach);
 		}
+		
+	// Add the X-FAVOURITE property. Versit only exports signed ints but
+	// can't handle the '-' sign when importing. Therefore it must be exported
+	// as a string to ensure there is no '-' sign. When importing the value
+	// would incorrectly become 0.
+	//AddIntegerPropertyL( aParser, KVCalTokenXFavourite, aEntry->FavouriteL());
+	TBuf<10> favouriteString;  
+	TUint32 favourite = aEntry->FavouriteL();
+	favouriteString.Num( favourite );
+	AddDesPropertyL( aParser, KVCalTokenXFavourite, favouriteString );
 	}