equal
deleted
inserted
replaced
482 } |
482 } |
483 |
483 |
484 HBufC* result = NULL; |
484 HBufC* result = NULL; |
485 if ( doesFit ) |
485 if ( doesFit ) |
486 { |
486 { |
|
487 if ( aLineArray.Count() == 1 ) |
|
488 { |
|
489 aLineArray.AppendL( TPtrC(KNullDesC) ); |
|
490 } |
|
491 |
487 // If we could fit, we return visualText and caller has |
492 // If we could fit, we return visualText and caller has |
488 // to memory manage it. TPtrs in aLineArray points to this text |
493 // to memory manage it. TPtrs in aLineArray points to this text |
489 // buffer. |
494 // buffer. |
490 result = visualText; |
495 result = visualText; |
491 CleanupStack::Pop( visualText ); |
496 CleanupStack::Pop( visualText ); |
510 // In case Avkon method wrapped text to less lines than we tried |
515 // In case Avkon method wrapped text to less lines than we tried |
511 // it means that text fits to less lines, but icons has to |
516 // it means that text fits to less lines, but icons has to |
512 // be put to empty line after text! |
517 // be put to empty line after text! |
513 // We have to manually add that empty line. |
518 // We have to manually add that empty line. |
514 if ( aLineArray.Count() < triedLines ) |
519 if ( aLineArray.Count() < triedLines ) |
|
520 { |
|
521 aLineArray.AppendL( TPtrC(KNullDesC) ); |
|
522 } |
|
523 |
|
524 if ( aLineArray.Count() == 1 ) |
515 { |
525 { |
516 aLineArray.AppendL( TPtrC(KNullDesC) ); |
526 aLineArray.AppendL( TPtrC(KNullDesC) ); |
517 } |
527 } |
518 |
528 |
519 // We return original text, because |
529 // We return original text, because |
659 // For subsequent text lines, we create separate list lines. |
669 // For subsequent text lines, we create separate list lines. |
660 if ((end != start) && (!isAllDayEvent)) |
670 if ((end != start) && (!isAllDayEvent)) |
661 { |
671 { |
662 isEndDisplayed = EFalse; |
672 isEndDisplayed = EFalse; |
663 } |
673 } |
664 for (TInt i(1); i < textLines->Count() || !isEndDisplayed; i++) |
674 TInt textLinesCount = textLines->Count(); |
|
675 for (TInt i(1); i <= textLinesCount || !isEndDisplayed; i++) |
665 { |
676 { |
|
677 if(i == textLinesCount) |
|
678 { |
|
679 itemInfo.iBottomLine = iItemTextArray->Count(); |
|
680 break; |
|
681 } |
666 if (itemInfo.iTopLine == KIndexError) |
682 if (itemInfo.iTopLine == KIndexError) |
667 { |
683 { |
668 itemInfo.iTopLine = iItemTextArray->Count(); |
684 itemInfo.iTopLine = iItemTextArray->Count(); |
669 } |
685 } |
670 iItemTextArray->AppendL(*listItemData); |
686 iItemTextArray->AppendL(*listItemData); |