1029 else |
1029 else |
1030 { |
1030 { |
1031 iCalInstanceView->FindInstanceL(instanceList, filters, dayRange); |
1031 iCalInstanceView->FindInstanceL(instanceList, filters, dayRange); |
1032 } |
1032 } |
1033 |
1033 |
1034 // In this list, check if any all day events are there |
1034 // In this list, check if any events are there that end at the start of the day |
1035 // As all day events end at 12.00AM of next day, we should not show it again on next day |
1035 // we should not show it again on next day |
1036 TCalTime calTime; |
1036 TCalTime calTime; |
1037 TDateTime dateTime( |
1037 TDateTime dateTime( |
1038 day.date().year(), |
1038 day.date().year(), |
1039 static_cast<TMonth>(day.date().month() - 1), |
1039 static_cast<TMonth>(day.date().month() - 1), |
1040 day.date().day() - 1, day.time().hour(), |
1040 day.date().day() - 1, day.time().hour(), |
1041 day.time().minute(), 0, 0); |
1041 day.time().minute(), 0, 0); |
1042 TTime time(dateTime); |
1042 TTime time(dateTime); |
1043 for (int i(0); i < instanceList.Count(); i++) { |
1043 for (int i(0); i < instanceList.Count(); i++) { |
1044 if ((endsAtStartOfDay(instanceList[i], time)) && |
1044 if ((endsAtStartOfDay(instanceList[i], time))) { |
1045 instanceList[i]->Entry().EntryTypeL() == CCalEntry::EEvent) { |
1045 // Previous day event has been found, we are not supposed to |
1046 // Previous day all-day event has been found, we are not supposed to |
|
1047 // show it on current day, hence remove it from the instance list |
1046 // show it on current day, hence remove it from the instance list |
1048 CCalInstance *instance = instanceList[i]; |
1047 CCalInstance *instance = instanceList[i]; |
1049 instanceList.Remove(i); |
1048 instanceList.Remove(i); |
1050 delete instance; |
1049 delete instance; |
1051 i--; |
1050 i--; |
1316 entry.endTime().date().day() - 1, entry.endTime().time().hour(), |
1315 entry.endTime().date().day() - 1, entry.endTime().time().hour(), |
1317 entry.endTime().time().minute(), entry.endTime().time().second(), 0); |
1316 entry.endTime().time().minute(), entry.endTime().time().second(), 0); |
1318 |
1317 |
1319 TTime instStartTime(instStartDateTime); |
1318 TTime instStartTime(instStartDateTime); |
1320 TTime instEndTime(instEndDateTime); |
1319 TTime instEndTime(instEndDateTime); |
1321 instanceStartCalTime.SetTimeLocalL(instStartTime); |
1320 // For nontimed entries set the floating time |
1322 instanceEndCalTime.SetTimeLocalL(instEndTime); |
1321 if(entry.isTimedEntry()) { |
|
1322 instanceStartCalTime.SetTimeLocalL(instStartTime); |
|
1323 instanceEndCalTime.SetTimeLocalL(instEndTime); |
|
1324 }else { |
|
1325 instanceStartCalTime.SetTimeLocalFloatingL(instStartTime); |
|
1326 instanceEndCalTime.SetTimeLocalFloatingL(instEndTime); |
|
1327 } |
|
1328 |
1323 calEntry->SetStartAndEndTimeL(instanceStartCalTime,instanceEndCalTime); |
1329 calEntry->SetStartAndEndTimeL(instanceStartCalTime,instanceEndCalTime); |
1324 |
1330 |
1325 // Get the parent entry of this instance |
1331 // Get the parent entry of this instance |
1326 if (calEntry) { |
1332 if (calEntry) { |
1327 iCalEntryView->FetchL(calEntry->UidL(), entries); |
1333 iCalEntryView->FetchL(calEntry->UidL(), entries); |
1517 entry.endTime().date().day() - 1, entry.endTime().time().hour(), |
1523 entry.endTime().date().day() - 1, entry.endTime().time().hour(), |
1518 entry.endTime().time().minute(), entry.endTime().time().second(), 0); |
1524 entry.endTime().time().minute(), entry.endTime().time().second(), 0); |
1519 |
1525 |
1520 TTime instStartTime(instStartDateTime); |
1526 TTime instStartTime(instStartDateTime); |
1521 TTime instEndTime(instEndDateTime); |
1527 TTime instEndTime(instEndDateTime); |
1522 instanceStartCalTime.SetTimeLocalL(instStartTime); |
1528 // For nontimed entries set the floating time |
1523 instanceEndCalTime.SetTimeLocalL(instEndTime); |
1529 if (entry.isTimedEntry()) { |
|
1530 instanceStartCalTime.SetTimeLocalL(instStartTime); |
|
1531 instanceEndCalTime.SetTimeLocalL(instEndTime); |
|
1532 }else { |
|
1533 instanceStartCalTime.SetTimeLocalFloatingL(instStartTime); |
|
1534 instanceEndCalTime.SetTimeLocalFloatingL(instEndTime); |
|
1535 } |
1524 calEntry->SetStartAndEndTimeL(instanceStartCalTime,instanceEndCalTime); |
1536 calEntry->SetStartAndEndTimeL(instanceStartCalTime,instanceEndCalTime); |
1525 |
1537 |
1526 // Get the parent entry of this instance |
1538 // Get the parent entry of this instance |
1527 if (calEntry) { |
1539 if (calEntry) { |
1528 iCalEntryView->FetchL(calEntry->UidL(), entries); |
1540 iCalEntryView->FetchL(calEntry->UidL(), entries); |
2372 TCalTime dummy; |
2384 TCalTime dummy; |
2373 CalCommon::TCalTimeRange dayRange(dummy, dummy); |
2385 CalCommon::TCalTimeRange dayRange(dummy, dummy); |
2374 getDayRange(entry.startTime(), entry.startTime(), dayRange); |
2386 getDayRange(entry.startTime(), entry.startTime(), dayRange); |
2375 RPointerArray<CCalInstance> instances; |
2387 RPointerArray<CCalInstance> instances; |
2376 CleanupResetAndDestroyPushL(instances); |
2388 CleanupResetAndDestroyPushL(instances); |
2377 iCalInstanceView->FindInstanceL(instances, CalCommon::EIncludeAll, dayRange); |
2389 CalCommon::TCalViewFilter filter = |
|
2390 CalCommon::TCalViewFilter(CalCommon::EIncludeAnnivs | |
|
2391 CalCommon::EIncludeAppts | |
|
2392 CalCommon::EIncludeEvents | |
|
2393 CalCommon::EIncludeReminder | |
|
2394 CalCommon::EIncludeIncompletedTodos); |
|
2395 iCalInstanceView->FindInstanceL(instances, filter, dayRange); |
2378 TTime entryStartTime(dayRange.StartTime().TimeLocalL()); |
2396 TTime entryStartTime(dayRange.StartTime().TimeLocalL()); |
2379 |
2397 |
2380 CCalInstance* result = 0; |
2398 CCalInstance* result = 0; |
2381 |
2399 |
2382 // For instances finishing the next day (now possible with unified |
2400 // For instances finishing the next day (now possible with unified |