summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-02-17 21:43:31 +0100
committerAndras Timar <atimar@suse.com>2012-02-17 21:45:37 +0100
commit7636d37f8f9c53d694c4fe38581f3b495d53670e (patch)
treeb0e5fbc15b51c34c540d7b22eb68e1307057572c
parentaf75ceb873e55fc2f252c4b02ea3d536470cfb87 (diff)
fdo#40665 use CJKAnalyzer for ko, zh-CN, and zh-TW, too
-rw-r--r--l10ntools/source/help/HelpIndexerTool.java5
-rwxr-xr-xxmlhelp/source/com/sun/star/help/HelpSearch.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/l10ntools/source/help/HelpIndexerTool.java b/l10ntools/source/help/HelpIndexerTool.java
index d1d0873e87b5..8e42d55d2768 100644
--- a/l10ntools/source/help/HelpIndexerTool.java
+++ b/l10ntools/source/help/HelpIndexerTool.java
@@ -185,7 +185,10 @@ public class HelpIndexerTool
try
{
- Analyzer analyzer = aLanguageStr.equals("ja") ? (Analyzer)new CJKAnalyzer() : (Analyzer)new StandardAnalyzer();
+ Analyzer analyzer = ( aLanguageStr.equals("ja")
+ || aLanguageStr.equals("ko")
+ || aLanguageStr.equals("zh-CN")
+ || aLanguageStr.equals("zh-TW") ) ? (Analyzer)new CJKAnalyzer() : (Analyzer)new StandardAnalyzer();
IndexWriter writer = new IndexWriter( aIndexDir, analyzer, true );
int nRet = indexDocs( writer, aModule, bExtensionMode, aCaptionFilesDir, aContentFilesDir );
if( nRet != -1 )
diff --git a/xmlhelp/source/com/sun/star/help/HelpSearch.java b/xmlhelp/source/com/sun/star/help/HelpSearch.java
index dc31514afcb0..03aadea8e298 100755
--- a/xmlhelp/source/com/sun/star/help/HelpSearch.java
+++ b/xmlhelp/source/com/sun/star/help/HelpSearch.java
@@ -255,7 +255,10 @@ public class HelpSearch
{
IndexReader reader = IndexReader.open( aIndexStr );
Searcher searcher = new IndexSearcher( reader );
- Analyzer analyzer = aLanguageStr.equals("ja") ? (Analyzer)new CJKAnalyzer() : (Analyzer)new StandardAnalyzer();
+ Analyzer analyzer = ( aLanguageStr.equals("ja")
+ || aLanguageStr.equals("ko")
+ || aLanguageStr.equals("zh-CN")
+ || aLanguageStr.equals("zh-TW") ) ? (Analyzer)new CJKAnalyzer() : (Analyzer)new StandardAnalyzer();
String aField;
if( bCaptionOnly )