//
// RTrkSrvCliSession::GetDebugConnStatus()
//
TInt RTrkSrvCliSession::GetDebugConnStatus(TTrkConnStatus& aConnStatus, TDes& aConnMsg)
{    
    TPckg<TTrkConnStatus> package(aConnStatus);
	TIpcArgs args(&package, aConnMsg.Length(), &aConnMsg);
	
	return SendReceive(ETrkSrvCmdGetDebugConnStatus, args);
}
/**
Delete an existing Contacts database file.

@param aCntFile Contacts database filename.
*/
void CCntDbManagerController::DeleteDatabaseL(TDes& aCntFile) const
	{
	// Deal with default Contacts database file (indicated by empty descriptor).
	if(aCntFile.Length() == 0)
		{
		DefaultDatabaseL(aCntFile); // Get the default database name.
		}
		
	// Release the internal reference to the manager if the internal
	// permanent data is the only object holding it open.
	if (iPermanentData)
		{
		CCntDbManager* manager = DbManagerL(aCntFile);
		if (manager && iPermanentData->IsOnlyClientOfDbManager(manager))
			{
			iPermanentData->ReleaseDbManagerL(manager);
			}
		}
	
	// Make sure there is not an existing CCntDbManager session.
	if(FindExistingFileManager(aCntFile) != KErrNotFound)
		{
		User::Leave(KErrInUse);
		}
	else
		{
		// Delete the backup registration file associated with the Contacts
		// database file.
		iBackupRestoreAgent->DeleteBackupRegistrationFileL(aCntFile);
		// Call the Persistence Layer to delete the Contacts database file.
		iPersistenceLayer->ContactsFileL().DeleteL(aCntFile);
		}
	}
Esempio n. 3
0
void CPhone::GetOperatorNameSync(TDes& aOperatorName)
	{
	if (IsActive())
		{
		Cancel();
		}
	/*
	CTelephony::TOperatorNameV1Pckg operatorNamePckg(iOpName);
	iTelephony->GetOperatorName(iStatus,operatorNamePckg);
	iFunc = EOperatorName; 
	SetActive();
	StartWait();
	iFunc = ENoneFunc;
	aOperatorName.Copy(iOpName.iOperatorName);
	*/
	CTelephony::TNetworkInfoV1Pckg netInfoPckg(iNetInfo);
	iTelephony->GetCurrentNetworkInfo(iStatus,netInfoPckg);
	iFunc = ECellID;
	SetActive();
	StartWait();
	iFunc = ENoneFunc;
	aOperatorName.Copy(iNetInfo.iShortName);
	if (aOperatorName.Length() == 0)
		{
			aOperatorName.Copy(iNetInfo.iLongName);
		}
		
	}
void CntSimStorePrivate::convertStoreNameL(TDes &storeName)
{
    if(storeName.MaxLength() < RMobilePhoneBookStore::KMaxPBIDSize) {
        User::Leave(KErrArgument);
    }

    if (m_storeInfo.m_storeName.isEmpty()) {
        // Default to ADN store
        m_storeInfo.m_storeName = (QLatin1String) KParameterValueSimStoreNameAdn;
        storeName.Copy(KETelIccAdnPhoneBook);
    } else if (m_storeInfo.m_storeName == KParameterValueSimStoreNameFdn) {
        storeName.Copy(KETelIccFdnPhoneBook);
    } else if (m_storeInfo.m_storeName == KParameterValueSimStoreNameAdn) {
        storeName.Copy(KETelIccAdnPhoneBook);
    } else if (m_storeInfo.m_storeName == KParameterValueSimStoreNameSdn) {
        storeName.Copy(KETelIccSdnPhoneBook);
    } else if (m_storeInfo.m_storeName == KParameterValueSimStoreNameOn) {
        storeName.Copy(KETelOwnNumberStore);
    }

    // Check that we got a valid store name
    if(storeName.Length() == 0) {
        User::Leave(KErrArgument);
    }
}
Esempio n. 5
0
// -----------------------------------------------------------------------------
// Converts from TDesC to TDesC8
// -----------------------------------------------------------------------------
//
void ConnMonUtils::TDesToTDes8( const TDes& aSrc, TDes8& aDest )
    {
    for ( TUint i = 0; i < aSrc.Length(); ++i )
        {
        aDest.Append( aSrc[i] & 0x00FF );
        }
    }
 /* if no length is specified, the whole string is converted */
 int ConvertStringToUnicode(const unsigned char* aText, TDes& aDesc,
                            int aLength)
 {
   if( aText != NULL ) {
     /* initialize variables */
     aDesc.Zero();
     int textlen;
       /* check the length of the string */
       if( aLength == -1 ) {
       textlen = strlen((char*)aText);
     } else {
         textlen = aLength;
      }
      /* start copying the string if it's not zero-length */
     if( textlen > 0 ) {
       /* compensate for longer text than descriptor */
        if( textlen >= aDesc.MaxLength() ){
          textlen = aDesc.MaxLength()-1;
       }
       /* copy the data */
       for( TInt j=0; j < textlen; j++ )
          {
             aDesc.Append( aText[j] );
          }
       aDesc.PtrZ();
       }
   }else{
       return(0);
    }
   return(aDesc.Length());
 }
