398 endTime.FormatL(dateString, KCalendarTimeFormat); |
398 endTime.FormatL(dateString, KCalendarTimeFormat); |
399 index_item->AddFieldL(KCalendarEndTimeField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); |
399 index_item->AddFieldL(KCalendarEndTimeField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); |
400 |
400 |
401 index_item->AddFieldL(KMimeTypeField, KMimeTypeCalendar, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); |
401 index_item->AddFieldL(KMimeTypeField, KMimeTypeCalendar, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); |
402 |
402 |
403 TInt excerptLength = 3 + entry->SummaryL().Length() + entry->DescriptionL().Length() + entry->LocationL().Length(); |
403 TInt excerptLength = 1 /*single 1-character delimiters*/ + entry->DescriptionL().Length() + entry->LocationL().Length(); |
404 HBufC* excerpt = HBufC::NewLC(excerptLength); |
404 HBufC* excerpt = HBufC::NewLC(excerptLength); |
405 TPtr excerptDes = excerpt->Des(); |
405 TPtr excerptDes = excerpt->Des(); |
406 excerptDes.Copy(entry->SummaryL()); |
|
407 excerptDes.Append(KExcerptDelimiter); |
|
408 excerptDes.Append(entry->DescriptionL()); |
406 excerptDes.Append(entry->DescriptionL()); |
409 excerptDes.Append(KExcerptDelimiter); |
407 excerptDes.Append(KExcerptDelimiter); |
410 excerptDes.Append(entry->LocationL()); |
408 excerptDes.Append(entry->LocationL()); |
411 |
409 |
412 index_item->AddExcerptL(*excerpt); |
410 index_item->AddExcerptL(*excerpt); |