[Libreoffice-commits] .: Branch 'libreoffice-3-5' - l10ntools/source xmlhelp/source
Michael Meeks
michael at kemper.freedesktop.org
Fri Feb 17 13:13:28 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 c3f76c548c6131543e4ccfafe4e72e8d12804234
Author: Andras Timar <atimar at suse.com>
Date: Fri Feb 17 21:14:37 2012 +0000
fdo#40665 use CJKAnalyzer for ko, zh-CN, and zh-TW, too
Signed-off-by: Michael Meeks <michael.meeks at suse.com>
diff --git a/l10ntools/source/help/HelpIndexerTool.java b/l10ntools/source/help/HelpIndexerTool.java
index c20d9f1..e58f14b 100644
--- a/l10ntools/source/help/HelpIndexerTool.java
+++ b/l10ntools/source/help/HelpIndexerTool.java
@@ -186,7 +186,10 @@ public class HelpIndexerTool
try
{
Date start = new Date();
- 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 );
if( !bExtensionMode )
System.out.println( "Lucene: Indexing to directory '" + aIndexDir + "'..." );
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