phoneuis/easydialing/src/easydialingutils.cpp
branchRCL_3
changeset 57 94dc1107e8b2
parent 14 24062c24fe38
equal deleted inserted replaced
44:3c221667e687 57:94dc1107e8b2
    78             {
    78             {
    79             ptr.Copy( *lastName );
    79             ptr.Copy( *lastName );
    80             ptr.Append( KNameSeparatorChar );
    80             ptr.Append( KNameSeparatorChar );
    81             ptr.Append( *firstName );
    81             ptr.Append( *firstName );
    82             }        
    82             }        
    83         } 
    83         }
    84     
    84 
    85     // If firstname and last name are missing, duplicate company name into name field.
    85     // If firstname and last name are missing, put company name into the first field.
    86     if ( ptr.Length() == 0 )
    86     if ( ptr.Length() == 0 )
    87         {
    87         {
    88         ptr.Append( *companyName );
    88         ptr.Append( *companyName );
    89         }
    89         }
    90     
    90     else
    91     // Append company name using tab as a separator.
    91         {
    92     ptr.Append( KListFieldSeparatorChar );
    92         // Otherwise add company name into the second field using tab as a separator.
    93     ptr.Append( *companyName );
    93         ptr.Append( KListFieldSeparatorChar );
    94     
    94         ptr.Append( *companyName );
       
    95         }
       
    96 
    95     CleanupStack::Pop( string );
    97     CleanupStack::Pop( string );
    96     CleanupStack::PopAndDestroy( 3, firstName );
    98     CleanupStack::PopAndDestroy( 3, firstName );
    97     CleanupStack::PushL( string );
    99     CleanupStack::PushL( string );
    98     return string;
   100     return string;
    99     }
   101     }