phonebookui/Phonebook2/Presentation/src/CPbk2PresentationContactFieldCollection.cpp
--- a/phonebookui/Phonebook2/Presentation/src/CPbk2PresentationContactFieldCollection.cpp Fri Mar 12 15:41:25 2010 +0200
+++ b/phonebookui/Phonebook2/Presentation/src/CPbk2PresentationContactFieldCollection.cpp Mon Mar 15 12:39:26 2010 +0200
@@ -316,6 +316,32 @@
}
// --------------------------------------------------------------------------
+// CPbk2PresentationContactFieldCollection::FieldIndexOfStoreField
+// --------------------------------------------------------------------------
+//
+EXPORT_C TInt CPbk2PresentationContactFieldCollection::FieldIndexOfStoreField(
+ TInt aStoreFieldIndex) const
+ {
+ __ASSERT_DEBUG(aStoreFieldIndex >= 0 &&
+ aStoreFieldIndex < iFieldCollection.FieldCount(),
+ Panic(EGetStoreContactIndex_PreCond));
+
+ const TInt count = iFields.Count();
+ const MVPbkStoreContactField& collectionField = iFieldCollection.FieldAt( aStoreFieldIndex );
+ for (TInt i = 0; i < count; ++i)
+ {
+ MVPbkStoreContactField& field = iFields[i]->StoreField();
+ if ( field.IsSame( collectionField ) )
+ {
+ return i;
+ }
+ }
+ __ASSERT_DEBUG(EFalse, Panic(EGetStoreContactIndex_PostCond));
+ return KErrNotFound;
+ }
+
+
+// --------------------------------------------------------------------------
// CPbk2PresentationContactFieldCollection::ParentContact
// --------------------------------------------------------------------------
//