phoneuis/easydialing/src/easydialingutils.cpp
branchRCL_3
changeset 4 24062c24fe38
parent 3 8871b09be73b
child 22 94dc1107e8b2
equal deleted inserted replaced
3:8871b09be73b 4:24062c24fe38
    30 //
    30 //
    31 HBufC* EasyDialingUtils::CreateContactStringLC(
    31 HBufC* EasyDialingUtils::CreateContactStringLC(
    32         const TDesC& aFirstName,
    32         const TDesC& aFirstName,
    33         const TDesC& aLastName,
    33         const TDesC& aLastName,
    34         const TDesC& aCompanyName,
    34         const TDesC& aCompanyName,
    35         CPbkContactEngine::TPbkNameOrder aNameOrder )
    35         CEasyDialingContactDataManager::TNameOrder aNameOrder )
    36     {
    36     {
    37     // first strip control chars from the names
    37     // first strip control chars from the names
    38     HBufC* firstName = aFirstName.AllocLC();
    38     HBufC* firstName = aFirstName.AllocLC();
    39     TPtr fPtr = firstName->Des();
    39     TPtr fPtr = firstName->Des();
    40     AknTextUtils::StripCharacters( fPtr, KAknStripListControlChars );
    40     AknTextUtils::StripCharacters( fPtr, KAknStripListControlChars );
    66         }
    66         }
    67     
    67     
    68     // If there are both first and last name, the name string is composed of them both.
    68     // If there are both first and last name, the name string is composed of them both.
    69     else 
    69     else 
    70         {
    70         {
    71         if( aNameOrder == CPbkContactEngine::EPbkNameOrderFirstNameLastName )
    71         if( aNameOrder == CEasyDialingContactDataManager::EFirstnameLastname )
    72             {
    72             {
    73             ptr.Copy( *firstName );
    73             ptr.Copy( *firstName );
    74             ptr.Append( KNameSeparatorChar );
    74             ptr.Append( KNameSeparatorChar );
    75             ptr.Append( *lastName );
    75             ptr.Append( *lastName );
    76             }
    76             }