meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrviewerattendeesfield.cpp
changeset 1 12c456ceeff2
parent 0 8466d47a6819
child 12 4ce476e64c59
equal deleted inserted replaced
0:8466d47a6819 1:12c456ceeff2
   528             if ( name.Length() > 0 )
   528             if ( name.Length() > 0 )
   529                 {
   529                 {
   530                 text.Set( name );
   530                 text.Set( name );
   531                 }
   531                 }
   532             
   532             
   533             HBufC* clippedTextHBufC = ClipTextLC( text, *font, maxLineWidth );
   533             if ( text.Length() > 0 )
   534             TPtr clippedText = clippedTextHBufC->Des();
       
   535             clippedText.Trim();
       
   536             
       
   537             if ( clippedText.Length() > 0 )
       
   538                 {
   534                 {
   539                 CESMRRichTextLink* link = CESMRRichTextLink::NewL(
   535                 CESMRRichTextLink* link = CESMRRichTextLink::NewL(
   540                         buffer.Length(), 
   536                         buffer.Length(), 
   541                         clippedText.Length() + 
   537                         text.Length() + 
   542                             KAddressDelimeterSemiColon().Length(), 
   538                             KAddressDelimeterSemiColon().Length(), 
   543                         addr,
   539                         addr,
   544                         CESMRRichTextLink::ETypeEmail,
   540                         CESMRRichTextLink::ETypeEmail,
   545                         CESMRRichTextLink::ETriggerKeyRight );
   541                         CESMRRichTextLink::ETriggerKeyRight );
   546                 CleanupStack::PushL( link );
   542                 CleanupStack::PushL( link );
   547                 attendeeLinks.AppendL( link );
   543                 attendeeLinks.AppendL( link );
   548                 CleanupStack::Pop( link );
   544                 CleanupStack::Pop( link );
   549         
   545         
   550                 // Append text and semicolon to buffer.
   546                 // Append text and semicolon to buffer.
   551                 buffer.ReAllocL( buffer.Length() +
   547                 buffer.ReAllocL( buffer.Length() +
   552                                  clippedText.Length() +
   548                                  text.Length() +
   553                                  KAddressDelimeterSemiColon().Length() + 
   549                                  KAddressDelimeterSemiColon().Length() + 
   554                                  KNewLine().Length() );
   550                                  KNewLine().Length() );
   555                 buffer.Append( clippedText );
   551                 buffer.Append( text );
   556                 buffer.Append( KAddressDelimeterSemiColon );
   552                 buffer.Append( KAddressDelimeterSemiColon );
   557                 buffer.Append( KNewLine );
   553                 buffer.Append( KNewLine );
   558                 }
   554                 }            
   559             
       
   560             CleanupStack::PopAndDestroy( clippedTextHBufC );
       
   561             }
   555             }
   562         
   556         
   563         // If there are more lines in use than KMaxLineCount and
   557         // If there are more lines in use than KMaxLineCount and
   564         // we don't want to show all attendees, leave only
   558         // we don't want to show all attendees, leave only
   565         // KMaxLineCount-1 attendees and add 'show all'
   559         // KMaxLineCount-1 attendees and add 'show all'