fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp
branchRCL_3
changeset 9 e6a39382bb9c
parent 7 6defe5d1bd39
child 12 5e18d8c489d6
equal deleted inserted replaced
8:4eb1ae11334f 9:e6a39382bb9c
   281         case ECmdPenInputPopupCandidateList:
   281         case ECmdPenInputPopupCandidateList:
   282             {
   282             {
   283             TFepITICandidateList* candidatelist 
   283             TFepITICandidateList* candidatelist 
   284                                = reinterpret_cast<TFepITICandidateList*>( aParam );            
   284                                = reinterpret_cast<TFepITICandidateList*>( aParam );            
   285             CDesCArray* itemArray = candidatelist->iItemArray;
   285             CDesCArray* itemArray = candidatelist->iItemArray;
   286             if ( itemArray )
   286             if ( itemArray && itemArray->Count() > 0 )
   287                 {           
   287                 {           
   288                 TInt sumSize = 0;     
   288                 TInt sumSize = 0;     
   289                 for ( TInt i = 0; i < itemArray->Count(); i++ )
   289                 for ( TInt i = 0; i < itemArray->Count(); i++ )
   290                     {
   290                     {
   291                     sumSize += (*itemArray)[i].Size();
   291                     sumSize += (*itemArray)[i].Size();
   292                     }
   292                     }
   293                 HBufC8* buf8 = HBufC8::NewLC( sizeof(TInt) // For active index
   293                 HBufC8* buf8 = HBufC8::NewLC( sizeof(TInt) // For active index
   294                                              + sizeof(TInt) // For the count of item array
   294                                              + sizeof(TInt) // For the count of item array
       
   295                                              + sizeof(TInt) // for langcode
   295                                              + sizeof(TInt)*( itemArray->Count() ) // For the size of each item
   296                                              + sizeof(TInt)*( itemArray->Count() ) // For the size of each item
   296                                              + sumSize// For all of char data 
   297                                              + sumSize// For all of char data 
   297                                              );
   298                                              );
   298                 TPtr8 buf8Ptr = buf8->Des();
   299                 TPtr8 buf8Ptr = buf8->Des();
   299                 RDesWriteStream writeStream;
   300                 RDesWriteStream writeStream;
   300                 CleanupClosePushL(writeStream);                
   301                 CleanupClosePushL(writeStream);                
   301                 writeStream.Open( buf8Ptr );                
   302                 writeStream.Open( buf8Ptr );                
   302                 writeStream.WriteInt32L( candidatelist->iActiveIndex );
   303                 writeStream.WriteInt32L( candidatelist->iActiveIndex );
   303                 writeStream.WriteInt32L( itemArray->Count() );                
   304                 writeStream.WriteInt32L( itemArray->Count() ); 
       
   305                 writeStream.WriteInt32L(candidatelist->iLangCode);
       
   306                 
   304                 for ( TInt i = 0; i < itemArray->Count(); i++  )
   307                 for ( TInt i = 0; i < itemArray->Count(); i++  )
   305                     {
   308                     {
   306                     writeStream.WriteInt32L( (*itemArray)[i].Size() );
   309                     writeStream.WriteInt32L( (*itemArray)[i].Size() );
   307                     writeStream.WriteL( (*itemArray)[i].Ptr(), (*itemArray)[i].Length() );
   310                     writeStream.WriteL( (*itemArray)[i].Ptr(), (*itemArray)[i].Length() );
   308                     }
   311                     }