From d5c14a99dc9f0354b619181e7c2943c7e5ba121e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 22 Feb 2012 09:52:37 +0000 Subject: just link to HelpIndexer --- xmlhelp/prj/build.lst | 1 - xmlhelp/source/cxxhelp/provider/databases.cxx | 6 +- .../helpcomponent/CLuceneHelpWrapper.component | 35 ----- .../source/helpcomponent/CLuceneHelpWrapper.cxx | 164 --------------------- xmlhelp/source/helpcomponent/makefile.mk | 65 -------- 5 files changed, 1 insertion(+), 270 deletions(-) delete mode 100755 xmlhelp/source/helpcomponent/CLuceneHelpWrapper.component delete mode 100644 xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx delete mode 100755 xmlhelp/source/helpcomponent/makefile.mk (limited to 'xmlhelp') diff --git a/xmlhelp/prj/build.lst b/xmlhelp/prj/build.lst index 19ca1fcce50e..166d9cf282f7 100644 --- a/xmlhelp/prj/build.lst +++ b/xmlhelp/prj/build.lst @@ -1,7 +1,6 @@ xh xmlhelp : comphelper ucbhelper LIBXSLT:libxslt unoil BERKELEYDB:berkeleydb javaunohelper DESKTOP:l10ntools unotools NULL xh xmlhelp usr1 - all xh_mkout NULL xh xmlhelp\source\treeview nmake - all xh_treeview NULL -xh xmlhelp\source\helpcomponent nmake - all xh_help NULL xh xmlhelp\source\cxxhelp\util nmake - all xh_cutil NULL xh xmlhelp\source\cxxhelp\qe nmake - all xh_qe NULL xh xmlhelp\source\cxxhelp\provider nmake - all xh_provider NULL diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 8d9255f5851c..22c873e627ce 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -2149,11 +2149,7 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp } } - rtl::OUString aCaption = aLangURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/caption")); - rtl::OUString aContent = aLangURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/content")); - - HelpIndexer aIndexer(aLang, aMod, aCaption, aContent, aZipDir); - + HelpIndexer aIndexer(aLang, aMod, aLangURL, aZipDir); aIndexer.indexDocuments(); if( bIsWriteAccess ) diff --git a/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.component b/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.component deleted file mode 100755 index fbe7828fb07a..000000000000 --- a/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.component +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - diff --git a/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx b/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx deleted file mode 100644 index 40ee9be82bbd..000000000000 --- a/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx +++ /dev/null @@ -1,164 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * Version: MPL 1.1 / GPLv3+ / LGPLv3+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2010 Red Hat, Inc., Caolán McNamara - * (initial developer) - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 3 or later (the "GPLv3+"), or - * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), - * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable - * instead of those above. - */ - -#include -#include -#include -#include - -using namespace com::sun::star::beans; -using namespace com::sun::star::reflection; -using namespace com::sun::star::script; -using namespace com::sun::star::lang; -using namespace com::sun::star::uno; -using namespace cppu; -using namespace rtl; - -class CLuceneHelpWrapper : public WeakImplHelper2 -{ -public: - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (RuntimeException); - - virtual sal_Bool SAL_CALL supportsService(const OUString&) - throw (RuntimeException); - - virtual Sequence< OUString > SAL_CALL - getSupportedServiceNames() throw (RuntimeException); - - // XInvocation - virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection(void) throw( RuntimeException ) - { - return Reference< XIntrospectionAccess >(); - } - virtual Any SAL_CALL invoke(const OUString& FunctionName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam) - throw( IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException ); - virtual void SAL_CALL setValue(const OUString&, const Any&) - throw( UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException ) - { - throw UnknownPropertyException(); - } - virtual Any SAL_CALL getValue(const OUString&) throw( UnknownPropertyException, RuntimeException ) - { - throw UnknownPropertyException(); - } - virtual sal_Bool SAL_CALL hasMethod(const OUString& rName) throw( RuntimeException ) - { - return rName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("search")) - || rName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("createIndex")); - } - virtual sal_Bool SAL_CALL hasProperty(const OUString&) throw( RuntimeException ) - { - return sal_False; - } -}; - -#include // FIXME: remove once the fprintf() calls below are gone - -Any CLuceneHelpWrapper::invoke(const OUString& rFunctionName, const Sequence< Any >&, Sequence< sal_Int16 >&, Sequence< Any >& ) - throw( IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException ) -{ - fprintf(stderr, "invoke something or other, %s\n", rtl::OUStringToOString(rFunctionName, RTL_TEXTENCODING_UTF8).getStr()); - if (rFunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("search"))) - fprintf(stderr, "implement me, do search thing from helpsearch.cxx here"); - else if (rFunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("createIndex"))) - fprintf(stderr, "implement me, do indexing thing for extensions with help, but without pre-created index, make need to split l10ntools HelpIndexer tool into a lib and header that we can link to here"); - else - throw IllegalArgumentException(); - return Any(); -} - -namespace -{ - Reference create( Reference const & /*xContext*/ ) - { - return static_cast< ::cppu::OWeakObject * >(new CLuceneHelpWrapper); - } - - OUString getImplName() - { - return OUString(RTL_CONSTASCII_USTRINGPARAM("libreoffice.CLuceneWrapper")); - } - - Sequence< OUString > getSuppServices() - { - OUString sHelpIndexer(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.help.HelpIndexer")); - OUString sHelpSearch(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.help.HelpSearch")); - Sequence< OUString > aServiceNames(2); - aServiceNames[0] = sHelpIndexer; - aServiceNames[1] = sHelpSearch; - return aServiceNames; - } -} - -OUString CLuceneHelpWrapper::getImplementationName() - throw (RuntimeException) -{ - return getImplName(); -} - -sal_Bool CLuceneHelpWrapper::supportsService(const OUString& rService) - throw (RuntimeException) -{ - Sequence names(getSupportedServiceNames()); - for (sal_Int32 i = 0; i < names.getLength(); ++i) - { - if (names[i] == rService) - return true; - } - return false; -} - -Sequence< OUString > CLuceneHelpWrapper::getSupportedServiceNames() - throw (RuntimeException) -{ - return getSuppServices(); -} - -namespace -{ - static ::cppu::ImplementationEntry const entries[] = { - { create, - getImplName, - getSuppServices, - ::cppu::createSingleComponentFactory, 0, 0 }, - { 0, 0, 0, 0, 0, 0 } - }; -} - -extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( - char const * pImplName, void * pServiceManager, void * pRegistryKey) -{ - return cppu::component_getFactoryHelper( - pImplName, pServiceManager, pRegistryKey, entries); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlhelp/source/helpcomponent/makefile.mk b/xmlhelp/source/helpcomponent/makefile.mk deleted file mode 100755 index 18cf4dc16eb0..000000000000 --- a/xmlhelp/source/helpcomponent/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -#************************************************************************* -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# Major Contributor(s): -# Copyright (C) 2012 Red Hat, Inc., Caolán McNamara -# (initial developer) -# -# All Rights Reserved. -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. -#************************************************************************* - -PRJ = ..$/..$/ -PRJNAME = xmlhelp -TARGET = CLuceneHelpWrapper -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : settings.mk - -SLOFILES=\ - $(SLO)$/CLuceneHelpWrapper.obj - -LIB1TARGET=$(SLB)$/_$(TARGET).lib -LIB1OBJFILES=$(SLOFILES) - -SHL1TARGET=$(TARGET) -SHL1LIBS=$(LIB1TARGET) -SHL1IMPLIB=i$(TARGET) -SHL1STDLIBS=\ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(COMPHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(SALLIB) \ - $(LIBCLUCENE_LIBS) -SHL1VERSIONMAP=$(SOLARENV)/src/component.map - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/CLuceneHelpWrapper.component - -$(MISC)/CLuceneHelpWrapper.component .ERRREMOVE : \ - $(SOLARENV)/bin/createcomponent.xslt CLuceneHelpWrapper.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt CLuceneHelpWrapper.component - -# vim: set noet sw=4 ts=4: -- cgit