menufw/hierarchynavigator/hnutilities/src/hnliwutils.cpp
branchRCL_3
changeset 47 7be2816dbabd
parent 0 f72a12da539e
equal deleted inserted replaced
38:79311d856354 47:7be2816dbabd
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include <mmf/common/mmfcontrollerpluginresolver.h>
    19 #include <mmf/common/mmfcontrollerpluginresolver.h>
    26 
    26 
    27 
    27 
    28 // ======== MEMBER FUNCTIONS ========
    28 // ======== MEMBER FUNCTIONS ========
    29 
    29 
    30 // ---------------------------------------------------------------------------
    30 // ---------------------------------------------------------------------------
    31 // 
    31 //
    32 // ---------------------------------------------------------------------------
    32 // ---------------------------------------------------------------------------
    33 //      
    33 //
    34 EXPORT_C void HnLiwUtils::SetGenericParamListL(
    34 EXPORT_C void HnLiwUtils::SetGenericParamListL(
    35     const RPointerArray<CHnMdBaseKey> & aKeys,
    35     const RPointerArray<CHnMdBaseKey> & aKeys,
    36     CLiwGenericParamList & aInParam )
    36     CLiwGenericParamList & aInParam )
    37     {
    37     {
    38     // for each key
    38     // for each key
    41         CHnMdBaseKey* key = aKeys[i];
    41         CHnMdBaseKey* key = aKeys[i];
    42         const TDesC8& keyName = key->KeyName();
    42         const TDesC8& keyName = key->KeyName();
    43         TLiwVariant value;
    43         TLiwVariant value;
    44         value.PushL();
    44         value.PushL();
    45         key->ToVariantL( value );
    45         key->ToVariantL( value );
    46         aInParam.AppendL( TLiwGenericParam( keyName, value ) );      
    46         aInParam.AppendL( TLiwGenericParam( keyName, value ) );
    47         CleanupStack::PopAndDestroy( &value );
    47         CleanupStack::PopAndDestroy( &value );
    48         }
    48         }
    49     }
    49     }
    50 
    50 
    51 // ---------------------------------------------------------------------------
    51 // ---------------------------------------------------------------------------
    52 // 
    52 //
    53 // ---------------------------------------------------------------------------
    53 // ---------------------------------------------------------------------------
    54 //
    54 //
    55 EXPORT_C TBool HnLiwUtils::VariantToStringL(
    55 EXPORT_C TBool HnLiwUtils::VariantToStringL(
    56         TLiwVariant& aVariant,
    56         TLiwVariant& aVariant,
    57         RBuf& aBuf )
    57         RBuf& aBuf )
   111         }
   111         }
   112     return accepted;
   112     return accepted;
   113     }
   113     }
   114 
   114 
   115 // ---------------------------------------------------------------------------
   115 // ---------------------------------------------------------------------------
   116 // 
   116 //
   117 // ---------------------------------------------------------------------------
   117 // ---------------------------------------------------------------------------
   118 //
   118 //
   119 EXPORT_C TBool HnLiwUtils::VariantToStringL(
   119 EXPORT_C TBool HnLiwUtils::VariantToStringL(
   120         TLiwVariant& aVariant,
   120         TLiwVariant& aVariant,
   121         RBuf8& aBuf )
   121         RBuf8& aBuf )
   170         }
   170         }
   171     return accepted;
   171     return accepted;
   172     }
   172     }
   173 
   173 
   174 // ---------------------------------------------------------------------------
   174 // ---------------------------------------------------------------------------
   175 // 
   175 //
   176 // ---------------------------------------------------------------------------
   176 // ---------------------------------------------------------------------------
   177 //
   177 //
   178 EXPORT_C TInt HnLiwUtils::GetIterableItemCountL( CLiwIterable& aIterable )
   178 EXPORT_C TInt HnLiwUtils::GetIterableItemCountL( CLiwIterable& aIterable )
   179     {
   179     {
   180     TInt count = 0;
   180     TInt count = 0;
   188     CleanupStack::PopAndDestroy( &variant );
   188     CleanupStack::PopAndDestroy( &variant );
   189     return count;
   189     return count;
   190     }
   190     }
   191 
   191 
   192 // ---------------------------------------------------------------------------
   192 // ---------------------------------------------------------------------------
   193 // 
   193 //
   194 // ---------------------------------------------------------------------------
   194 // ---------------------------------------------------------------------------
   195 //
   195 //
   196 EXPORT_C TInt HnLiwUtils::GetStringL(
   196 EXPORT_C TInt HnLiwUtils::GetStringL(
   197     const CLiwGenericParamList& aParam,
   197     const CLiwGenericParamList& aParam,
   198     const TDesC8& aPath,
   198     const TDesC8& aPath,
   199     RBuf& aRet )
   199     RBuf& aRet )
   200     {
   200     {
   201     TInt ret( KErrNone );
   201     TInt ret( KErrNone );
   202     TLiwVariant value;
   202     TLiwVariant value;
   203     value.PushL();
   203     value.PushL();
   204     
   204 
   205     ret = GetVariantL( aParam, aPath, value );
   205     ret = GetVariantL( aParam, aPath, value );
   206     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
   206     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
   207         {
   207         {
   208         ret = KErrBadDescriptor;
   208         ret = KErrBadDescriptor;
   209         }
   209         }
   210     
   210 
   211     CleanupStack::PopAndDestroy( &value );
   211     CleanupStack::PopAndDestroy( &value );
   212     return ret;
   212     return ret;
   213     }
   213     }
   214 
   214 
   215 // ---------------------------------------------------------------------------
   215 // ---------------------------------------------------------------------------
   216 // 
   216 //
   217 // ---------------------------------------------------------------------------
   217 // ---------------------------------------------------------------------------
   218 //
   218 //
   219 EXPORT_C TInt HnLiwUtils::GetStringL(
   219 EXPORT_C TInt HnLiwUtils::GetStringL(
   220     const CLiwGenericParamList& aParam,
   220     const CLiwGenericParamList& aParam,
   221     const TDesC8& aPath,
   221     const TDesC8& aPath,
   222     RBuf8& aRet )
   222     RBuf8& aRet )
   223     {
   223     {
   224     TInt ret( KErrNone );
   224     TInt ret( KErrNone );
   225     TLiwVariant value;
   225     TLiwVariant value;
   226     value.PushL();
   226     value.PushL();
   227     
   227 
   228     ret = GetVariantL( aParam, aPath, value );
   228     ret = GetVariantL( aParam, aPath, value );
   229     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
   229     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
   230         {
   230         {
   231         ret = KErrBadDescriptor;
   231         ret = KErrBadDescriptor;
   232         }
   232         }
   233     
   233 
   234     CleanupStack::PopAndDestroy( &value );
   234     CleanupStack::PopAndDestroy( &value );
   235     return ret;
   235     return ret;
   236     }
   236     }
   237 
   237 
   238 // ---------------------------------------------------------------------------
   238 // ---------------------------------------------------------------------------
   239 // 
   239 //
   240 // ---------------------------------------------------------------------------
   240 // ---------------------------------------------------------------------------
   241 //
   241 //
   242 EXPORT_C TInt HnLiwUtils::GetStringL( const CLiwGenericParamList& aParam,
   242 EXPORT_C TInt HnLiwUtils::GetStringL( const CLiwGenericParamList& aParam,
   243     const TDesC8& aPath, TInt aPos, RBuf& aRet )
   243     const TDesC8& aPath, TInt aPos, RBuf& aRet )
   244     {
   244     {
   245     TInt ret( KErrNone );
   245     TInt ret( KErrNone );
   246     TLiwVariant value;
   246     TLiwVariant value;
   247     value.PushL();
   247     value.PushL();
   248     
   248 
   249     ret = GetVariantL( aParam, aPath, aPos, value );
   249     ret = GetVariantL( aParam, aPath, aPos, value );
   250     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
   250     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
   251         {
   251         {
   252         ret = KErrBadDescriptor;
   252         ret = KErrBadDescriptor;
   253         }
   253         }
   254     
   254 
   255     CleanupStack::PopAndDestroy( &value );
   255     CleanupStack::PopAndDestroy( &value );
   256     return ret;
   256     return ret;
   257     }
   257     }
   258 
   258 
   259 // ---------------------------------------------------------------------------
   259 // ---------------------------------------------------------------------------
   260 // 
   260 //
   261 // ---------------------------------------------------------------------------
   261 // ---------------------------------------------------------------------------
   262 //
   262 //
   263 EXPORT_C TInt HnLiwUtils::GetStringL( const CLiwGenericParamList& aParam,
   263 EXPORT_C TInt HnLiwUtils::GetStringL( const CLiwGenericParamList& aParam,
   264     const TDesC8& aPath, TInt aPos, RBuf8& aRet )
   264     const TDesC8& aPath, TInt aPos, RBuf8& aRet )
   265     {
   265     {
   266     TInt ret( KErrNone );
   266     TInt ret( KErrNone );
   267     TLiwVariant value;
   267     TLiwVariant value;
   268     value.PushL();
   268     value.PushL();
   269     
   269 
   270     ret = GetVariantL( aParam, aPath, aPos, value );
   270     ret = GetVariantL( aParam, aPath, aPos, value );
   271     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
   271     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
   272         {
   272         {
   273         ret = KErrBadDescriptor;
   273         ret = KErrBadDescriptor;
   274         }
   274         }
   275     
   275 
   276     CleanupStack::PopAndDestroy( &value );
   276     CleanupStack::PopAndDestroy( &value );
   277     return ret;
   277     return ret;
   278     }
   278     }
   279 
   279 
   280 // ---------------------------------------------------------------------------
   280 // ---------------------------------------------------------------------------
   281 // 
   281 //
   282 // ---------------------------------------------------------------------------
   282 // ---------------------------------------------------------------------------
   283 //
   283 //
   284 EXPORT_C TInt HnLiwUtils::GetInt64L( const CLiwGenericParamList& aParam,
   284 EXPORT_C TInt HnLiwUtils::GetInt64L( const CLiwGenericParamList& aParam,
   285     const TDesC8& aPath, TInt aPos, TInt64& aRet )
   285     const TDesC8& aPath, TInt aPos, TInt64& aRet )
   286     { 
   286     {
   287     RBuf8 buf;
   287     RBuf8 buf;
   288     TInt err = HnLiwUtils::GetStringL( aParam, aPath, aPos, buf );
   288     TInt err = HnLiwUtils::GetStringL( aParam, aPath, aPos, buf );
   289     
   289 
   290     if ( KErrNone == err )
   290     if ( KErrNone == err )
   291     	{
   291       {
   292         TInt64 value( KErrNotFound );
   292         TInt64 value( KErrNotFound );
   293         TLex8 lex( buf );
   293         TLex8 lex( buf );
   294 
   294 
   295     	if ( KErrNone == lex.Val( value ) )
   295       if ( KErrNone == lex.Val( value ) )
   296     		{
   296         {
   297     		aRet = value;
   297         aRet = value;
   298     		err = KErrNone;
   298         err = KErrNone;
   299     		}
   299         }
   300     	}
   300       }
   301     
   301 
   302     buf.Close();
   302     buf.Close();
   303     
   303 
   304     return err;    
   304     return err;
   305     }
   305     }
   306 
   306 
   307 // ---------------------------------------------------------------------------
   307 // ---------------------------------------------------------------------------
   308 // 
   308 //
   309 // ---------------------------------------------------------------------------
   309 // ---------------------------------------------------------------------------
   310 //
   310 //
   311 EXPORT_C TInt HnLiwUtils::GetVariantL(
   311 EXPORT_C TInt HnLiwUtils::GetVariantL(
   312     const CLiwGenericParamList& aParam,
   312     const CLiwGenericParamList& aParam,
   313     const TDesC8& aPath,
   313     const TDesC8& aPath,
   328         if ( KErrNotFound != colonFound )
   328         if ( KErrNotFound != colonFound )
   329             {
   329             {
   330             /*TInt pos( 0 );
   330             /*TInt pos( 0 );
   331             TInt rest( aPos );
   331             TInt rest( aPos );
   332             while ( ( rest = rest / 10 ) != 0 )
   332             while ( ( rest = rest / 10 ) != 0 )
   333                 { 
   333                 {
   334                 pos++;
   334                 pos++;
   335                 }*/
   335                 }*/
   336             
   336 
   337             path.SetLength( colonFound ); 
   337             path.SetLength( colonFound );
   338             TLiwVariant tempVariant;
   338             TLiwVariant tempVariant;
   339             tempVariant.PushL();
   339             tempVariant.PushL();
   340             if ( KErrNotFound != HnLiwUtils::GetVariantL( aParam, path, aRet ) )
   340             if ( KErrNotFound != HnLiwUtils::GetVariantL( aParam, path, aRet ) )
   341                 {
   341                 {
   342                 ret = KErrHidden;
   342                 ret = KErrHidden;
   351     CleanupStack::PopAndDestroy( &path );
   351     CleanupStack::PopAndDestroy( &path );
   352     return ret;
   352     return ret;
   353     }
   353     }
   354 
   354 
   355 // ---------------------------------------------------------------------------
   355 // ---------------------------------------------------------------------------
   356 // 
   356 //
   357 // ---------------------------------------------------------------------------
   357 // ---------------------------------------------------------------------------
   358 //
   358 //
   359 TInt HnLiwUtils::ExtractNameSpaceL(
   359 TInt HnLiwUtils::ExtractNameSpaceL(
   360     const CLiwGenericParamList& aParam, 
   360     const CLiwGenericParamList& aParam,
   361     const TDesC8& aNameSpace,
   361     const TDesC8& aNameSpace,
   362     TLiwVariant& aRet )
   362     TLiwVariant& aRet )
   363     {
   363     {
   364         TInt pos( 0 );
   364         TInt pos( 0 );
   365         const TLiwGenericParam* param;
   365         const TLiwGenericParam* param;
   366         
   366 
   367         if ( &aParam != NULL )
   367         if ( &aParam != NULL )
   368 	    	{
   368         {
   369 	    	param = aParam.FindFirst( pos, aNameSpace );
   369         param = aParam.FindFirst( pos, aNameSpace );
   370 	        if ( pos >= 0 )
   370           if ( pos >= 0 )
   371 		        {
   371             {
   372 		        aRet.SetL( param->Value() );
   372             aRet.SetL( param->Value() );
   373 		        }
   373             }
   374 	    	}
   374         }
   375         else
   375         else
   376         	{
   376           {
   377         	pos = KErrNotFound;
   377           pos = KErrNotFound;
   378         	}
   378           }
   379         
   379 
   380         return pos;
   380         return pos;
   381     }
   381     }
   382 
   382 
   383 
   383 
   384 // ---------------------------------------------------------------------------
   384 // ---------------------------------------------------------------------------
   385 // 
   385 //
   386 // ---------------------------------------------------------------------------
   386 // ---------------------------------------------------------------------------
   387 //
   387 //
   388 EXPORT_C TInt HnLiwUtils::GetVariantL(
   388 EXPORT_C TInt HnLiwUtils::GetVariantL(
   389     const CLiwGenericParamList& aParam,
   389     const CLiwGenericParamList& aParam,
   390     const TDesC8& aPath,
   390     const TDesC8& aPath,
   395     TInt ret( KErrNone );
   395     TInt ret( KErrNone );
   396     TLiwVariant variant;
   396     TLiwVariant variant;
   397     TLiwVariant lastVariant;
   397     TLiwVariant lastVariant;
   398     variant.PushL();
   398     variant.PushL();
   399     lastVariant.PushL();
   399     lastVariant.PushL();
   400     
   400 
   401     aRet.SetL( TLiwVariant( aPath ) );
   401     aRet.SetL( TLiwVariant( aPath ) );
   402     
   402 
   403     ParsePathL( aPath, path );
   403     ParsePathL( aPath, path );
   404 
   404 
   405     if ( path.Count() > 0
   405     if ( path.Count() > 0
   406         && ExtractNameSpaceL( aParam, path[0], lastVariant ) != KErrNotFound )
   406         && ExtractNameSpaceL( aParam, path[0], lastVariant ) != KErrNotFound )
   407         {
   407         {
   409         for ( TInt i( 1 ); i < path.Count() && found; i++ )
   409         for ( TInt i( 1 ); i < path.Count() && found; i++ )
   410             {
   410             {
   411             TPtrC8 name = path[ i ];
   411             TPtrC8 name = path[ i ];
   412             LIW::TVariantTypeId typeId = lastVariant.TypeId();
   412             LIW::TVariantTypeId typeId = lastVariant.TypeId();
   413             // LIW::Type ID 7
   413             // LIW::Type ID 7
   414             if ( typeId == LIW::EVariantTypeList ) 
   414             if ( typeId == LIW::EVariantTypeList )
   415                 {
   415                 {
   416                 TInt pos( GetPosition( name ) );
   416                 TInt pos( GetPosition( name ) );
   417                 found = (pos != KErrNotFound) ? lastVariant.AsList()->AtL( pos, variant ) : EFalse;
   417                 found = (pos != KErrNotFound) ? lastVariant.AsList()->AtL( pos, variant ) : EFalse;
   418                 }
   418                 }
   419             // LIW::Type ID 8
   419             // LIW::Type ID 8
   420             else if ( typeId == LIW::EVariantTypeMap ) 
   420             else if ( typeId == LIW::EVariantTypeMap )
   421                 {
   421                 {
   422                 found = lastVariant.AsMap()->FindL( name, variant );
   422                 found = lastVariant.AsMap()->FindL( name, variant );
   423                 }
   423                 }
   424             // LIW::Type ID 9
   424             // LIW::Type ID 9
   425             else if ( typeId == LIW::EVariantTypeIterable ) 
   425             else if ( typeId == LIW::EVariantTypeIterable )
   426                 {
   426                 {
   427                 TInt pos( GetPosition( name ) );
   427                 TInt pos( GetPosition( name ) );
   428                 found = GetIterableByPositionL( *lastVariant.AsIterable(), pos, variant );
   428                 found = GetIterableByPositionL( *lastVariant.AsIterable(), pos, variant );
   429                 }
   429                 }
   430             lastVariant.SetL( variant ); 
   430             lastVariant.SetL( variant );
   431             }
   431             }
   432         ret = found ? KErrNone : KErrNotFound;
   432         ret = found ? KErrNone : KErrNotFound;
   433         //aRet.SetL( ( ret != KErrNotFound ) ? variant : TLiwVariant( aPath ) );
   433         //aRet.SetL( ( ret != KErrNotFound ) ? variant : TLiwVariant( aPath ) );
   434         if ( found == 0 )
   434         if ( found == 0 )
   435         	{
   435           {
   436         	aRet.SetL( TLiwVariant( KNullDesC8 ) );
   436           aRet.SetL( TLiwVariant( KNullDesC8 ) );
   437         	}
   437           }
   438         else
   438         else
   439         	{
   439           {
   440         	aRet.SetL( variant );
   440           aRet.SetL( variant );
   441         	}
   441           }
   442         }
   442         }
   443 
   443 
   444     CleanupStack::PopAndDestroy( &lastVariant );
   444     CleanupStack::PopAndDestroy( &lastVariant );
   445     CleanupStack::PopAndDestroy( &variant );
   445     CleanupStack::PopAndDestroy( &variant );
   446     CleanupStack::PopAndDestroy( &path );
   446     CleanupStack::PopAndDestroy( &path );
   447     return ret;
   447     return ret;
   448     }
   448     }
   449 
   449 
   450 // ---------------------------------------------------------------------------
   450 // ---------------------------------------------------------------------------
   451 // 
   451 //
   452 // ---------------------------------------------------------------------------
   452 // ---------------------------------------------------------------------------
   453 //
   453 //
   454 void HnLiwUtils::ParsePathL(
   454 void HnLiwUtils::ParsePathL(
   455     const TDesC8& aPath, 
   455     const TDesC8& aPath,
   456     RArray< TPtrC8 >& aPathParts )
   456     RArray< TPtrC8 >& aPathParts )
   457     {
   457     {
   458     TChar ch; // token separator
   458     TChar ch; // token separator
   459 
       
   460     TInt colonPos = aPath.Find( KColon8 );
   459     TInt colonPos = aPath.Find( KColon8 );
   461 
   460 
   462     if ( colonPos > 0 )
   461     if ( colonPos > 0 )
   463         {
   462         {
   464         TLex8 lex( aPath );
   463         TLex8 lex( aPath );
   493             }
   492             }
   494         }
   493         }
   495     }
   494     }
   496 
   495 
   497 // ---------------------------------------------------------------------------
   496 // ---------------------------------------------------------------------------
   498 // 
   497 //
   499 // ---------------------------------------------------------------------------
   498 // ---------------------------------------------------------------------------
   500 //
   499 //
   501 TBool HnLiwUtils::GetIterableByPositionL( CLiwIterable & aIterable, TInt pos, 
   500 TBool HnLiwUtils::GetIterableByPositionL( CLiwIterable & aIterable, TInt pos,
   502                                           TLiwVariant & aVariant )
   501                                           TLiwVariant & aVariant )
   503 	{
   502   {
   504     TBool ret(EFalse);
   503     TBool ret(EFalse);
   505     if ( pos >= 0 )
   504     if ( pos >= 0 )
   506         {
   505         {
   507         TInt counter = 0;
   506         TInt counter = 0;
   508         aIterable.Reset();
   507         aIterable.Reset();
   509         ret = aIterable.NextL( aVariant );
   508         ret = aIterable.NextL( aVariant );
   510         while ( ret )
   509         while ( ret )
   511         	{
   510           {
   512         	if (counter == pos)
   511           if (counter == pos)
   513         		{
   512             {
   514         		break;
   513             break;
   515         		}
   514             }
   516         	counter++;
   515           counter++;
   517         	ret = aIterable.NextL( aVariant );
   516           ret = aIterable.NextL( aVariant );
   518         	}
   517           }
   519         }
   518         }
   520     return ret;   
   519     return ret;
   521     }
   520     }
   522 
   521 
   523 // ---------------------------------------------------------------------------
   522 // ---------------------------------------------------------------------------
   524 // 
   523 //
   525 // ---------------------------------------------------------------------------
   524 // ---------------------------------------------------------------------------
   526 //
   525 //
   527 TInt HnLiwUtils::GetPosition( const TDesC8& aPosition )
   526 TInt HnLiwUtils::GetPosition( const TDesC8& aPosition )
   528     {
   527     {
   529     TInt ret( KErrNotFound );
   528     TInt ret( KErrNotFound );
   541         }
   540         }
   542     return ret;
   541     return ret;
   543     }
   542     }
   544 
   543 
   545 // ---------------------------------------------------------------------------
   544 // ---------------------------------------------------------------------------
   546 // 
   545 //
   547 // ---------------------------------------------------------------------------
   546 // ---------------------------------------------------------------------------
   548 //
   547 //
   549 TInt HnLiwUtils::ReplaceIndexL( RBuf8& aPath8, TInt aPos )
   548 TInt HnLiwUtils::ReplaceIndexL( RBuf8& aPath8, TInt aPos )
   550     {
   549     {
   551     TInt ret(KErrNotFound);
   550     TInt ret(KErrNotFound);
   562         {
   561         {
   563         RBuf8 indexNum;
   562         RBuf8 indexNum;
   564         CleanupClosePushL( indexNum );
   563         CleanupClosePushL( indexNum );
   565         indexNum.CreateL( KMaxLength );
   564         indexNum.CreateL( KMaxLength );
   566         indexNum.AppendNum( aPos );
   565         indexNum.AppendNum( aPos );
   567     
   566 
   568         TInt indexPos = ret = aPath8.Find( KIndex8 );
   567         TInt indexPos = ret = aPath8.Find( KIndex8 );
   569         TInt indexLength = KIndex().Length();
   568         TInt indexLength = KIndex().Length();
   570     
   569 
   571         aPath8.Replace( indexPos, indexLength, indexNum );
   570         aPath8.Replace( indexPos, indexLength, indexNum );
   572         ret += indexNum.Length();
   571         ret += indexNum.Length();
   573         
   572 
   574         CleanupStack::PopAndDestroy( &indexNum );
   573         CleanupStack::PopAndDestroy( &indexNum );
   575         }
   574         }
   576     
   575 
   577     return ret;
   576     return ret;
   578     }
   577     }
   579 
   578