--- a/calendarui/views/src/calendaylistboxmodel.cpp Tue May 25 12:41:10 2010 +0300
+++ b/calendarui/views/src/calendaylistboxmodel.cpp Wed Jun 09 09:40:23 2010 +0300
@@ -484,6 +484,11 @@
HBufC* result = NULL;
if ( doesFit )
{
+ if ( aLineArray.Count() == 1 )
+ {
+ aLineArray.AppendL( TPtrC(KNullDesC) );
+ }
+
// If we could fit, we return visualText and caller has
// to memory manage it. TPtrs in aLineArray points to this text
// buffer.
@@ -515,6 +520,11 @@
{
aLineArray.AppendL( TPtrC(KNullDesC) );
}
+
+ if ( aLineArray.Count() == 1 )
+ {
+ aLineArray.AppendL( TPtrC(KNullDesC) );
+ }
// We return original text, because
// AknBidiTextUtils::ConvertToVisualAndWrapToArrayL
@@ -661,8 +671,14 @@
{
isEndDisplayed = EFalse;
}
- for (TInt i(1); i < textLines->Count() || !isEndDisplayed; i++)
+ TInt textLinesCount = textLines->Count();
+ for (TInt i(1); i <= textLinesCount || !isEndDisplayed; i++)
{
+ if(i == textLinesCount)
+ {
+ itemInfo.iBottomLine = iItemTextArray->Count();
+ break;
+ }
if (itemInfo.iTopLine == KIndexError)
{
itemInfo.iTopLine = iItemTextArray->Count();