summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2011-01-04 12:01:53 +0100
committerJoachim Lingner <jl@openoffice.org>2011-01-04 12:01:53 +0100
commit7508b11431ad7e08ab49a8a239a79ee9ae80334d (patch)
tree661469b3352f6c1f0faa9581eba30b6de5fa49aa /xmlhelp
parent2e54587cb31ebf2c747297ffd86cd79e2d54a4a0 (diff)
parent794c821e4d48c34aa376cdc7b6ab2cb029d9574d (diff)
jl160 merge with DEV300m96
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/prj/d.lst4
-rwxr-xr-xxmlhelp/source/com/sun/star/help/HelpComponent.java25
-rw-r--r--xmlhelp/source/com/sun/star/help/HelpSearch.java19
-rw-r--r--xmlhelp/source/com/sun/star/help/LuceneHelpWrapper.component37
-rw-r--r--xmlhelp/source/com/sun/star/help/makefile.mk8
-rw-r--r--xmlhelp/source/cxxhelp/provider/services.cxx55
-rw-r--r--xmlhelp/source/treeview/makefile.mk8
-rw-r--r--xmlhelp/source/treeview/tvfactory.cxx57
-rw-r--r--xmlhelp/source/treeview/tvhlp1.component35
-rw-r--r--xmlhelp/util/makefile.mk8
-rw-r--r--xmlhelp/util/ucpchelp1.component35
11 files changed, 138 insertions, 153 deletions
diff --git a/xmlhelp/prj/d.lst b/xmlhelp/prj/d.lst
index 67fe323757bb..740ff554ee34 100644
--- a/xmlhelp/prj/d.lst
+++ b/xmlhelp/prj/d.lst
@@ -7,4 +7,6 @@
..\util\*.xsl %_DEST%\bin%_EXT%\*.*
..\%__SRC%\lib\ihelplinker.lib %_DEST%\lib%_EXT%\ihelplinker.lib
..\%__SRC%\bin\helpxsl.zip %_DEST%\pck%_EXT%\helpxsl.zip
-
+..\%__SRC%\misc\LuceneHelpWrapper.component %_DEST%\xml%_EXT%\LuceneHelpWrapper.component
+..\%__SRC%\misc\tvhlp1.component %_DEST%\xml%_EXT%\tvhlp1.component
+..\%__SRC%\misc\ucpchelp1.component %_DEST%\xml%_EXT%\ucpchelp1.component
diff --git a/xmlhelp/source/com/sun/star/help/HelpComponent.java b/xmlhelp/source/com/sun/star/help/HelpComponent.java
index b12eb20f9485..44b4ed091b47 100755
--- a/xmlhelp/source/com/sun/star/help/HelpComponent.java
+++ b/xmlhelp/source/com/sun/star/help/HelpComponent.java
@@ -68,10 +68,8 @@ import java.io.PrintStream;
import java.io.File;
*/
-/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getComponentFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
+/** This class capsulates the class, that implements the minimal component and a
+ * factory for creating the service (<CODE>__getComponentFactory</CODE>).
*/
public class HelpComponent
{
@@ -98,25 +96,6 @@ public class HelpComponent
return xFactory;
}
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey)
- {
- boolean bSuccessHelpSearch = Factory.writeRegistryServiceInfo
- (HelpSearch._HelpSearch.class.getName(),
- HelpSearch._HelpSearch.getServiceNames(), regKey);
- boolean bSuccessHelpIndexer = Factory.writeRegistryServiceInfo
- (HelpIndexer.class.getName(),
- HelpIndexer.getServiceNames(), regKey);
-
- return bSuccessHelpSearch && bSuccessHelpIndexer;
- }
/** This method is a member of the interface for initializing an object
* directly after its creation.
* @param object This array of arbitrary objects will be passed to the
diff --git a/xmlhelp/source/com/sun/star/help/HelpSearch.java b/xmlhelp/source/com/sun/star/help/HelpSearch.java
index 3324701f197d..dc31514afcb0 100644
--- a/xmlhelp/source/com/sun/star/help/HelpSearch.java
+++ b/xmlhelp/source/com/sun/star/help/HelpSearch.java
@@ -54,10 +54,8 @@ import org.apache.lucene.search.WildcardQuery;
import com.sun.star.script.XInvocation;
import com.sun.star.beans.XIntrospectionAccess;
-/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getComponentFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
+/** This class capsulates the class, that implements the minimal component and a
+ * factory for creating the service (<CODE>__getComponentFactory</CODE>).
*/
public class HelpSearch
{
@@ -314,19 +312,6 @@ public class HelpSearch
return xFactory;
}
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
- return Factory.writeRegistryServiceInfo(_HelpSearch.class.getName(),
- _HelpSearch.getServiceNames(),
- regKey);
- }
/** This method is a member of the interface for initializing an object
* directly after its creation.
* @param object This array of arbitrary objects will be passed to the
diff --git a/xmlhelp/source/com/sun/star/help/LuceneHelpWrapper.component b/xmlhelp/source/com/sun/star/help/LuceneHelpWrapper.component
new file mode 100644
index 000000000000..04b35bcb12ec
--- /dev/null
+++ b/xmlhelp/source/com/sun/star/help/LuceneHelpWrapper.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.help.HelpIndexer">
+ <service name="com.sun.star.help.HelpIndexer"/>
+ </implementation>
+ <implementation name="com.sun.star.help.HelpSearch$_HelpSearch">
+ <service name="com.sun.star.help.HelpSearch"/>
+ </implementation>
+</component>
diff --git a/xmlhelp/source/com/sun/star/help/makefile.mk b/xmlhelp/source/com/sun/star/help/makefile.mk
index ffa08b30cfed..a67f755a1cb2 100644
--- a/xmlhelp/source/com/sun/star/help/makefile.mk
+++ b/xmlhelp/source/com/sun/star/help/makefile.mk
@@ -76,6 +76,14 @@ fix_system_lucene:
@echo "Fix Java Class-Path entry for Lucene libraries from system."
@$(SED) -r -e "s#^(Class-Path:).*#\1 file://$(LUCENE_CORE_JAR) file://$(LUCENE_ANALYZERS_JAR)#" \
-i ../../../../../$(INPATH)/class/HelpLinker/META-INF/MANIFEST.MF
+
+ALLTAR : $(MISC)/LuceneHelpWrapper.component
+
+$(MISC)/LuceneHelpWrapper.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt LuceneHelpWrapper.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt LuceneHelpWrapper.component
.ELSE
all:
@echo java disabled
diff --git a/xmlhelp/source/cxxhelp/provider/services.cxx b/xmlhelp/source/cxxhelp/provider/services.cxx
index b0da4e0cdec0..e6d73a4ba2eb 100644
--- a/xmlhelp/source/cxxhelp/provider/services.cxx
+++ b/xmlhelp/source/cxxhelp/provider/services.cxx
@@ -36,46 +36,6 @@
using namespace com::sun::star;
//=========================================================================
-static sal_Bool writeInfo(
- void * pRegistryKey,
- const rtl::OUString & rImplementationName,
- uno::Sequence< rtl::OUString > const & rServiceNames )
-{
- rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) );
- aKeyName += rImplementationName;
- aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" );
-
- uno::Reference< registry::XRegistryKey > xKey;
- try
- {
- xKey = static_cast< registry::XRegistryKey * >(
- pRegistryKey )->createKey( aKeyName );
- }
- catch ( registry::InvalidRegistryException const & )
- {
- }
-
- if ( !xKey.is() )
- return sal_False;
-
- sal_Bool bSuccess = sal_True;
-
- for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n )
- {
- try
- {
- xKey->createKey( rServiceNames[ n ] );
- }
- catch ( registry::InvalidRegistryException const & )
- {
- bSuccess = sal_False;
- break;
- }
- }
- return bSuccess;
-}
-
-//=========================================================================
extern "C" void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
@@ -83,21 +43,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
}
//=========================================================================
-extern "C" sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/, void * pRegistryKey )
-{
- return pRegistryKey &&
-
- //////////////////////////////////////////////////////////////////////
- // Write info into registry.
- //////////////////////////////////////////////////////////////////////
-
- writeInfo( pRegistryKey,
- ::chelp::ContentProvider::getImplementationName_Static(),
- ::chelp::ContentProvider::getSupportedServiceNames_Static() );
-}
-
-//=========================================================================
extern "C" void * SAL_CALL component_getFactory(
const sal_Char * pImplName,
void * pServiceManager,
diff --git a/xmlhelp/source/treeview/makefile.mk b/xmlhelp/source/treeview/makefile.mk
index 0c385862d772..be0ed8e76f2f 100644
--- a/xmlhelp/source/treeview/makefile.mk
+++ b/xmlhelp/source/treeview/makefile.mk
@@ -67,3 +67,11 @@ DEF1DES=UCB : Treeview help
.INCLUDE: target.mk
+
+ALLTAR : $(MISC)/tvhlp1.component
+
+$(MISC)/tvhlp1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ tvhlp1.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt tvhlp1.component
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 8ebfc22f082a..0a6852cdae3b 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -255,49 +255,6 @@ TVFactory::CreateInstance(
return Reference< XInterface >::query( xP );
}
-
-
-//=========================================================================
-static sal_Bool writeInfo( void * pRegistryKey,
- const rtl::OUString & rImplementationName,
- Sequence< rtl::OUString > const & rServiceNames )
-{
- rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) );
- aKeyName += rImplementationName;
- aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" );
-
- Reference< registry::XRegistryKey > xKey;
- try
- {
- xKey = static_cast< registry::XRegistryKey * >(
- pRegistryKey )->createKey( aKeyName );
- }
- catch ( registry::InvalidRegistryException const & )
- {
- }
-
- if ( !xKey.is() )
- return sal_False;
-
- sal_Bool bSuccess = sal_True;
-
- for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n )
- {
- try
- {
- xKey->createKey( rServiceNames[ n ] );
- }
- catch ( registry::InvalidRegistryException const & )
- {
- bSuccess = sal_False;
- break;
- }
- }
- return bSuccess;
-}
-
-
-
//=========================================================================
extern "C" void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
@@ -307,20 +264,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-
-
-//=========================================================================
-extern "C" sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- (void)pServiceManager;
-
- return pRegistryKey && writeInfo( pRegistryKey,
- TVFactory::getImplementationName_static(),
- TVFactory::getSupportedServiceNames_static() );
-}
-
-
//=========================================================================
extern "C" void * SAL_CALL component_getFactory(
const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey )
diff --git a/xmlhelp/source/treeview/tvhlp1.component b/xmlhelp/source/treeview/tvhlp1.component
new file mode 100644
index 000000000000..525de73e0062
--- /dev/null
+++ b/xmlhelp/source/treeview/tvhlp1.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.help.TreeViewImpl">
+ <service name="com.sun.star.help.TreeView"/>
+ <service name="com.sun.star.ucb.HiearchyDataSource"/>
+ </implementation>
+</component>
diff --git a/xmlhelp/util/makefile.mk b/xmlhelp/util/makefile.mk
index 66551f15bffc..e060db9efe04 100644
--- a/xmlhelp/util/makefile.mk
+++ b/xmlhelp/util/makefile.mk
@@ -82,3 +82,11 @@ ZIP1LIST=main_transform*.xsl idxcaption.xsl idxcontent.xsl
.INCLUDE: target.mk
+
+ALLTAR : $(MISC)/ucpchelp1.component
+
+$(MISC)/ucpchelp1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ ucpchelp1.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt ucpchelp1.component
diff --git a/xmlhelp/util/ucpchelp1.component b/xmlhelp/util/ucpchelp1.component
new file mode 100644
index 000000000000..a8bb64124e9c
--- /dev/null
+++ b/xmlhelp/util/ucpchelp1.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="CHelpContentProvider">
+ <service name="com.sun.star.help.XMLHelp"/>
+ <service name="com.sun.star.ucb.HelpContentProvider"/>
+ </implementation>
+</component>