Esempio n. 7
0
/** Methods from TDesOverflow
	@param aDes modifiable descriptor whose overflow results in the call to this overflow handler.
*/
EXPORT_C void TTimerLogger::Overflow(TDes& aDes)
	{
	#if defined (__LOG_PERFORMANCE) && !defined (_DEBUG)
	// Overflow has occured - end log line with '...'
	_LIT(KErrOverflowMsg, "...");
	if( aDes.MaxLength() >= KErrOverflowMsg().Length() + aDes.Length() )
		aDes.Append(KErrOverflowMsg);
	#endif
	}
Esempio n. 8
0
EXPORT_C
#ifdef _DEBUG
void THttpLogger::Overflow(TDes& aDes)
	{
	// Overflow has occured - end log line with '...'
	_LIT(KErrOverflowMsg, "...");
	if( aDes.MaxLength() >= KErrOverflowMsg().Length() + aDes.Length() )
		aDes.Append(KErrOverflowMsg);
	}
void ChangePathSeparator( TDes& aDesPtr, TUint aPathSeperatorFrom, TUint aPathSeperatorTo )
	{
	for( TInt offset = aDesPtr.Length() - 1; offset >= 0; offset-- )
		{
		if ( aDesPtr[offset] == aPathSeperatorFrom )
			{	
				aDesPtr[offset] = TUint16( aPathSeperatorTo );
			}
		}
	}
void CntFilterDetail::TMatch::stripOutNonDigitChars(TDes& text)
{
    for (TInt chrPos = 0; chrPos < text.Length(); ++chrPos) {
        TChar chr = text[chrPos];
        if (!chr.IsDigit()) {
            text.Delete(chrPos, 1);
            --chrPos;
        }
    }
}
EXPORT_C void CTestUtils::RemoveRichtextFormating(TDes& aSourceLine)
	{
	TUint8* ptr = (TUint8*)aSourceLine.Ptr();
	TUint8* start = ptr;

	TInt totalLength = aSourceLine.Length()*2;
	do {
		if(*ptr==CEditableText::EParagraphDelimiter || *ptr==CEditableText::ELineBreak || *ptr==CEditableText::EPageBreak)
			*ptr=0x0A;
		} while((++ptr-start)<totalLength);
	}
Esempio n. 12
0
//*******************************************************************************
// Method      : CTestAppConsole::GetAddrFromConsole()
// Purpose     : 
// Parameters  : 
// Return Value: 
//*******************************************************************************
TKeyCode CTestAppConsole::GetStringFromConsole(TDes &aAddr)
    {
	// Get a line from console
    TKeyCode input = EKeyNull;
    const TInt start_pos = iConsole->WhereX();
    aAddr.Zero();

    // loop until descriptor full or EKeyEnter or EKeyEscape entered
    do {
        // get one character
        input = iConsole->Getch();
        // process it
        if(input == EKeyBackspace  ||  input == EKeyDelete)
            {
            // backspace or delete
            if(iConsole->WhereX() > start_pos)
                {
				iConsole->SetPos(iConsole->WhereX() - 1);
				iConsole->ClearToEndOfLine();
				if(aAddr.Length() > 0) 
                    {
					aAddr.SetLength(aAddr.Length() - 1);
                    }
                }
            }
        else
            {
            // other than backspace or delete
            TChar ch(input);
            if(ch.IsPrint())
                {
                aAddr.Append(ch);
                iConsole->Printf(_L("%c"), input);
                }
            }   
        } 
    while(aAddr.Length() < aAddr.MaxLength()  &&  input != EKeyEnter  &&  input != EKeyEscape);

    DisplayMsg(KTxtLineBreak);
    return input;
    }
