uiutils/Findutil/src/FindUtilWestern.cpp
branchRCL_3
changeset 56 d48ab3b357f1
parent 55 aecbbf00d063
child 59 978afdc0236f
--- a/uiutils/Findutil/src/FindUtilWestern.cpp	Tue Aug 31 15:28:30 2010 +0300
+++ b/uiutils/Findutil/src/FindUtilWestern.cpp	Wed Sep 01 12:16:19 2010 +0100
@@ -29,6 +29,9 @@
 #include "FindUtilKorean.h"
 #include <avkon.rsg>
 #include <StringLoader.h>
+#include <featmgr.h>
+#include <bldvariant.hrh>
+
 const TInt KLitTab('\t');
 const TInt KLitSpace(' ');
 const TInt KLitHyphen('-');
@@ -309,10 +312,18 @@
         }
     else
     	{
-    TInt numChar = 1;
+        TInt numChar = 1;
     	if (!aContactsField.Length())
         	{
-        	return EFalse;
+                _LIT( KNone, "*" );
+    	        if( aWord.CompareC(KNone()) == 0 )
+                    {
+    	            return ETrue;
+                    }
+                else
+                    {
+        	    return EFalse;
+                    }
         	}        
     	if((aWord.Length() > 1) && aWord[aWord.Length()-2] == 0x200B)
     		{
@@ -334,22 +345,24 @@
 //
 TBool CFindUtilWestern::MatchRefineL( const TDesC& aItemString, const TDesC& aSearchText )
     {
-    if ( iFindUtilKorean->IsKoreanLanguage( aItemString ) || iFindUtilKorean->IsKoreanLanguage( aSearchText ) )
+    if ( FeatureManager::FeatureSupported( KFeatureIdKorean ) || 
+         iFindUtilKorean->IsKoreanLanguage( aItemString ) || 
+         iFindUtilKorean->IsKoreanLanguage( aSearchText ) )
         {
         return iFindUtilKorean->MatchRefineL( aItemString, aSearchText );	
         }
     else
-    {
-    if ( aItemString.Length() == 0 )
         {
-        return EFalse;
-        }
-
-    if ( aSearchText.Length() == 0 )
-        {
-        return ETrue;
-        }
-    return IsFindMatch( aItemString, aSearchText, iInputLanguage );
+        if ( aItemString.Length() == 0 )
+            {
+            return EFalse;
+            }
+    
+        if ( aSearchText.Length() == 0 )
+            {
+            return ETrue;
+            }
+        return IsFindMatch( aItemString, aSearchText, iInputLanguage );
     	}
     }
 
@@ -1302,6 +1315,12 @@
         {
         return EFalse;
         }
+		
+    if ( iFindUtilKorean )
+        {
+        return iFindUtilKorean->MatchAdaptiveRefineL(aItemString,aSearchText,aNextChars);   
+        }
+		
     if ( aSearchText.Length() == 0 )
         {        
         UpdateNextCharsFromString( aNextChars, aItemString );
@@ -1313,6 +1332,12 @@
         iDigraphChars = StringLoader::LoadL( R_QTN_ADS_DIGRAPH );
         TPtr digraph = iDigraphChars->Des();
         digraph.UpperCase();
+
+        _LIT( KMissing,"#MISSING" );
+        if( digraph.CompareC(KMissing()) == 0 )
+            {
+            digraph = KNullDesC;
+            }
         }
         
     TBuf<KAknStringBufferSize> itemString(aItemString);