1 --- vcl/inc/vcl/impimagetree.hxx.old 2009-02-13 19:31:58.000000000 +0100
2 +++ vcl/inc/vcl/impimagetree.hxx 2009-02-13 19:42:39.000000000 +0100
3 @@ -73,12 +73,17 @@ private:
5 rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > Cache;
7 + // we want to search zip files (icons) also in /usr/share/
8 + ::rtl::OUString m_datadir; // /usr/share/
9 + ::rtl::OUString m_libdir; // /usr/lib or /usr/lib64
11 rtl::OUString m_style;
15 void setStyle(rtl::OUString const & style);
17 + void addUrlToZips(const rtl::OUString &url);
21 --- vcl/source/gdi/impimagetree.cxx.old 2009-02-12 14:52:12.000000000 +0100
22 +++ vcl/source/gdi/impimagetree.cxx 2009-02-13 19:48:54.000000000 +0100
23 @@ -111,7 +111,15 @@ void loadFromStream(
27 -ImplImageTree::ImplImageTree() {}
28 +ImplImageTree::ImplImageTree()
30 + m_datadir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
32 + m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib64/" );
34 + m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib/" );
38 ImplImageTree::~ImplImageTree() {}
40 @@ -182,6 +190,22 @@ void ImplImageTree::setStyle(rtl::OUStri
44 +void ImplImageTree::addUrlToZips(const rtl::OUString &url) {
45 + if ( url.getLength() == 0 )
50 + css::uno::Reference< css::container::XNameAccess >()));
51 + sal_Int32 nLibDirPos = url.indexOf( m_libdir );
52 + if ( nLibDirPos >= 0 ) {
55 + url.replaceAt( nLibDirPos, m_libdir.getLength(), m_datadir ),
56 + css::uno::Reference< css::container::XNameAccess >()));
60 void ImplImageTree::resetZips() {
63 @@ -196,19 +220,14 @@ void ImplImageTree::resetZips() {
64 b.appendAscii(RTL_CONSTASCII_STRINGPARAM("_brand.zip"));
65 bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
66 OSL_ASSERT(ok); (void) ok;
69 - u.GetMainURL(INetURLObject::NO_DECODE),
70 - css::uno::Reference< css::container::XNameAccess >()));
71 + addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
75 RTL_CONSTASCII_USTRINGPARAM(
76 "$BRAND_BASE_DIR/share/config/images_brand.zip"));
77 rtl::Bootstrap::expandMacros(url);
80 - url, css::uno::Reference< css::container::XNameAccess >()));
85 @@ -222,19 +241,14 @@ void ImplImageTree::resetZips() {
86 b.appendAscii(RTL_CONSTASCII_STRINGPARAM(".zip"));
87 bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
88 OSL_ASSERT(ok); (void) ok;
91 - u.GetMainURL(INetURLObject::NO_DECODE),
92 - css::uno::Reference< css::container::XNameAccess >()));
93 + addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
97 RTL_CONSTASCII_USTRINGPARAM(
98 "$OOO_BASE_DIR/share/config/images.zip"));
99 rtl::Bootstrap::expandMacros(url);
102 - url, css::uno::Reference< css::container::XNameAccess >()));
107 diff --git xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/cxxhelp/provider/provider.cxx
108 index 6d8240e..d31fdc9 100644
109 --- xmlhelp/source/cxxhelp/provider/provider.cxx
110 +++ xmlhelp/source/cxxhelp/provider/provider.cxx
111 @@ -348,7 +348,7 @@ void ContentProvider::init()
113 rtl::OUString vendorshort = vendorname;
115 - uno::Sequence< rtl::OUString > aImagesZipPaths( 2 );
116 + uno::Sequence< rtl::OUString > aImagesZipPaths( 3 );
117 xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" );
119 rtl::OUString aPath( getKey( xHierAccess, "Path/Current/UserConfig" ) );
120 @@ -357,6 +357,19 @@ void ContentProvider::init()
122 aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/share/config"));
123 rtl::Bootstrap::expandMacros(aPath);
124 + aImagesZipPaths[ 2 ] = aPath;
126 + // try also /usr/share and even before /usr/lib
127 + ::rtl::OUString aDataDir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
129 + ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib64/" );
131 + ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib/" );
133 + sal_Int32 nLibDirPos = aPath.indexOf( aLibDir );
135 + if ( nLibDirPos >= 0 )
136 + aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
137 aImagesZipPaths[ 1 ] = aPath;
139 uno::Reference< uno::XComponentContext > xContext;