[Libreoffice-commits] .: l10ntools/source xmlhelp/source

Andras Timar timar at kemper.freedesktop.org
Fri Feb 17 12:45:47 PST 2012


 l10ntools/source/help/HelpIndexerTool.java       |    5 ++++-
 xmlhelp/source/com/sun/star/help/HelpSearch.java |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 7636d37f8f9c53d694c4fe38581f3b495d53670e
Author: Andras Timar <atimar at suse.com>
Date:   Fri Feb 17 21:43:31 2012 +0100

    fdo#40665 use CJKAnalyzer for ko, zh-CN, and zh-TW, too

diff --git a/l10ntools/source/help/HelpIndexerTool.java b/l10ntools/source/help/HelpIndexerTool.java
index d1d0873..8e42d55 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 dc31514..03aadea 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 )


More information about the Libreoffice-commits mailing list