diff -r f5911524345e -r 78867dafe7eb uiservicetab/vimpstcmdprocess/src/cvimpstcmdaddfrompbk.cpp --- a/uiservicetab/vimpstcmdprocess/src/cvimpstcmdaddfrompbk.cpp Fri Feb 19 22:41:11 2010 +0200 +++ b/uiservicetab/vimpstcmdprocess/src/cvimpstcmdaddfrompbk.cpp Fri Mar 12 15:41:33 2010 +0200 @@ -178,35 +178,37 @@ const MVPbkFieldType* fieldType = field.BestMatchingFieldType(); //find the relevant voip fields/email id fileds. - if ( fieldType && - ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPHOME ) || + if ( fieldType ) + { + if ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPHOME ) || ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPWORK ) || ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VOIPGEN ) || ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_SIP )|| ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILWORK ) || ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILHOME ) || ( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_EMAILGEN )) - { - CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL] -> GetServiceFieldsL - Found"); - values[0] = MVPbkContactFieldTextData::Cast( - iStoreContact.Fields().FieldAt( index ). - FieldData() ).Text().AllocLC(); - if ( values[0] ) { - // Check for prefix and remove if found - TInt prefixLocation = values[0]->Locate( ':' ); - if ( KErrNotFound != prefixLocation ) + CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL] -> GetServiceFieldsL - Found"); + values[0] = MVPbkContactFieldTextData::Cast( + iStoreContact.Fields().FieldAt( index ). + FieldData() ).Text().AllocLC(); + if ( values[0] ) { - CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL] -> Prefix found -> remove"); - aArrayForServiceFields.AppendL( values[0]->Des().Mid( + // Check for prefix and remove if found + TInt prefixLocation = values[0]->Locate( ':' ); + if ( KErrNotFound != prefixLocation ) + { + CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL] -> Prefix found -> remove"); + aArrayForServiceFields.AppendL( values[0]->Des().Mid( prefixLocation+1 ) ); + } + else + { + CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL] -> No Prefix found"); + aArrayForServiceFields.AppendL( values[0]->Des() ); + } + CleanupStack::PopAndDestroy( values[0] ); } - else - { - CHAT_DP_FUNC_ENTER("[CVIMPSTStorageContact::GetServiceFieldsL] -> No Prefix found"); - aArrayForServiceFields.AppendL( values[0]->Des() ); - } - CleanupStack::PopAndDestroy( values[0] ); } } }