mmsengine/mmsmessage/src/mmsmessageoperation.cpp
branchRCL_3
changeset 60 7fdbb852d323
parent 57 ebe688cedc25
equal deleted inserted replaced
57:ebe688cedc25 60:7fdbb852d323
   572     iNewMmsHeaders = NULL;
   572     iNewMmsHeaders = NULL;
   573 
   573 
   574     if ( ( iOperation == EReply ) ||
   574     if ( ( iOperation == EReply ) ||
   575          ( iOperation == EForward ))
   575          ( iOperation == EForward ))
   576         {
   576         {
   577         // Copy appropriate parts from original MMS headers
   577         // Copy appropiate parts from original MMS headers
   578         // We checked in the beginning that we have a source entry
   578         // We checked in the beginning that we have a source entry
   579         originalMmsHeaders = CMmsHeaders::NewL( iSettings->MmsVersion() );
   579         originalMmsHeaders = CMmsHeaders::NewL( iSettings->MmsVersion() );
   580         CleanupStack::PushL( originalMmsHeaders );     // ***
   580         CleanupStack::PushL( originalMmsHeaders );     // ***
   581         // Get the original message's MMS headers
   581         // Get the original message's MMS headers
   582         originalMmsHeaders->RestoreL( *iSourceStore );
   582         originalMmsHeaders->RestoreL( *iSourceStore );
   605                 {
   605                 {
   606                 recipientList->AppendL(
   606                 recipientList->AppendL(
   607                     TMmsGenUtils::PureAddress( iNewMmsHeaders->BccRecipients().MdcaPoint( i ) ) );
   607                     TMmsGenUtils::PureAddress( iNewMmsHeaders->BccRecipients().MdcaPoint( i ) ) );
   608                 }
   608                 }
   609                 
   609                 
   610            
   610             // Find own number
       
   611             // don't remove if only one recipient in the list
       
   612             if ( recipientList->MdcaCount() > 1 )
       
   613                 {
       
   614                 CMmsOwnNumber* ownNumberSearcher = 
       
   615                     CMmsOwnNumber::NewL( &iMsvSession.FileSession() );
       
   616                 CleanupStack::PushL( ownNumberSearcher );
       
   617                 
       
   618                 TInt index = -1;
       
   619                 index = ownNumberSearcher->StartL( *recipientList );
       
   620                 
       
   621                 if ( index >= 0 )
       
   622                     {
       
   623                     // found something
       
   624                     while ( iNewMmsHeaders->RemoveAddressee( recipientList->MdcaPoint( index ) ) )
       
   625                         {
       
   626                         }
       
   627                     }
       
   628                     
       
   629                 CleanupStack::PopAndDestroy( ownNumberSearcher );
       
   630                 }
   611             CleanupStack::PopAndDestroy( recipientList );
   631             CleanupStack::PopAndDestroy( recipientList );
   612             }
   632             }
   613 
   633 
   614         // the root must always be retained if it is specified
   634         // the root must always be retained if it is specified
   615         if ( iPartList & KMsvMessagePartAttachments )
   635         if ( iPartList & KMsvMessagePartAttachments )