phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp
branchRCL_3
changeset 8 5586b4d2ec3e
parent 0 e686773b3f54
child 15 34879f5cfc63
--- a/phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp	Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp	Wed Apr 14 15:45:35 2010 +0300
@@ -383,35 +383,40 @@
 @return ETrue if the uid match or reverse.
 */
 TBool CViewContactManager::ContactCorrectType(TUid aContactTypeUid, TContactViewPreferences aTypeToInclude)
-	{
-	TBool correctType(EFalse);
-	if (aContactTypeUid==KUidContactCard || aContactTypeUid==KUidContactOwnCard)
-		{
-		// Ignore Unsorted Contacts flags & White Space flag
-		// catch non- contact views
-		// Should be EContactsOnly, EContactAndGroups & EICCEntriesAndContacts
-		if (0 == ((aTypeToInclude & ~(ESingleWhiteSpaceIsEmptyField | EIgnoreUnSorted | EUnSortedAtBeginning | EUnSortedAtEnd))
-				& (EGroupsOnly | EICCEntriesOnly))) // Ignore 'UnSorted' flags, exclude Groups Only & ICC Only 
-			{
-			correctType = ETrue;
-			}
-		}
-	else if (aContactTypeUid == KUidContactGroup)
-		{
-		if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
-			{
-			correctType = ETrue;
-			}
-		}
-	else if (aContactTypeUid == KUidContactICCEntry)
-		{
-		if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
-			{
-			correctType = ETrue;
-			}
-		}
-	return correctType;
-	}
+    {
+    TBool correctType = EFalse;
+
+    if (aContactTypeUid == KUidContactCard)
+        {
+        if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
+            {
+            correctType = ETrue;
+            }
+        }
+    else if (aContactTypeUid == KUidContactOwnCard)
+        {
+        if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
+            {
+            correctType = ETrue;
+            }
+        }
+    else if (aContactTypeUid == KUidContactGroup)
+        {
+        if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
+            {
+            correctType = ETrue;
+            }
+        }
+    else if (aContactTypeUid == KUidContactICCEntry)
+        {
+        if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
+            {
+            correctType = ETrue;
+            }
+        }
+
+    return correctType;
+    }
 
 
 /**