equal
deleted
inserted
replaced
228 |
228 |
229 MVPbkStoreContactField* CPbk2CopyAddressToClipboardCmd::FocusedFieldLC |
229 MVPbkStoreContactField* CPbk2CopyAddressToClipboardCmd::FocusedFieldLC |
230 ( MVPbkStoreContact& aStoreContact ) |
230 ( MVPbkStoreContact& aStoreContact ) |
231 { |
231 { |
232 TInt index = KErrNotFound; |
232 TInt index = KErrNotFound; |
233 CPbk2PresentationContact* presentationContact = |
233 |
234 CPbk2PresentationContact::NewL( aStoreContact, |
|
235 iAppServices->FieldProperties() ); |
|
236 CleanupStack::PushL( presentationContact ); |
|
237 |
|
238 if (iUiControl) |
234 if (iUiControl) |
239 { |
235 { |
240 index = presentationContact->PresentationFields().StoreIndexOfField( |
236 index = iUiControl->FocusedFieldIndex(); |
241 iUiControl->FocusedFieldIndex() ); |
237 } |
242 } |
238 |
243 CleanupStack::PopAndDestroy( presentationContact ); |
|
244 |
|
245 if ( index != KErrNotFound ) |
239 if ( index != KErrNotFound ) |
246 { |
240 { |
247 // Use FieldAtLC to avoid the unvalidity of the field after new |
241 // Use FieldAtLC to avoid the unvalidity of the field after new |
248 // FieldAt call. |
242 // FieldAt call. |
249 return aStoreContact.Fields().FieldAtLC( index ); |
243 return aStoreContact.Fields().FieldAtLC( index ); |