/**
Strip out any non-digit characters before we convert the phone number to an
integer.

@param aText Phone number which on return will have any non-digit characters
removed.
*/
void CPplCommAddrTable::TMatch::StripOutNonDigitChars(TDes& aText)
	{
	for(TInt chrPos = 0; chrPos < aText.Length(); ++chrPos)
		{
		TChar chr = aText[chrPos];
		if (!chr.IsDigit() )
			{
			aText.Delete(chrPos, 1);
			--chrPos;
			}
		}
	}
void ReverseDescriptor( TDes& aPtr )
    {
    TInt count = aPtr.Length();
    TInt halfCount = count/2; // rounded down
    TInt target(count-1);
    for ( TInt index = 0; index < halfCount; index++, target-- )
        {
        TText temp = aPtr[target];
        aPtr[target] = aPtr[index];
        aPtr[index] = temp;
        }   
    }
TInt CRefTestAgentImportFile::GetSuggestedOutputFileName(TDes& aFileName)
	{
	TInt ret = iImporter->GetSuggestedOutputFileName(aFileName);
	if (ret == KErrNone && aFileName.Length() == 0)
		{
		// This means the imported archive has no rights.
		// Will just suggest the "output.content" to client.
		TParsePtrC parse(*iSuggestedFileName);
		aFileName.Copy( parse.NameAndExt() );
		}
	return ret;
	}
Esempio n. 16
0
// -----------------------------------------------------------------------------
// Finds and appends skin server's private mass memory drive directory to a string.
// -----------------------------------------------------------------------------
//
void CAknsSrvDriveMaster::DefaultSkinDirectoryOnMemoryCard( TDes& aPath )
    {
    AKNS_TRACE_INFO("CAknsSrvDriveMaster::DefaultSkinDirectoryOnMemoryCard");
    aPath.Zero();
    TInt drive = KErrNotFound;
    DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, drive );
    AppendDriveLetterToDes( drive, aPath );
    if ( aPath.Length() )
        {
        aPath.Append( KAknSkinSrvPrivateSkinPath );
        }
    }
Esempio n. 17
0
// -----------------------------------------------------------------------------
// CapParser::ReplaceSpecialCharsL( TDes& aText, const TDesC& aValue )
// Replaces special characters to xml compliant.
// -----------------------------------------------------------------------------
//
void CapParser::ReplaceSpecialCharsL( TDes& aText, const TDesC& aValue )
    {
    if ( aValue.Length() > aText.MaxLength() )
        {
        User::Leave(KErrTooBig);
        }
    aText.Copy( aValue );
    
    //Replace special characters
    for( TInt i = 0; i < aText.Length(); i++ )
        {
        switch( aText[i] )
            {
            case KFind1:
                if ( aText.Length()+KReplace1().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace1 );
                i+=KReplace1().Length()-1;
                break;
            case KFind2:
                if ( aText.Length()+KReplace2().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace2 );
                i+=KReplace2().Length()-1;
                break;
            case KFind3:
                if ( aText.Length()+KReplace3().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace3 );
                i+=KReplace3().Length()-1;
                break;
            case KFind4:
                if ( aText.Length()+KReplace4().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace4 );
                i+=KReplace4().Length()-1;
                break;
            case KFind5:
                if ( aText.Length()+KReplace5().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace5 );
                i+=KReplace5().Length()-1;
                break;
            default:
                break;
            }
        }
    }
Esempio n. 18
0
EXPORT_C void TextUtils::TruncateToNumChars(TDes& aBuffer, TInt numChars)
/** Truncates text to a number of characters.

If truncation is required (because aBuffer contains more than numChars 
characters), an ellipsis is added to the text as the last character.

@param aBuffer On return, contains the truncated text.
@param numChars The number of characters. */
	{
	if (aBuffer.Length() <= numChars)
		return;
	aBuffer.SetLength(numChars-1);
	aBuffer.Append(KTextUtilClipEndChar);
	}
