summaryrefslogtreecommitdiff
path: root/xmlhelp/source/cxxhelp/provider
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2009-09-25 15:27:34 +0200
committersb <sb@openoffice.org>2009-09-25 15:27:34 +0200
commite993d53e2a4bd6fd3eccdb885bd461d59fcec5b5 (patch)
tree27fe95bc9c8fb6c68657abebedf795c2e2c82614 /xmlhelp/source/cxxhelp/provider
parent42345be352f413b571b83d262cc96025a9e8618d (diff)
parentab33e14647ada2a32624fa39ec0ddbbbdc694df5 (diff)
merged in DEV300_m60
Diffstat (limited to 'xmlhelp/source/cxxhelp/provider')
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx20
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx14
2 files changed, 24 insertions, 10 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 5ec3be8a231c..bd8b0dcd9c1b 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -52,6 +52,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/beans/Optional.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/frame/XConfigManager.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
@@ -59,7 +60,8 @@
#include <com/sun/star/script/XInvocation.hpp>
#include <comphelper/locale.hxx>
-#include <xmlhelp/compilehelp.hxx>
+#include <transex3/compilehelp.hxx>
+#include <comphelper/storagehelper.hxx>
#include "databases.hxx"
#include "urlparameter.hxx"
@@ -1080,7 +1082,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const rtl::OUString& ja
zipFile = getInstallPathAsURL() + key;
}
- Sequence< Any > aArguments( 1 );
+ Sequence< Any > aArguments( 2 );
XInputStream_impl* p = new XInputStream_impl( zipFile );
if( p->CtorSuccess() )
@@ -1094,6 +1096,12 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const rtl::OUString& ja
aArguments[ 0 ] <<= zipFile;
}
+ // let ZipPackage be used ( no manifest.xml is required )
+ beans::NamedValue aArg;
+ aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
+ aArg.Value <<= ZIP_STORAGE_FORMAT_STRING;
+ aArguments[ 1 ] <<= aArg;
+
Reference< XInterface > xIfc
= m_xSMgr->createInstanceWithArgumentsAndContext(
rtl::OUString::createFromAscii(
@@ -1862,9 +1870,15 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage
try
{
- Sequence< Any > aArguments( 1 );
+ Sequence< Any > aArguments( 2 );
aArguments[ 0 ] <<= zipFile;
+ // let ZipPackage be used ( no manifest.xml is required )
+ beans::NamedValue aArg;
+ aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
+ aArg.Value <<= ZIP_STORAGE_FORMAT_STRING;
+ aArguments[ 1 ] <<= aArg;
+
Reference< XMultiComponentFactory >xSMgr( m_xContext->getServiceManager(), UNO_QUERY );
Reference< XInterface > xIfc
= xSMgr->createInstanceWithArgumentsAndContext(
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 226fc056a237..b31f124fb005 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -749,8 +749,8 @@ fileMatch(const char * URI) {
}
static int
-pkgMatch(const char * URI) {
- if ((URI != NULL) && !strncmp(URI, "vnd.sun.star.pkg:/", 18))
+zipMatch(const char * URI) {
+ if ((URI != NULL) && !strncmp(URI, "vnd.sun.star.zip:/", 18))
return 1;
return 0;
}
@@ -770,7 +770,7 @@ fileOpen(const char *URI) {
}
static void *
-pkgOpen(const char * /*URI*/) {
+zipOpen(const char * /*URI*/) {
rtl::OUString language,jar,path;
if( ugblData->m_pInitial->get_eid().getLength() )
@@ -855,7 +855,7 @@ helpRead(void * context, char * buffer, int len) {
}
static int
-pkgRead(void * context, char * buffer, int len) {
+zipRead(void * context, char * buffer, int len) {
if( ugblData->m_pInitial->get_eid().getLength() )
{
ugblData->m_pDatabases->popupDocument( ugblData->m_pInitial,&buffer,&len);
@@ -1071,7 +1071,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
ugblData = &userData;
- xmlRegisterInputCallbacks(pkgMatch, pkgOpen, pkgRead, uriClose);
+ xmlRegisterInputCallbacks(zipMatch, zipOpen, zipRead, uriClose);
xmlRegisterInputCallbacks(helpMatch, helpOpen, helpRead, uriClose);
xmlRegisterInputCallbacks(fileMatch, fileOpen, fileRead, fileClose);
//xmlSetStructuredErrorFunc( NULL, (xmlStructuredErrorFunc)StructuredXMLErrorFunction );
@@ -1079,7 +1079,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
xsltStylesheetPtr cur =
xsltParseStylesheetFile((const xmlChar *)xslURLascii.getStr());
- xmlDocPtr doc = xmlParseFile("vnd.sun.star.pkg:/");
+ xmlDocPtr doc = xmlParseFile("vnd.sun.star.zip:/");
xmlDocPtr res = xsltApplyStylesheet(cur, doc, parameter);
if (res)
@@ -1092,7 +1092,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
}
xmlPopInputCallbacks(); //filePatch
xmlPopInputCallbacks(); //helpPatch
- xmlPopInputCallbacks(); //pkgMatch
+ xmlPopInputCallbacks(); //zipMatch
xmlFreeDoc(res);
xmlFreeDoc(doc);
xsltFreeStylesheet(cur);