javaextensions/pim/cntadapter/src.s60/cpimcontactitemadapter.cpp
branchRCL_3
changeset 27 d5e927d5853b
parent 26 2455ef1f5bbc
--- a/javaextensions/pim/cntadapter/src.s60/cpimcontactitemadapter.cpp	Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/pim/cntadapter/src.s60/cpimcontactitemadapter.cpp	Tue Sep 14 21:06:50 2010 +0300
@@ -193,12 +193,12 @@
     JELOG2(EPim);
     const CDesCArray& pimCategories = aItem.ItemData().Categories();
     const TInt pimCategoryCount = pimCategories.Count();
-    TBool* newCategoryTable = new(ELeave) TBool[pimCategoryCount];
-    CleanupArrayDeletePushL(newCategoryTable);
+    CArrayFix<TInt>* newCategoryTable = new(ELeave) CArrayFixFlat<TInt> (pimCategoryCount);
+    CleanupStack::PushL(newCategoryTable);    
     TInt i = 0;
     for (i = 0; i < pimCategoryCount; i++)
     {
-        newCategoryTable[i] = ETrue;
+        newCategoryTable->InsertL(TRUE,i);
     }
 
     CContactIdArray* cardCategories = aCard.GroupsJoinedLC();
@@ -220,14 +220,14 @@
         }
         else
         {
-            // old group
-            newCategoryTable[pos] = EFalse;
+			// old group
+            newCategoryTable->InsertL(FALSE,pos);
         }
     }
     // then add new categories
     for (i = 0; i < pimCategoryCount; i++)
     {
-        if (newCategoryTable[i])
+        if (newCategoryTable->At(i))
         {
             TPtrC category = pimCategories[i];
             iCategoryManager.AddToGroupL(id, category);