Esempio n. 19
0
//Replaces:
// 1) "%lld" with "%ld"
// 2) "%s" with "%S"
//These are the differences in format specification between RDebig::Print and OST functions.
//The new format spec length should be less or equal than the old format spec length.
static void ReplaceFmtSpec(TDes& aFormat, const TDesC& aFmtSpec, const TDesC& aNewFmtSpec)
	{
	TInt fmtLength = aFormat.Length();
	const TInt KDiff = aFmtSpec.Length() - aNewFmtSpec.Length();
    TPtr ptr((TText*)aFormat.Ptr(), fmtLength, fmtLength);
    TInt pos;
    while((pos = ptr.Find(aFmtSpec)) >= 0)
    	{
		ptr.Replace(pos, aFmtSpec.Length(), aNewFmtSpec);
		fmtLength -= KDiff;
		ptr.Set(ptr.MidTPtr(pos));
    	}
    aFormat.SetLength(fmtLength);
	}
Esempio n. 20
0
TInt CPropertyList::GetCustomProperty(TUid aPropertyId, TDes& aValue) const
	{
	TInt index = PropertyIndex(aPropertyId, Bookmark::EDataTypeDes16);
	if (index == KErrNotFound)
		{
		return KErrNotFound;
		}

	TDes* descPtr = static_cast<TDes*>(iPropertyValues[index]);
	if (aValue.MaxLength() < descPtr->Length())
		{
		return KErrArgument;
		}
	aValue = *descPtr;
	return KErrNone;
	}
/**
Removes no dir markers from source text.
*/
void CResourceLoader::RemoveNoDirMarkers(TDes& aText)
    {
    TInt nextkey(0);
    while (nextkey < aText.Length())
        {
        nextkey = aText.Locate(KDirNotFound);
        if (nextkey != KErrNotFound)
            {
            aText.Delete(nextkey, 1);
            nextkey++;    
            }
        else
            {
            break;
            }     
        }
    }
TBool CYCSettingList::AdjustFolder(TDes& aDes)
{
    //是否'/'结尾.
    TInt pos = aDes.LocateReverse('\\');
    if (pos != aDes.Length() - 1)
        aDes.Append('\\');

    //是否存在文件夹
    if (BaflUtils::PathExists(CCoeEnv::Static()->FsSession(),aDes))
    {
        return ETrue;
    }
    else
    {
        ShowInfomationDlgL(R_TEXT_DLG_INPUT_FOLDER_ERROR);
        return EFalse;
    }
}
 /* if no length is specified, the whole string is converted */
 int ConvertUTF8ToUnicode(const unsigned char* aText,
                          TDes& aDesc,
                          int aLength)
 {
    if ( aText == NULL ) {
       return 0;
    }
    /* create a UTF8 descriptor from the character data */
    int descLength = ( aLength > 0 ) ? aLength : strlen( (const char*)aText );
    TPtrC8 UTFBuf(NULL, 0);
    /* Set the buffer again. Peter says that the constructors do not work */
    UTFBuf.Set( aText, descLength);
    /* do the conversion */
    int numleft = CnvUtfConverter::ConvertToUnicodeFromUtf8(aDesc, UTFBuf);
    
    /* calculate and return the actual number of characters converted */
    return(aDesc.Length() - numleft);
 }
Esempio n. 24
0
// -----------------------------------------------------------------------------
// CapParser::MakeElementL(TDes& aText, TInt aId, const TDesC& aValue)
// Constructs element with value (eg. "<Free>23456</Free>").
// -----------------------------------------------------------------------------
//
void CapParser::MakeElementL(TDes& aText, TInt aId, const TDesC& aValue)
    {
    aText=KNullDesC;
    ReplaceSpecialCharsL( aText, aValue );
    
    TBuf<KTagSize> buf;
    MakeElementL( buf, aId, TXmlParser::EElementBegin );
    
    TInt len = aText.Length() + buf.Length() + buf.Length() + 1;
    if ( len > aText.MaxLength())
        {
        User::Leave(KErrTooBig);
        }
    
    aText.Insert( 0, buf );
    MakeElementL( buf, aId, TXmlParser::EElementEnd );
    aText.Append( buf );
    }
