equal
deleted
inserted
replaced
55 |
55 |
56 /// Unnamed namespace for local definitions |
56 /// Unnamed namespace for local definitions |
57 namespace { |
57 namespace { |
58 |
58 |
59 // LOCAL FUNCTIONS |
59 // LOCAL FUNCTIONS |
|
60 |
|
61 _LIT( KTabChar, "\t" ); |
60 |
62 |
61 /** |
63 /** |
62 * Returns icon array from given list box. |
64 * Returns icon array from given list box. |
63 * |
65 * |
64 * @param aListBox List box. |
66 * @param aListBox List box. |
700 |
702 |
701 TAknLayoutText textLayout; |
703 TAknLayoutText textLayout; |
702 textLayout.LayoutText(layout.Rect(), AknLayoutScalable_Apps::popup_navstr_preview_pane_t1(0).LayoutLine()); |
704 textLayout.LayoutText(layout.Rect(), AknLayoutScalable_Apps::popup_navstr_preview_pane_t1(0).LayoutLine()); |
703 |
705 |
704 TPtrC desc(Model()->ItemTextArray()->MdcaPoint(View()->TopItemIndex())); |
706 TPtrC desc(Model()->ItemTextArray()->MdcaPoint(View()->TopItemIndex())); |
705 |
707 |
706 HBufC* buf = desc.Mid(desc.Find(_L("\t")) + 1, 1).AllocL(); |
708 //Add "if-clause" to avaid the error that argument of Mid() out of range. |
707 TPtr textPtr = buf->Des(); |
709 TInt index = desc.Find( KTabChar ); |
708 textPtr.UpperCase(); |
710 if ( index != KErrNotFound && index < desc.Length()-1 ) |
709 |
711 { |
710 textLayout.DrawText(*gc, textPtr, ETrue, normal ); |
712 HBufC* buf = desc.Mid( index + 1, 1 ).AllocL(); |
711 |
713 |
712 delete buf; |
714 TPtr textPtr = buf->Des(); |
|
715 textPtr.UpperCase(); |
|
716 |
|
717 textLayout.DrawText( *gc, textPtr, ETrue, normal ); |
|
718 |
|
719 delete buf; |
|
720 } |
713 } |
721 } |
714 } |
722 } |
715 // End of File |
723 // End of File |