27 #include <collate.h> |
27 #include <collate.h> |
28 #include <PtiIndicDefs.h> |
28 #include <PtiIndicDefs.h> |
29 #include "FindUtilKorean.h" |
29 #include "FindUtilKorean.h" |
30 #include <avkon.rsg> |
30 #include <avkon.rsg> |
31 #include <StringLoader.h> |
31 #include <StringLoader.h> |
|
32 #include <featmgr.h> |
|
33 #include <bldvariant.hrh> |
|
34 |
32 const TInt KLitTab('\t'); |
35 const TInt KLitTab('\t'); |
33 const TInt KLitSpace(' '); |
36 const TInt KLitSpace(' '); |
34 const TInt KLitHyphen('-'); |
37 const TInt KLitHyphen('-'); |
35 const TInt KLitLineFeed(8233); |
38 const TInt KLitLineFeed(8233); |
36 const TInt KLitStar('*'); |
39 const TInt KLitStar('*'); |
332 // (other items were commented in a header). |
343 // (other items were commented in a header). |
333 // ----------------------------------------------------------------------------- |
344 // ----------------------------------------------------------------------------- |
334 // |
345 // |
335 TBool CFindUtilWestern::MatchRefineL( const TDesC& aItemString, const TDesC& aSearchText ) |
346 TBool CFindUtilWestern::MatchRefineL( const TDesC& aItemString, const TDesC& aSearchText ) |
336 { |
347 { |
337 if ( iFindUtilKorean->IsKoreanLanguage( aItemString ) || iFindUtilKorean->IsKoreanLanguage( aSearchText ) ) |
348 if ( FeatureManager::FeatureSupported( KFeatureIdKorean ) || |
|
349 iFindUtilKorean->IsKoreanLanguage( aItemString ) || |
|
350 iFindUtilKorean->IsKoreanLanguage( aSearchText ) ) |
338 { |
351 { |
339 return iFindUtilKorean->MatchRefineL( aItemString, aSearchText ); |
352 return iFindUtilKorean->MatchRefineL( aItemString, aSearchText ); |
340 } |
353 } |
341 else |
354 else |
342 { |
355 { |
343 if ( aItemString.Length() == 0 ) |
356 if ( aItemString.Length() == 0 ) |
344 { |
357 { |
345 return EFalse; |
358 return EFalse; |
346 } |
359 } |
347 |
360 |
348 if ( aSearchText.Length() == 0 ) |
361 if ( aSearchText.Length() == 0 ) |
349 { |
362 { |
350 return ETrue; |
363 return ETrue; |
351 } |
364 } |
352 return IsFindMatch( aItemString, aSearchText, iInputLanguage ); |
365 return IsFindMatch( aItemString, aSearchText, iInputLanguage ); |
353 } |
366 } |
354 } |
367 } |
355 |
368 |
356 // ----------------------------------------------------------------------------- |
369 // ----------------------------------------------------------------------------- |
357 // CFindUtilWestern::IsWordValidForMatching |
370 // CFindUtilWestern::IsWordValidForMatching |
1311 if( iDigraphChars == NULL ) |
1330 if( iDigraphChars == NULL ) |
1312 { |
1331 { |
1313 iDigraphChars = StringLoader::LoadL( R_QTN_ADS_DIGRAPH ); |
1332 iDigraphChars = StringLoader::LoadL( R_QTN_ADS_DIGRAPH ); |
1314 TPtr digraph = iDigraphChars->Des(); |
1333 TPtr digraph = iDigraphChars->Des(); |
1315 digraph.UpperCase(); |
1334 digraph.UpperCase(); |
|
1335 |
|
1336 _LIT( KMissing,"#MISSING" ); |
|
1337 if( digraph.CompareC(KMissing()) == 0 ) |
|
1338 { |
|
1339 digraph = KNullDesC; |
|
1340 } |
1316 } |
1341 } |
1317 |
1342 |
1318 TBuf<KAknStringBufferSize> itemString(aItemString); |
1343 TBuf<KAknStringBufferSize> itemString(aItemString); |
1319 itemString.UpperCase(); |
1344 itemString.UpperCase(); |
1320 |
1345 |