Esempio n. 25
0
// -----------------------------------------------------------------------------
// CCapInfo::AddFormatText( TDes& aText, TInt aNum ) const
// Adds format text
// -----------------------------------------------------------------------------
//
void CCapInfo::AddFormatText( TDes& aText, TInt aNum ) const
    {
    TBuf<KBufSize> buf;
    buf = KNullDesC;

    if ( aNum > KNestingLimit )
        {
        aNum = KNestingLimit;
        }
        
    for ( TInt i=0; i<aNum; i++ )
        {
        buf.Append( KFormatText );
        }
    if ( aText.MaxLength()-aText.Length()>buf.Length() )
        {
        aText.Insert( 0, buf );
        }
    }
/**
This routine is used to convert between European digits and 
Arabic-Indic, Eastern Arabic-Indic, Devanagari or Thai digits 
based on existing digit type setting. 

@param aDes  Parameter to change
*/
void CResourceLoader::LanguageSpecificNumberConverter::Convert( TDes &aDes )
    {   
    TLocale locale;
    locale.Refresh();
    const TDigitType digitType = locale.DigitType();
    TChar toArea = 0x030;
    switch( digitType )
        {
        case EDigitTypeWestern:
        case EDigitTypeArabicIndic:
        case EDigitTypeEasternArabicIndic:
        case EDigitTypeDevanagari:
        case EDigitTypeThai:
            toArea = digitType;
            break;
        case EDigitTypeUnknown:
        case EDigitTypeAllTypes:
            return;
        }
    
    const TInt length = aDes.Length();
    for( TInt i = 0; i < length; i++ )
        {
        TChar character = aDes[i];
        TChar fromArea = NumberToBase( character );
        TChar::TBdCategory cat = character.GetBdCategory();
        switch( cat )
            {
            case TChar::EArabicNumber:
            case TChar::EEuropeanNumber:
                character += toArea;
                character -= fromArea;
                aDes[i] = TUint16( character );
                break;
            default: 
                break;
            }
        }
    }
/**
This routine is used to convert Arabic-Indic, Eastern Arabic-Indic
or Devanagari digits to European digits. 

@param aDes Parameter to change
*/
void CResourceLoader::LanguageSpecificNumberConverter::ConvertToWesternNumbers( TDes &aDes )
    {   
    const TChar toArea = 0x030;
    const TInt KLastDevanagariDigit = 0x96F;
    const TInt KFirstDevanagariDigit = 0x966;
    const TInt length = aDes.Length();

    for( TInt i=0; i<length; i++ )
        {
        TChar character = aDes[i];
        TChar fromArea = NumberToBase( character );
        TChar::TBdCategory cat = character.GetBdCategory();

        if ( cat == TChar::EArabicNumber || cat == TChar::EEuropeanNumber ||
           ( KFirstDevanagariDigit <= character && character <= KLastDevanagariDigit ) )
            {
            character += toArea;
            character -= fromArea;
            aDes[i] = TUint16( character );    
            }        
        }
    }
Esempio n. 28
0
// Convert decoded buffer to Unicode
//
EXPORT_C TInt CImConvertCharconv::ConvertToOurCharsetL(const TDesC8& aBufIn, TDes& rBufOut, 
										TInt& rNumUnconvertedChars,
										TInt& rIndexOfFirstUnconvertedChar)
	{
	// Conversion is not needed if iCharsetUid is any of UTF-16(UCS2), UTF-16LE(LittleEndian), UTF-16BE
	// just do a straight copy.
	if (!iCharsetUid || iCharsetUid==KUidMsvCharsetNone  || iCharsetUid == KCharacterSetIdentifierUcs2
	    || iCharsetUid == KCharacterSetIdentifierUnicodeLittle || iCharsetUid == KCharacterSetIdentifierUnicodeBig)
		{
		return StraightCopy(aBufIn, rBufOut);
		}
	else
		{
		rNumUnconvertedChars=0;
		rIndexOfFirstUnconvertedChar=-1;
		TInt err = iConverter.ConvertToUnicode(rBufOut, aBufIn, iCharconvState, 
							rNumUnconvertedChars, rIndexOfFirstUnconvertedChar);
		if (err<0 && rBufOut.Length()>0)
			rBufOut.Zero();
		return err;
		}
	}
