diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-12-10 14:25:11 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-12-10 14:25:11 +0000 |
commit | 846e75eef7ac735f492cef899cc67bd83365f915 (patch) | |
tree | 9167b91cdbd7a775b1d81b6fecb551d34a2decd8 /desktop/source | |
parent | 92d94fc98efe24059ab8de0ed81ca31af5f8df98 (diff) |
CWS-TOOLING: integrate CWS ab65
2008-12-04 12:15:24 +0100 ab r264832 : #i83626# Removed warning
2008-12-04 12:04:09 +0100 ab r264830 : #i83626# Changed search result score handling
2008-11-28 13:37:09 +0100 ab r264548 : #i83626# Added missing juh.jar
2008-11-26 14:37:07 +0100 ab r264388 : #i83626# Added HelpComponent.java
2008-11-21 13:07:19 +0100 ab r264129 : #i83626# Fixed File URL versus system path confusion that made search operations fail on Unix
2008-11-19 12:22:10 +0100 ab r263978 : #i83627# Removed warning
2008-11-19 12:06:41 +0100 ab r263975 : #i83627# Removed warnings
2008-11-19 11:28:46 +0100 ab r263971 : #i83627# Support images in extension help
2008-11-11 11:48:21 +0100 ab r263551 : #i83626# Full text search in extension help
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/deployment/registry/help/dp_help.cxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index d5effdfa8680..bfd7bff3cb54 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -35,6 +35,7 @@ #include "dp_backend.h" #include "dp_ucb.h" #include "rtl/uri.hxx" +#include "osl/file.hxx" #include "ucbhelper/content.hxx" #include "comphelper/servicedecl.hxx" #include "svtools/inettype.hxx" @@ -44,6 +45,7 @@ #include <com/sun/star/util/XMacroExpander.hpp> #include <com/sun/star/uri/XUriReferenceFactory.hpp> #include <com/sun/star/uri/XVndSunStarExpandUrl.hpp> +#include <com/sun/star/script/XInvocation.hpp> using namespace ::dp_misc; using namespace ::com::sun::star; @@ -258,6 +260,15 @@ void BackendImpl::implProcessHelp makeAny( uno::Exception( aErrStr, oWeakThis ) ) ); } + Reference<XComponentContext> const & xContext = getComponentContext(); + Reference< script::XInvocation > xInvocation; + if( xContext.is() ) + { + xInvocation = Reference< script::XInvocation >( + xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii( + "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY ); + } + // Scan languages Sequence< rtl::OUString > aLanguageFolderSeq = xSFA->getFolderContents( aExpandedHelpURL, true ); sal_Int32 nLangCount = aLanguageFolderSeq.getLength(); @@ -335,6 +346,29 @@ void BackendImpl::implProcessHelp bool bSuccess = compileExtensionHelp( aHelpStr, aLangURL, nXhpFileCount, pXhpFiles, aErrorInfo ); + if( bSuccess && xInvocation.is() ) + { + Sequence<uno::Any> aParamsSeq( 6 ); + + aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) ); + rtl::OUString aLang; // TODO + aLang = rtl::OUString::createFromAscii( "de" ); // TODO + aParamsSeq[1] = uno::makeAny( aLang ); + + aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) ); + aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) ); + + aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) ); + rtl::OUString aSystemPath; + osl::FileBase::getSystemPathFromFileURL( aLangURL, aSystemPath ); + aParamsSeq[5] = uno::makeAny( aSystemPath ); + + Sequence< sal_Int16 > aOutParamIndex; + Sequence< uno::Any > aOutParam; + uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ), + aParamsSeq, aOutParamIndex, aOutParam ); + } + if( !bSuccess ) { USHORT nErrStrId = 0; |