diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-08-30 16:26:54 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-08-30 16:26:54 +0000 |
commit | 225ffbf999516d3fa7e5b0042bb2fb9cb2be2f28 (patch) | |
tree | 96ebac40def4c36a96507290ed5862fb42695ca0 /xmlhelp | |
parent | b5c5e4b229e7e835eac9525a2ee060ff66408c55 (diff) |
INTEGRATION: CWS help2 (1.16.56); FILE MERGED
2004/08/24 12:31:06 abi 1.16.56.1: pictures now work
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/provider.cxx | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx index dcabfb7131bb..0f0e098ad3b1 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.cxx +++ b/xmlhelp/source/cxxhelp/provider/provider.cxx @@ -2,9 +2,9 @@ * * $RCSfile: provider.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: hr $ $Date: 2003-04-04 17:09:47 $ + * last change: $Author: kz $ $Date: 2004-08-30 17:26:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,7 +66,9 @@ *************************************************************************/ #include <stdio.h> - +#ifndef _OSL_FILE_HXX_ +#include <osl/file.hxx> +#endif #ifndef _VOS_DIAGNOSE_HXX_ #include <vos/diagnose.hxx> #endif @@ -393,7 +395,34 @@ void ContentProvider::init() setupextension ); rtl::OUString vendorshort = vendorname; + + bool found = false; + xHierAccess = getHierAccess( sProvider, + "org.openoffice.Office.Common" ); + rtl::OUString imageZip(getKey(xHierAccess,"Path/Current/UserConfig")); + subst(imageZip); + if(imageZip.getLength()) { + // test existence + if(1+imageZip.lastIndexOf('/') == imageZip.getLength()) + imageZip += rtl::OUString::createFromAscii("images.zip"); + else + imageZip += rtl::OUString::createFromAscii("/images.zip"); + osl::DirectoryItem aDirItem; + if(osl::DirectoryItem::get(imageZip,aDirItem) == osl::FileBase::E_None) + found = true; + } + + if(!found) { + imageZip = getKey(xHierAccess,"Path/Current/Config"); + subst(imageZip); + if(1+imageZip.lastIndexOf('/') == imageZip.getLength()) + imageZip += rtl::OUString::createFromAscii("images.zip"); + else + imageZip += rtl::OUString::createFromAscii("/images.zip"); + } + m_pDatabases = new Databases( instPath, + imageZip, productname, productversion, vendorname, |