1 --- sfx2/source/appl/sfxhelp.cxx.old 2007-07-06 12:16:30.000000000 +0200
2 +++ sfx2/source/appl/sfxhelp.cxx 2007-08-28 21:57:04.000000000 +0200
4 #include <com/sun/star/frame/XModuleManager.hpp>
5 #include <unotools/configmgr.hxx>
6 #include <unotools/configitem.hxx>
7 +#include <unotools/localfilehelper.hxx>
8 #include <svtools/helpopt.hxx>
9 #include <svtools/moduleoptions.hxx>
10 #include <tools/urlobj.hxx>
11 -#include <unotools/configmgr.hxx>
12 #include <ucbhelper/content.hxx>
14 #include <svtools/pathoptions.hxx>
15 @@ -185,13 +188,13 @@ rtl::OUString HelpLocaleString()
16 bool bOk = (aLocale >>= aLocaleStr);
19 - rtl::OUString aBaseInstallPath;
20 - // utl::Bootstrap::PathStatus aBaseLocateResult =
21 - utl::Bootstrap::locateBaseInstallation(aBaseInstallPath);
22 - static const char *szHelpPath = "/help/";
23 + String sBaseHelpPathString;
24 + ::utl::LocalFileHelper::ConvertPhysicalNameToURL( SvtPathOptions().GetHelpPath(), sBaseHelpPathString );
26 + rtl::OUString sBaseHelpPath( sBaseHelpPathString );
27 + sBaseHelpPath += rtl::OUString::createFromAscii("/");
29 - rtl::OUString sHelpPath = aBaseInstallPath +
30 - rtl::OUString::createFromAscii(szHelpPath) + aLocaleStr;
31 + rtl::OUString sHelpPath = sBaseHelpPath + aLocaleStr;
32 osl::DirectoryItem aDirItem;
34 if (!osl::DirectoryItem::get(sHelpPath, aDirItem) == osl::FileBase::E_None)
35 @@ -202,9 +205,8 @@ rtl::OUString HelpLocaleString()
36 if (nSepPos != STRING_NOTFOUND)
39 - sLang = sLang.Copy( 0, nSepPos );
40 - sHelpPath = aBaseInstallPath +
41 - rtl::OUString::createFromAscii(szHelpPath) + sLang;
42 + sLang = sLang.Copy( 0, nSepPos );
43 + sHelpPath = sBaseHelpPath + sLang;
44 if (!osl::DirectoryItem::get(sHelpPath, aDirItem) == osl::FileBase::E_None)
47 --- svtools/source/config/pathoptions.cxx.old 2007-06-27 23:15:56.000000000 +0200
48 +++ svtools/source/config/pathoptions.cxx 2007-08-29 18:11:12.000000000 +0200
49 @@ -348,7 +348,11 @@ const String& SvtPathOptions_Impl::GetPa
51 // These office paths have to be converted to system pathes
52 utl::LocalFileHelper::ConvertURLToPhysicalName( aPathValue, aResult );
53 - aPathValue = aResult;
54 + // FIXME: The initial value (not modified by SetPath) is just a path, so the URL-conversion fails.
55 + // The best solution is to fix the module xmlhelp to accept the URL. Then we could remove
56 + // all these ugly conversions.
57 + if ( aResult.Len() != 0 )
58 + aPathValue = aResult;
61 m_aPathArray[ ePath ] = aPathValue;