summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-05-07 06:54:56 +0000
committerRelease Engineers <releng@openoffice.org>2009-05-07 06:54:56 +0000
commit193d793b79d09e3ce4828f2d4c92ad5ba87ff4a7 (patch)
tree7925de93d1b8fcb1ff9311aea3f2959ec88c62a2 /xmlhelp
parent262b6f4b50d166a50f6cd223968f52bbf0fbb7d8 (diff)
CWS-TOOLING: integrate CWS cmcfixes58
2009-05-04 13:51:10 +0200 cmc r271450 : #i101533# latest sw warnings 2009-05-04 00:02:46 +0200 cmc r271436 : #i101517# silence new warnings 2009-05-03 23:13:53 +0200 cmc r271435 : #i101305# add that one back in 2009-05-02 16:30:42 +0200 cmc r271431 : #i101493# get it to build, and remove some warnings 2009-05-02 16:12:37 +0200 cmc r271430 : CWS-TOOLING: rebase CWS cmcfixes58 to trunk@271427 (milestone: DEV300:m47) 2009-04-23 13:19:33 +0200 cmc r271163 : #i101305# remove annoying import foo is unused warnings 2009-04-21 17:10:34 +0200 cmc r271048 : #i101246# remove AVMEDIA_MANAGER_SERVICE_NAME defines again 2009-04-21 17:07:41 +0200 cmc r271047 : #i86323# remove xml2cmp unused methods
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/com/sun/star/help/HelpFileDocument.java2
-rw-r--r--xmlhelp/source/com/sun/star/help/HelpIndexer.java256
-rw-r--r--xmlhelp/source/com/sun/star/help/HelpSearch.java4
3 files changed, 126 insertions, 136 deletions
diff --git a/xmlhelp/source/com/sun/star/help/HelpFileDocument.java b/xmlhelp/source/com/sun/star/help/HelpFileDocument.java
index 01550d98f719..2212db27f251 100644
--- a/xmlhelp/source/com/sun/star/help/HelpFileDocument.java
+++ b/xmlhelp/source/com/sun/star/help/HelpFileDocument.java
@@ -34,11 +34,9 @@ import java.io.File;
import java.io.Reader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
//import java.io.FileReader;
import java.io.StringReader;
-import org.apache.lucene.document.DateTools;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
diff --git a/xmlhelp/source/com/sun/star/help/HelpIndexer.java b/xmlhelp/source/com/sun/star/help/HelpIndexer.java
index 265bf6c7d383..9b5da8253d70 100644
--- a/xmlhelp/source/com/sun/star/help/HelpIndexer.java
+++ b/xmlhelp/source/com/sun/star/help/HelpIndexer.java
@@ -30,14 +30,12 @@
package com.sun.star.help;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.script.XInvocation;
-import com.sun.star.beans.XIntrospectionAccess;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.Any;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.XComponentContext;
+import com.sun.star.lib.uno.helper.WeakBase;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.script.XInvocation;
+import com.sun.star.beans.XIntrospectionAccess;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.XComponentContext;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@ -57,34 +55,32 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Date;
-import javax.swing.*;
+public class HelpIndexer extends WeakBase
+ implements XServiceInfo, XInvocation
+{
+ static private final String __serviceName =
+ "com.sun.star.help.HelpIndexer";
+ static private final String aCreateIndexMethodName = "createIndex";
-public class HelpIndexer extends WeakBase
- implements XServiceInfo, XInvocation
-{
- static private final String __serviceName =
- "com.sun.star.help.HelpIndexer";
- static private final String aCreateIndexMethodName = "createIndex";
-
public HelpIndexer()
{
}
- public HelpIndexer(XComponentContext xCompContext)
- {
- }
-
+ public HelpIndexer(XComponentContext xCompContext)
+ {
+ }
+
/**
* @param args the command line arguments
*/
public static void main( String[] args )
{
boolean bExtensionMode = false;
- mainImpl( args, bExtensionMode );
- }
-
- private static void mainImpl( String[] args, boolean bExtensionMode )
- {
+ mainImpl( args, bExtensionMode );
+ }
+
+ private static void mainImpl( String[] args, boolean bExtensionMode )
+ {
String aDirToZipStr = "";
String aLanguageStr = "";
String aModule = "";
@@ -151,7 +147,7 @@ public class HelpIndexer extends WeakBase
File aIndexDir = new File( aDirToZipStr + File.separator + aIndexDirName );
File aCaptionFilesDir = new File( aDirToZipStr + File.separator + "caption" );
File aContentFilesDir = new File( aDirToZipStr + File.separator + "content" );
-
+
try
{
Date start = new Date();
@@ -166,12 +162,12 @@ public class HelpIndexer extends WeakBase
writer.optimize();
}
writer.close();
-
- if( bExtensionMode )
- {
+
+ if( bExtensionMode )
+ {
deleteRecursively( aCaptionFilesDir );
deleteRecursively( aContentFilesDir );
- }
+ }
else
{
if( nRet == -1 )
@@ -335,104 +331,104 @@ public class HelpIndexer extends WeakBase
return aFile.delete();
}
-
- //===================================================
- // XInvocation
- public XIntrospectionAccess getIntrospection()
- {
- return null;
- }
-
- public Object invoke( String aFunctionName, java.lang.Object[] aParams,
- short[][] aOutParamIndex, java.lang.Object[][] aOutParam )
- throws com.sun.star.lang.IllegalArgumentException,
- com.sun.star.script.CannotConvertException,
- com.sun.star.reflection.InvocationTargetException
- {
- if( !aFunctionName.equals( aCreateIndexMethodName ) )
- throw new com.sun.star.lang.IllegalArgumentException();
-
- aOutParamIndex[0] = new short[0];
- aOutParam[0] = new Object[0];
-
- int nParamCount = aParams.length;
- String aStrs[] = new String[nParamCount];
- for( int i = 0 ; i < nParamCount ; i++ )
- {
- try
- {
- aStrs[i] = AnyConverter.toString( aParams[i] );
- }
- catch( IllegalArgumentException e )
- {
- aStrs[i] = "";
- }
- }
-
+
+ //===================================================
+ // XInvocation
+ public XIntrospectionAccess getIntrospection()
+ {
+ return null;
+ }
+
+ public Object invoke( String aFunctionName, java.lang.Object[] aParams,
+ short[][] aOutParamIndex, java.lang.Object[][] aOutParam )
+ throws com.sun.star.lang.IllegalArgumentException,
+ com.sun.star.script.CannotConvertException,
+ com.sun.star.reflection.InvocationTargetException
+ {
+ if( !aFunctionName.equals( aCreateIndexMethodName ) )
+ throw new com.sun.star.lang.IllegalArgumentException();
+
+ aOutParamIndex[0] = new short[0];
+ aOutParam[0] = new Object[0];
+
+ int nParamCount = aParams.length;
+ String aStrs[] = new String[nParamCount];
+ for( int i = 0 ; i < nParamCount ; i++ )
+ {
+ try
+ {
+ aStrs[i] = AnyConverter.toString( aParams[i] );
+ }
+ catch( IllegalArgumentException e )
+ {
+ aStrs[i] = "";
+ }
+ }
+
boolean bExtensionMode = true;
- mainImpl( aStrs, bExtensionMode );
-
- return null;
- }
-
- public void setValue( String aPropertyName, java.lang.Object aValue )
- throws com.sun.star.beans.UnknownPropertyException,
- com.sun.star.script.CannotConvertException,
- com.sun.star.reflection.InvocationTargetException
- {
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public Object getValue( String aPropertyName )
- throws com.sun.star.beans.UnknownPropertyException
- {
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public boolean hasMethod( String aMethodName )
- {
- boolean bRet = (aMethodName.equals( aCreateIndexMethodName ) );
- return bRet;
- }
- public boolean hasProperty( String aName ) {
- return false;
- }
-
-
- /** This method returns an array of all supported service names.
- * @return Array of supported service names.
- */
- public String[] getSupportedServiceNames()
- {
- return getServiceNames();
- }
-
- /** This method is a simple helper function to used in the
- * static component initialisation functions as well as in
- * getSupportedServiceNames.
- */
- public static String[] getServiceNames()
- {
- String[] sSupportedServiceNames = { __serviceName };
- return sSupportedServiceNames;
- }
-
- /** This method returns true, if the given service will be
- * supported by the component.
- * @param sServiceName Service name.
- * @return True, if the given service name will be supported.
- */
- public boolean supportsService( String sServiceName )
- {
- return sServiceName.equals( __serviceName );
- }
-
- /** Return the class name of the component.
- * @return Class name of the component.
- */
- public String getImplementationName()
- {
- return HelpIndexer.class.getName();
- }
-}
-
+ mainImpl( aStrs, bExtensionMode );
+
+ return null;
+ }
+
+ public void setValue( String aPropertyName, java.lang.Object aValue )
+ throws com.sun.star.beans.UnknownPropertyException,
+ com.sun.star.script.CannotConvertException,
+ com.sun.star.reflection.InvocationTargetException
+ {
+ throw new com.sun.star.beans.UnknownPropertyException();
+ }
+
+ public Object getValue( String aPropertyName )
+ throws com.sun.star.beans.UnknownPropertyException
+ {
+ throw new com.sun.star.beans.UnknownPropertyException();
+ }
+
+ public boolean hasMethod( String aMethodName )
+ {
+ boolean bRet = (aMethodName.equals( aCreateIndexMethodName ) );
+ return bRet;
+ }
+ public boolean hasProperty( String aName ) {
+ return false;
+ }
+
+
+ /** This method returns an array of all supported service names.
+ * @return Array of supported service names.
+ */
+ public String[] getSupportedServiceNames()
+ {
+ return getServiceNames();
+ }
+
+ /** This method is a simple helper function to used in the
+ * static component initialisation functions as well as in
+ * getSupportedServiceNames.
+ */
+ public static String[] getServiceNames()
+ {
+ String[] sSupportedServiceNames = { __serviceName };
+ return sSupportedServiceNames;
+ }
+
+ /** This method returns true, if the given service will be
+ * supported by the component.
+ * @param sServiceName Service name.
+ * @return True, if the given service name will be supported.
+ */
+ public boolean supportsService( String sServiceName )
+ {
+ return sServiceName.equals( __serviceName );
+ }
+
+ /** Return the class name of the component.
+ * @return Class name of the component.
+ */
+ public String getImplementationName()
+ {
+ return HelpIndexer.class.getName();
+ }
+}
+
diff --git a/xmlhelp/source/com/sun/star/help/HelpSearch.java b/xmlhelp/source/com/sun/star/help/HelpSearch.java
index 9200702fb5a9..117ab181f844 100644
--- a/xmlhelp/source/com/sun/star/help/HelpSearch.java
+++ b/xmlhelp/source/com/sun/star/help/HelpSearch.java
@@ -34,11 +34,8 @@ import com.sun.star.lib.uno.helper.Factory;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XTypeProvider;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.uno.Type;
import com.sun.star.uno.Any;
@@ -48,7 +45,6 @@ import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.analysis.cjk.CJKAnalyzer;
import org.apache.lucene.document.Document;
-import org.apache.lucene.index.FilterIndexReader;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.Hits;