uifw/AvKon/src/aknmessagequerydialog.cpp
branchRCL_3
changeset 38 c52421ed5f07
parent 23 3d340a0166ff
child 55 aecbbf00d063
equal deleted inserted replaced
29:a8834a2e9a96 38:c52421ed5f07
   300             iMsgQueryExtension->iFormatTextArray[lastIndex] = aLinkText.AllocL();
   300             iMsgQueryExtension->iFormatTextArray[lastIndex] = aLinkText.AllocL();
   301             }
   301             }
   302         else
   302         else
   303             {
   303             {
   304             // SetLinkTextL creates new callback in the callback array for the new link
   304             // SetLinkTextL creates new callback in the callback array for the new link
   305             iMsgQueryExtension->iFormatTextArray.Append( aLinkText.AllocL() );
   305 			HBufC* linkText = aLinkText.AllocL();
   306             iMsgQueryExtension->iFormatTypeArray.Append( EMsgQueryLink );
   306 			CleanupStack::PushL( linkText );
       
   307 			iMsgQueryExtension->iFormatTextArray.AppendL( linkText );
       
   308 			CleanupStack::Pop( linkText );
       
   309             iMsgQueryExtension->iFormatTypeArray.AppendL( EMsgQueryLink );
   307                
   310                
   308             // If the other method SetLink has been already called 
   311             // If the other method SetLink has been already called 
   309             // the new link is finished by adding the link count
   312             // the new link is finished by adding the link count
   310             if ( iMsgQueryExtension->iCallBackArray.Count() > iMsgQueryExtension->iLinkCount )
   313             if ( iMsgQueryExtension->iCallBackArray.Count() > iMsgQueryExtension->iLinkCount )
   311                 {
   314                 {
   344     if ( iMsgQueryExtension->iMarkedLinks )
   347     if ( iMsgQueryExtension->iMarkedLinks )
   345         {
   348         {
   346         if ( iMsgQueryExtension->iCallBackArray.Count() < iMsgQueryExtension->iLinkCount )
   349         if ( iMsgQueryExtension->iCallBackArray.Count() < iMsgQueryExtension->iLinkCount )
   347             {
   350             {
   348             // SetLink creates new callback in the callback array for the new link
   351             // SetLink creates new callback in the callback array for the new link
   349             iMsgQueryExtension->iCallBackArray.Append( aCallBack );                
   352 			if ( KErrNone != iMsgQueryExtension->iCallBackArray.Append( aCallBack ) )
       
   353 				{
       
   354 				return;
       
   355 				}
   350             }
   356             }
   351         }         
   357         }         
   352     else if ( iMsgQueryExtension->iLinkCount < KMaxLinks ) 
   358     else if ( iMsgQueryExtension->iLinkCount < KMaxLinks ) 
   353         {
   359         {
   354         if ( iMsgQueryExtension->iCallBackArray.Count() > iMsgQueryExtension->iLinkCount ) 
   360         if ( iMsgQueryExtension->iCallBackArray.Count() > iMsgQueryExtension->iLinkCount ) 
   357             iMsgQueryExtension->iCallBackArray[iMsgQueryExtension->iCallBackArray.Count()-1] = aCallBack;            
   363             iMsgQueryExtension->iCallBackArray[iMsgQueryExtension->iCallBackArray.Count()-1] = aCallBack;            
   358             }
   364             }
   359         else
   365         else
   360             {
   366             {
   361             // SetLink creates new callback in the callback array for the new link
   367             // SetLink creates new callback in the callback array for the new link
   362             iMsgQueryExtension->iCallBackArray.Append( aCallBack );
   368             if ( KErrNone != iMsgQueryExtension->iCallBackArray.Append( aCallBack ) )
       
   369             	{
       
   370             	return;
       
   371             	}
   363                 
   372                 
   364             // If the other method SetLinkText has been already called 
   373             // If the other method SetLinkText has been already called 
   365             // the new link is finished by adding the link count
   374             // the new link is finished by adding the link count
   366             
   375             
   367             if ( LinksInArray() > iMsgQueryExtension->iLinkCount )                        
   376             if ( LinksInArray() > iMsgQueryExtension->iLinkCount )                        
   686                 return EFalse;                    
   695                 return EFalse;                    
   687                 }
   696                 }
   688             }
   697             }
   689         delete messageBuf;
   698         delete messageBuf;
   690         }      
   699         }      
   691      iMsgQueryExtension->iFormatTextLocationArray.Append( linkTextLocation );         
   700      iMsgQueryExtension->iFormatTextLocationArray.AppendL( linkTextLocation );         
   692      return ETrue;
   701      return ETrue;
   693     }
   702     }
   694     
   703     
   695 void CAknMessageQueryDialog::CreateExtensionL()
   704 void CAknMessageQueryDialog::CreateExtensionL()
   696     {
   705     {