calendarui/editors/src/calenunifiededitor.cpp
branchRCL_3
changeset 13 0f07cd1b5772
parent 12 38571fd2a704
child 19 1984aceb8774
equal deleted inserted replaced
12:38571fd2a704 13:0f07cd1b5772
  2254 
  2254 
  2255      //   CleanupStack::Pop( guid ); // ownership was passed
  2255      //   CleanupStack::Pop( guid ); // ownership was passed
  2256 
  2256 
  2257     CleanupStack::PushL( entry );
  2257     CleanupStack::PushL( entry );
  2258     iEditedCalEntry.DescriptionL();  // make sure entry is fully loaded
  2258     iEditedCalEntry.DescriptionL();  // make sure entry is fully loaded
       
  2259     if (CCalEntry::ETodo == entry->EntryTypeL())//check the entry type
       
  2260         {//remove GeoValue and Location info from a ToDo as ToDo does specs
       
  2261     //does not include them
       
  2262         iEditedCalEntry.ClearGeoValueL();
       
  2263         iEditedCalEntry.SetLocationL(KNullDesC);
       
  2264         }
       
  2265     
  2259     entry->CopyFromL(iEditedCalEntry, CCalEntry::EDontCopyId);
  2266     entry->CopyFromL(iEditedCalEntry, CCalEntry::EDontCopyId);
  2260     entry->DescriptionL();  // make sure entry is fully copied
  2267     entry->DescriptionL();  // make sure entry is fully copied
  2261     
  2268     
  2262     TCalTime newInstanceStartDate, newInstanceEndDate;
  2269     TCalTime newInstanceStartDate, newInstanceEndDate;
  2263     CalculateNewInstanceStartAndEndDateL( newInstanceStartDate, newInstanceEndDate );
  2270     CalculateNewInstanceStartAndEndDateL( newInstanceStartDate, newInstanceEndDate );
  2273             rrule.SetInterval( 1 ); // once a year
  2280             rrule.SetInterval( 1 ); // once a year
  2274             entry->SetRRuleL( rrule );
  2281             entry->SetRRuleL( rrule );
  2275             }
  2282             }
  2276 		}
  2283 		}
  2277     
  2284     
  2278     if(!IsCreatingNewEntry() && !iEditorDataHandler->IsCalendarEditedL())
  2285 
  2279         {
       
  2280         iServices->GetAttachmentData()->Reset();
       
  2281         iServices->EntryViewL(iEditorDataHandler->PreviousDbCollectionId())
       
  2282                                                 ->DeleteL(*iOriginalCalEntry);
       
  2283         }
       
  2284     
  2286     
  2285     TInt saveErr( KErrNone );
  2287     TInt saveErr( KErrNone );
  2286     if( aForcedExit )
  2288     if( aForcedExit )
  2287         {
  2289         {
  2288         iEntryUpdater->UpdateInstanceL( 
  2290         iEntryUpdater->UpdateInstanceL( 
  2304                    iRepeatType,
  2306                    iRepeatType,
  2305                    newInstanceStartDate,
  2307                    newInstanceStartDate,
  2306                    newInstanceEndDate,
  2308                    newInstanceEndDate,
  2307                    iUnifiedEditorControl->GetCalendarNameForEntryL() ) );
  2309                    iUnifiedEditorControl->GetCalendarNameForEntryL() ) );
  2308         }
  2310         }
       
  2311     
       
  2312     //Agenda server is taking care of deleting the old entry when only entrytype is changing
       
  2313     //so calendar is not deleting the old entry here, when only entry type has changed.
  2309     if(!IsCreatingNewEntry() && iEditorDataHandler->IsCalendarEditedL())
  2314     if(!IsCreatingNewEntry() && iEditorDataHandler->IsCalendarEditedL())
  2310         {
  2315         {
  2311         iServices->GetAttachmentData()->Reset();
  2316         iServices->GetAttachmentData()->Reset();
  2312         iServices->EntryViewL(iEditorDataHandler->PreviousDbCollectionId())
  2317         iServices->EntryViewL(iEditorDataHandler->PreviousDbCollectionId())
  2313                                                 ->DeleteL(*iOriginalCalEntry);
  2318                                                 ->DeleteL(*iOriginalCalEntry);
  3343 // -----------------------------------------------------------------------------
  3348 // -----------------------------------------------------------------------------
  3344 //      
  3349 //      
  3345 void CCalenUnifiedEditor::AddPictureL(TInt isNotFirstTime)
  3350 void CCalenUnifiedEditor::AddPictureL(TInt isNotFirstTime)
  3346     {
  3351     {
  3347     TRACE_ENTRY_POINT;
  3352     TRACE_ENTRY_POINT;
       
  3353     return;
  3348     
  3354     
  3349     // Instantiate CMapIconPicture object 300x300 twips in size
  3355     // Instantiate CMapIconPicture object 300x300 twips in size
  3350     CEikRichTextEditor* locationControl = static_cast<CEikRichTextEditor*>(Control(ECalenEditorPlace));
  3356     CEikRichTextEditor* locationControl = static_cast<CEikRichTextEditor*>(Control(ECalenEditorPlace));
  3351     
  3357     
  3352     CRichText* text = locationControl->RichText();
  3358     CRichText* text = locationControl->RichText();