calendarui/editors/src/calenunifiededitor.cpp
branchRCL_3
changeset 13 0f07cd1b5772
parent 12 38571fd2a704
child 19 1984aceb8774
--- a/calendarui/editors/src/calenunifiededitor.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/editors/src/calenunifiededitor.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -2256,6 +2256,13 @@
 
     CleanupStack::PushL( entry );
     iEditedCalEntry.DescriptionL();  // make sure entry is fully loaded
+    if (CCalEntry::ETodo == entry->EntryTypeL())//check the entry type
+        {//remove GeoValue and Location info from a ToDo as ToDo does specs
+    //does not include them
+        iEditedCalEntry.ClearGeoValueL();
+        iEditedCalEntry.SetLocationL(KNullDesC);
+        }
+    
     entry->CopyFromL(iEditedCalEntry, CCalEntry::EDontCopyId);
     entry->DescriptionL();  // make sure entry is fully copied
     
@@ -2275,12 +2282,7 @@
             }
 		}
     
-    if(!IsCreatingNewEntry() && !iEditorDataHandler->IsCalendarEditedL())
-        {
-        iServices->GetAttachmentData()->Reset();
-        iServices->EntryViewL(iEditorDataHandler->PreviousDbCollectionId())
-                                                ->DeleteL(*iOriginalCalEntry);
-        }
+
     
     TInt saveErr( KErrNone );
     if( aForcedExit )
@@ -2306,6 +2308,9 @@
                    newInstanceEndDate,
                    iUnifiedEditorControl->GetCalendarNameForEntryL() ) );
         }
+    
+    //Agenda server is taking care of deleting the old entry when only entrytype is changing
+    //so calendar is not deleting the old entry here, when only entry type has changed.
     if(!IsCreatingNewEntry() && iEditorDataHandler->IsCalendarEditedL())
         {
         iServices->GetAttachmentData()->Reset();
@@ -3345,6 +3350,7 @@
 void CCalenUnifiedEditor::AddPictureL(TInt isNotFirstTime)
     {
     TRACE_ENTRY_POINT;
+    return;
     
     // Instantiate CMapIconPicture object 300x300 twips in size
     CEikRichTextEditor* locationControl = static_cast<CEikRichTextEditor*>(Control(ECalenEditorPlace));