Esempio n. 29
0
TBool TAzenqosEngineUtils::AskTestDescription(TInt rscid, TDes& descr)
	{
							//descr.Zero();
							CAknTextQueryDialog* cldlg;
					        cldlg = new (ELeave) CAknTextQueryDialog(descr);
					        cldlg->PrepareLC( rscid );
					        if(!(cldlg->RunLD()))
					        {
					        	return EFalse;
					        }

					        descr.TrimAll();
					        if(descr.Length()==0)
					        {
			       				_LIT(emsg,"Test description not entered");
							    CAknErrorNote* informationNote = new (ELeave) CAknErrorNote(ETrue);
							   	informationNote->ExecuteLD(emsg);
							   	return EFalse;
					        }

					        return ETrue;

	}
/**
Reads the first text field from text fields blob based on aFieldType.  

1. If aFieldType is KUidContactFieldMatchAll: 
If the first text field found in the text fields blob is an Email field, 
then the email address is returned in aText and found exit with ETrue returned, 
If an email address is not returned, the first text field found in the text 
field blob is returned, however it is considered as the best effort text, so 
the calling function will return EFalse indicate the caller to found suitable
text in Fast Access fields.

2. If aFieldType is other than KUidContactFieldMatchAll: 
Find the first text field matching aFieldType from given text fields buffer and 
returned the field content in aText with ETrue returned, returning EFalse if it 
can't find matched field.

@param aHeaderStream The read stream contains text field header
@param aTextFieldsBuf The text fields blob buffer.
@param aSystemTemplate Reference to system template class.
@param aFieldType Field type to match the field
@param aText Text found in text fields buffer based on a FieldType. 
*/
TBool TCntPersistenceUtility::FindTxtFieldInTextBlobL(RReadStream& aHeaderStream, HBufC* aTextFieldsBuf, const CContactTemplate& aSystemTemplate, const TFieldType& aFieldType, TDes& aText)
	{
	// Extract the number of fields from the header stream.
	TCardinality headerFieldCount;
	aHeaderStream>>headerFieldCount;
	
	TInt txtFldIndex = 0;
	CContactItemField* itemField = NULL;
	// Assign to a TInt variable to avoid using the overloaded int operator on
	// each iteration - improves performance.
	TInt max = headerFieldCount;
	
	// Loop through the header fields and try to retrieve the text from the
	// searchable text buffer.
	for(TInt hdrFldIndex = 0; hdrFldIndex < max; ++hdrFldIndex)
		{
		itemField = CContactItemField::NewLC();

		// Using both header-fields and template-fields, setup the field to hold
		// the correct type UIDs.
		itemField->RestoreFieldTypesL(aHeaderStream, &aSystemTemplate.CardFields());

		// Only restore text fields - ignore all other fields.
		if(itemField->StorageType() == KStorageTypeText)
			{
			if(aFieldType == KUidContactFieldMatchAll)
				{
				// Restore the field text from the searchable text buffer.
				itemField->RestoreTextL(aTextFieldsBuf, txtFldIndex);
				
				if(itemField->ContentType().ContainsFieldType(KUidContactFieldEMail))
					{
					if(CopyMinFieldText(itemField->TextStorage()->Text(), aText))
						{
						CleanupStack::PopAndDestroy(itemField); 
						return ETrue;
						}
					}
				else if(aText.Length() == 0 && itemField->TextStorage()->Text().Length() > 0)
					{
					// If there is text in the field then make a copy of the first
					// KTextFieldMinimalLength characters.
					CopyMinFieldText(itemField->TextStorage()->Text(), aText);
					} //else if
				} 
			else if(itemField->ContentType().ContainsFieldType(aFieldType))
				{
				// Restore the field text from the searchable text buffer.
				itemField->RestoreTextL(aTextFieldsBuf, txtFldIndex);
				itemField->GetFieldText(aText);
				//CopyMinFieldText(itemField->TextStorage()->Text(), aText);	
				CleanupStack::PopAndDestroy(itemField); 
				return ETrue;
				} //else if
				
			++txtFldIndex;
			} //if
		CleanupStack::PopAndDestroy(itemField);
		} // for
	return EFalse;
	}