[ooo-build-commit] configure.in patches/dev300
René Engelhard
rene at kemper.freedesktop.org
Fri Oct 30 09:11:47 PDT 2009
configure.in | 2
patches/dev300/split-icons-search-usr-share-and-optional-icons.diff | 141 ----------
patches/dev300/split-icons-search-usr-share-and-optional-icons.diff.in | 133 +++++++++
patches/dev300/split-icons-search-usr-share.diff | 139 ---------
patches/dev300/split-icons-search-usr-share.diff.in | 131 +++++++++
5 files changed, 266 insertions(+), 280 deletions(-)
New commits:
commit 9f6428ce55b715d731a8b8226fa22e235a325c93
Author: Rene Engelhard <rene at debian.org>
Date: Fri Oct 30 14:19:25 2009 +0100
make split-icons-search-usr-share* distro-independent
* patches/dev300/split-icons-search-usr-share-and-optional-icons.diff.in: move
* patches/dev300/split-icons-search-usr-share-and-optional-icons.diff: ... here
and just use @libdir@
* patches/dev300/split-icons-search-usr-share.diff.in: move
* patches/dev300/split-icons-search-usr-share.diff: ... here and just use @libdir@
* configure.in: AC_OUTPUT these
diff --git a/configure.in b/configure.in
index bd49167..ce866e8 100644
--- a/configure.in
+++ b/configure.in
@@ -1483,6 +1483,8 @@ bin/Makefile
patches/dev300/system-python-ure-bootstrap.diff
patches/dev300/pyuno-ooodir.diff
patches/dev300/system-python-uno-path.diff
+patches/dev300/split-icons-search-usr-share-and-optional-icons.diff
+patches/dev300/split-icons-search-usr-share.diff
bin/piece/sys-setup
bin/piece/Makefile
desktop/Makefile
diff --git a/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff b/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff
deleted file mode 100644
index a7d9be9..0000000
--- a/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff
+++ /dev/null
@@ -1,141 +0,0 @@
---- vcl/inc/vcl/impimagetree.hxx.old 2009-02-13 19:31:58.000000000 +0100
-+++ vcl/inc/vcl/impimagetree.hxx 2009-02-13 19:42:39.000000000 +0100
-@@ -73,13 +73,18 @@ private:
- typedef std::hash_map<
- rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > IconCache;
-
-+ // we want to search zip files (icons) also in /usr/share/
-+ ::rtl::OUString m_datadir; // /usr/share/
-+ ::rtl::OUString m_libdir; // /usr/lib or /usr/lib64
-+
- rtl::OUString m_style;
- Zips m_zips;
- CheckStyleCache m_checkStyleCache;
- IconCache m_iconCache;
-
- void setStyle(rtl::OUString const & style);
-
-+ void addUrlToZips(const rtl::OUString &url);
- void resetZips();
-
- bool checkStyleCacheLookup(
---- vcl/source/gdi/impimagetree.cxx.old 2009-02-12 14:52:12.000000000 +0100
-+++ vcl/source/gdi/impimagetree.cxx 2009-02-13 19:48:54.000000000 +0100
-@@ -111,7 +111,15 @@ void loadFromStream(
-
- }
-
--ImplImageTree::ImplImageTree() {}
-+ImplImageTree::ImplImageTree()
-+{
-+ m_datadir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
-+#ifdef X86_64
-+ m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib64/" );
-+#else
-+ m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib/" );
-+#endif
-+}
-
- ImplImageTree::~ImplImageTree() {}
-
-@@ -182,6 +190,22 @@ void ImplImageTree::setStyle(rtl::OUStri
- }
- }
-
-+void ImplImageTree::addUrlToZips(const rtl::OUString &url) {
-+ if ( url.getLength() == 0 )
-+ return;
-+ m_zips.push_back(
-+ std::make_pair(
-+ url,
-+ css::uno::Reference< css::container::XNameAccess >()));
-+ sal_Int32 nLibDirPos = url.indexOf( m_libdir );
-+ if ( nLibDirPos >= 0 ) {
-+ m_zips.push_back(
-+ std::make_pair(
-+ url.replaceAt( nLibDirPos, m_libdir.getLength(), m_datadir ),
-+ css::uno::Reference< css::container::XNameAccess >()));
-+ }
-+}
-+
- void ImplImageTree::resetZips() {
- m_zips.clear();
- {
-@@ -196,19 +220,14 @@ void ImplImageTree::resetZips() {
- b.appendAscii(RTL_CONSTASCII_STRINGPARAM("_brand.zip"));
- bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
- OSL_ASSERT(ok); (void) ok;
-- m_zips.push_back(
-- std::make_pair(
-- u.GetMainURL(INetURLObject::NO_DECODE),
-- css::uno::Reference< css::container::XNameAccess >()));
-+ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
- }
- {
- rtl::OUString url(
- RTL_CONSTASCII_USTRINGPARAM(
- "$BRAND_BASE_DIR/share/config/images_brand.zip"));
- rtl::Bootstrap::expandMacros(url);
-- m_zips.push_back(
-- std::make_pair(
-- url, css::uno::Reference< css::container::XNameAccess >()));
-+ addUrlToZips(url);
- }
- {
- rtl::OUString url(
-@@ -222,20 +241,15 @@ void ImplImageTree::resetZips() {
- b.appendAscii(RTL_CONSTASCII_STRINGPARAM(".zip"));
- bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
- OSL_ASSERT(ok); (void) ok;
-- m_zips.push_back(
-- std::make_pair(
-- u.GetMainURL(INetURLObject::NO_DECODE),
-- css::uno::Reference< css::container::XNameAccess >()));
-+ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
- }
- if ( m_style.equals(::rtl::OUString::createFromAscii("default")) )
- {
- rtl::OUString url(
- RTL_CONSTASCII_USTRINGPARAM(
- "$OOO_BASE_DIR/share/config/images.zip"));
- rtl::Bootstrap::expandMacros(url);
-- m_zips.push_back(
-- std::make_pair(
-- url, css::uno::Reference< css::container::XNameAccess >()));
-+ addUrlToZips(url);
- }
- }
-
-diff --git xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/cxxhelp/provider/provider.cxx
-index 6d8240e..d31fdc9 100644
---- xmlhelp/source/cxxhelp/provider/provider.cxx
-+++ xmlhelp/source/cxxhelp/provider/provider.cxx
-@@ -348,7 +348,7 @@ void ContentProvider::init()
- setupextension );
- rtl::OUString vendorshort = vendorname;
-
-- uno::Sequence< rtl::OUString > aImagesZipPaths( 2 );
-+ uno::Sequence< rtl::OUString > aImagesZipPaths( 3 );
- xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" );
-
- rtl::OUString aPath( getKey( xHierAccess, "Path/Current/UserConfig" ) );
-@@ -357,6 +357,19 @@ void ContentProvider::init()
-
- aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/share/config"));
- rtl::Bootstrap::expandMacros(aPath);
-+ aImagesZipPaths[ 2 ] = aPath;
-+
-+ // try also /usr/share and even before /usr/lib
-+ ::rtl::OUString aDataDir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
-+#ifdef X86_64
-+ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib64/" );
-+#else
-+ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib/" );
-+#endif
-+ sal_Int32 nLibDirPos = aPath.indexOf( aLibDir );
-+
-+ if ( nLibDirPos >= 0 )
-+ aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
- aImagesZipPaths[ 1 ] = aPath;
-
- uno::Reference< uno::XComponentContext > xContext;
diff --git a/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff.in b/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff.in
new file mode 100644
index 0000000..a1976a6
--- /dev/null
+++ b/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff.in
@@ -0,0 +1,133 @@
+--- vcl/inc/vcl/impimagetree.hxx.old 2009-02-13 19:31:58.000000000 +0100
++++ vcl/inc/vcl/impimagetree.hxx 2009-02-13 19:42:39.000000000 +0100
+@@ -73,13 +73,18 @@ private:
+ typedef std::hash_map<
+ rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > IconCache;
+
++ // we want to search zip files (icons) also in /usr/share/
++ ::rtl::OUString m_datadir; // /usr/share/
++ ::rtl::OUString m_libdir; // /usr/lib or /usr/lib64
++
+ rtl::OUString m_style;
+ Zips m_zips;
+ CheckStyleCache m_checkStyleCache;
+ IconCache m_iconCache;
+
+ void setStyle(rtl::OUString const & style);
+
++ void addUrlToZips(const rtl::OUString &url);
+ void resetZips();
+
+ bool checkStyleCacheLookup(
+--- vcl/source/gdi/impimagetree.cxx.old 2009-02-12 14:52:12.000000000 +0100
++++ vcl/source/gdi/impimagetree.cxx 2009-02-13 19:48:54.000000000 +0100
+@@ -111,7 +111,11 @@ void loadFromStream(
+
+ }
+
+-ImplImageTree::ImplImageTree() {}
++ImplImageTree::ImplImageTree()
++{
++ m_datadir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
++ m_libdir = ::rtl::OUString::createFromAscii ( "@libdir@/" );
++}
+
+ ImplImageTree::~ImplImageTree() {}
+
+@@ -182,6 +190,22 @@ void ImplImageTree::setStyle(rtl::OUStri
+ }
+ }
+
++void ImplImageTree::addUrlToZips(const rtl::OUString &url) {
++ if ( url.getLength() == 0 )
++ return;
++ m_zips.push_back(
++ std::make_pair(
++ url,
++ css::uno::Reference< css::container::XNameAccess >()));
++ sal_Int32 nLibDirPos = url.indexOf( m_libdir );
++ if ( nLibDirPos >= 0 ) {
++ m_zips.push_back(
++ std::make_pair(
++ url.replaceAt( nLibDirPos, m_libdir.getLength(), m_datadir ),
++ css::uno::Reference< css::container::XNameAccess >()));
++ }
++}
++
+ void ImplImageTree::resetZips() {
+ m_zips.clear();
+ {
+@@ -196,19 +220,14 @@ void ImplImageTree::resetZips() {
+ b.appendAscii(RTL_CONSTASCII_STRINGPARAM("_brand.zip"));
+ bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
+ OSL_ASSERT(ok); (void) ok;
+- m_zips.push_back(
+- std::make_pair(
+- u.GetMainURL(INetURLObject::NO_DECODE),
+- css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ }
+ {
+ rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$BRAND_BASE_DIR/share/config/images_brand.zip"));
+ rtl::Bootstrap::expandMacros(url);
+- m_zips.push_back(
+- std::make_pair(
+- url, css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(url);
+ }
+ {
+ rtl::OUString url(
+@@ -222,20 +241,15 @@ void ImplImageTree::resetZips() {
+ b.appendAscii(RTL_CONSTASCII_STRINGPARAM(".zip"));
+ bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
+ OSL_ASSERT(ok); (void) ok;
+- m_zips.push_back(
+- std::make_pair(
+- u.GetMainURL(INetURLObject::NO_DECODE),
+- css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ }
+ if ( m_style.equals(::rtl::OUString::createFromAscii("default")) )
+ {
+ rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$OOO_BASE_DIR/share/config/images.zip"));
+ rtl::Bootstrap::expandMacros(url);
+- m_zips.push_back(
+- std::make_pair(
+- url, css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(url);
+ }
+ }
+
+diff --git xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/cxxhelp/provider/provider.cxx
+index 6d8240e..d31fdc9 100644
+--- xmlhelp/source/cxxhelp/provider/provider.cxx
++++ xmlhelp/source/cxxhelp/provider/provider.cxx
+@@ -348,7 +348,7 @@ void ContentProvider::init()
+ setupextension );
+ rtl::OUString vendorshort = vendorname;
+
+- uno::Sequence< rtl::OUString > aImagesZipPaths( 2 );
++ uno::Sequence< rtl::OUString > aImagesZipPaths( 3 );
+ xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" );
+
+ rtl::OUString aPath( getKey( xHierAccess, "Path/Current/UserConfig" ) );
+@@ -357,6 +357,14 @@ void ContentProvider::init()
+
+ aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/share/config"));
+ rtl::Bootstrap::expandMacros(aPath);
++ aImagesZipPaths[ 2 ] = aPath;
++
++ // try also /usr/share and even before /usr/lib
++ ::rtl::OUString aDataDir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
++ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "@libdir@/" );
++ sal_Int32 nLibDirPos = aPath.indexOf( aLibDir );
++
++ if ( nLibDirPos >= 0 )
++ aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
+ aImagesZipPaths[ 1 ] = aPath;
+
+ uno::Reference< uno::XComponentContext > xContext;
diff --git a/patches/dev300/split-icons-search-usr-share.diff b/patches/dev300/split-icons-search-usr-share.diff
deleted file mode 100644
index d3950ca..0000000
--- a/patches/dev300/split-icons-search-usr-share.diff
+++ /dev/null
@@ -1,139 +0,0 @@
---- vcl/inc/vcl/impimagetree.hxx.old 2009-02-13 19:31:58.000000000 +0100
-+++ vcl/inc/vcl/impimagetree.hxx 2009-02-13 19:42:39.000000000 +0100
-@@ -73,12 +73,17 @@ private:
- typedef std::hash_map<
- rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > Cache;
-
-+ // we want to search zip files (icons) also in /usr/share/
-+ ::rtl::OUString m_datadir; // /usr/share/
-+ ::rtl::OUString m_libdir; // /usr/lib or /usr/lib64
-+
- rtl::OUString m_style;
- Zips m_zips;
- Cache m_cache;
-
- void setStyle(rtl::OUString const & style);
-
-+ void addUrlToZips(const rtl::OUString &url);
- void resetZips();
-
- bool cacheLookup(
---- vcl/source/gdi/impimagetree.cxx.old 2009-02-12 14:52:12.000000000 +0100
-+++ vcl/source/gdi/impimagetree.cxx 2009-02-13 19:48:54.000000000 +0100
-@@ -111,7 +111,15 @@ void loadFromStream(
-
- }
-
--ImplImageTree::ImplImageTree() {}
-+ImplImageTree::ImplImageTree()
-+{
-+ m_datadir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
-+#ifdef X86_64
-+ m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib64/" );
-+#else
-+ m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib/" );
-+#endif
-+}
-
- ImplImageTree::~ImplImageTree() {}
-
-@@ -182,6 +190,22 @@ void ImplImageTree::setStyle(rtl::OUStri
- }
- }
-
-+void ImplImageTree::addUrlToZips(const rtl::OUString &url) {
-+ if ( url.getLength() == 0 )
-+ return;
-+ m_zips.push_back(
-+ std::make_pair(
-+ url,
-+ css::uno::Reference< css::container::XNameAccess >()));
-+ sal_Int32 nLibDirPos = url.indexOf( m_libdir );
-+ if ( nLibDirPos >= 0 ) {
-+ m_zips.push_back(
-+ std::make_pair(
-+ url.replaceAt( nLibDirPos, m_libdir.getLength(), m_datadir ),
-+ css::uno::Reference< css::container::XNameAccess >()));
-+ }
-+}
-+
- void ImplImageTree::resetZips() {
- m_zips.clear();
- {
-@@ -196,19 +220,14 @@ void ImplImageTree::resetZips() {
- b.appendAscii(RTL_CONSTASCII_STRINGPARAM("_brand.zip"));
- bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
- OSL_ASSERT(ok); (void) ok;
-- m_zips.push_back(
-- std::make_pair(
-- u.GetMainURL(INetURLObject::NO_DECODE),
-- css::uno::Reference< css::container::XNameAccess >()));
-+ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
- }
- {
- rtl::OUString url(
- RTL_CONSTASCII_USTRINGPARAM(
- "$BRAND_BASE_DIR/share/config/images_brand.zip"));
- rtl::Bootstrap::expandMacros(url);
-- m_zips.push_back(
-- std::make_pair(
-- url, css::uno::Reference< css::container::XNameAccess >()));
-+ addUrlToZips(url);
- }
- {
- rtl::OUString url(
-@@ -222,19 +241,14 @@ void ImplImageTree::resetZips() {
- b.appendAscii(RTL_CONSTASCII_STRINGPARAM(".zip"));
- bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
- OSL_ASSERT(ok); (void) ok;
-- m_zips.push_back(
-- std::make_pair(
-- u.GetMainURL(INetURLObject::NO_DECODE),
-- css::uno::Reference< css::container::XNameAccess >()));
-+ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
- }
- {
- rtl::OUString url(
- RTL_CONSTASCII_USTRINGPARAM(
- "$OOO_BASE_DIR/share/config/images.zip"));
- rtl::Bootstrap::expandMacros(url);
-- m_zips.push_back(
-- std::make_pair(
-- url, css::uno::Reference< css::container::XNameAccess >()));
-+ addUrlToZips(url);
- }
- }
-
-diff --git xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/cxxhelp/provider/provider.cxx
-index 6d8240e..d31fdc9 100644
---- xmlhelp/source/cxxhelp/provider/provider.cxx
-+++ xmlhelp/source/cxxhelp/provider/provider.cxx
-@@ -348,7 +348,7 @@ void ContentProvider::init()
- setupextension );
- rtl::OUString vendorshort = vendorname;
-
-- uno::Sequence< rtl::OUString > aImagesZipPaths( 2 );
-+ uno::Sequence< rtl::OUString > aImagesZipPaths( 3 );
- xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" );
-
- rtl::OUString aPath( getKey( xHierAccess, "Path/Current/UserConfig" ) );
-@@ -357,6 +357,19 @@ void ContentProvider::init()
-
- aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/share/config"));
- rtl::Bootstrap::expandMacros(aPath);
-+ aImagesZipPaths[ 2 ] = aPath;
-+
-+ // try also /usr/share and even before /usr/lib
-+ ::rtl::OUString aDataDir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
-+#ifdef X86_64
-+ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib64/" );
-+#else
-+ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib/" );
-+#endif
-+ sal_Int32 nLibDirPos = aPath.indexOf( aLibDir );
-+
-+ if ( nLibDirPos >= 0 )
-+ aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
- aImagesZipPaths[ 1 ] = aPath;
-
- uno::Reference< uno::XComponentContext > xContext;
diff --git a/patches/dev300/split-icons-search-usr-share.diff.in b/patches/dev300/split-icons-search-usr-share.diff.in
new file mode 100644
index 0000000..b1ea6a3
--- /dev/null
+++ b/patches/dev300/split-icons-search-usr-share.diff.in
@@ -0,0 +1,131 @@
+--- vcl/inc/vcl/impimagetree.hxx.old 2009-02-13 19:31:58.000000000 +0100
++++ vcl/inc/vcl/impimagetree.hxx 2009-02-13 19:42:39.000000000 +0100
+@@ -73,12 +73,17 @@ private:
+ typedef std::hash_map<
+ rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > Cache;
+
++ // we want to search zip files (icons) also in /usr/share/
++ ::rtl::OUString m_datadir; // /usr/share/
++ ::rtl::OUString m_libdir; // /usr/lib or /usr/lib64
++
+ rtl::OUString m_style;
+ Zips m_zips;
+ Cache m_cache;
+
+ void setStyle(rtl::OUString const & style);
+
++ void addUrlToZips(const rtl::OUString &url);
+ void resetZips();
+
+ bool cacheLookup(
+--- vcl/source/gdi/impimagetree.cxx.old 2009-02-12 14:52:12.000000000 +0100
++++ vcl/source/gdi/impimagetree.cxx 2009-02-13 19:48:54.000000000 +0100
+@@ -111,7 +111,11 @@ void loadFromStream(
+
+ }
+
+-ImplImageTree::ImplImageTree() {}
++ImplImageTree::ImplImageTree()
++{
++ m_datadir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
++ m_libdir = ::rtl::OUString::createFromAscii ( "@libdir@/" );
++}
+
+ ImplImageTree::~ImplImageTree() {}
+
+@@ -182,6 +190,22 @@ void ImplImageTree::setStyle(rtl::OUStri
+ }
+ }
+
++void ImplImageTree::addUrlToZips(const rtl::OUString &url) {
++ if ( url.getLength() == 0 )
++ return;
++ m_zips.push_back(
++ std::make_pair(
++ url,
++ css::uno::Reference< css::container::XNameAccess >()));
++ sal_Int32 nLibDirPos = url.indexOf( m_libdir );
++ if ( nLibDirPos >= 0 ) {
++ m_zips.push_back(
++ std::make_pair(
++ url.replaceAt( nLibDirPos, m_libdir.getLength(), m_datadir ),
++ css::uno::Reference< css::container::XNameAccess >()));
++ }
++}
++
+ void ImplImageTree::resetZips() {
+ m_zips.clear();
+ {
+@@ -196,19 +220,14 @@ void ImplImageTree::resetZips() {
+ b.appendAscii(RTL_CONSTASCII_STRINGPARAM("_brand.zip"));
+ bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
+ OSL_ASSERT(ok); (void) ok;
+- m_zips.push_back(
+- std::make_pair(
+- u.GetMainURL(INetURLObject::NO_DECODE),
+- css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ }
+ {
+ rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$BRAND_BASE_DIR/share/config/images_brand.zip"));
+ rtl::Bootstrap::expandMacros(url);
+- m_zips.push_back(
+- std::make_pair(
+- url, css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(url);
+ }
+ {
+ rtl::OUString url(
+@@ -222,19 +241,14 @@ void ImplImageTree::resetZips() {
+ b.appendAscii(RTL_CONSTASCII_STRINGPARAM(".zip"));
+ bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
+ OSL_ASSERT(ok); (void) ok;
+- m_zips.push_back(
+- std::make_pair(
+- u.GetMainURL(INetURLObject::NO_DECODE),
+- css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ }
+ {
+ rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$OOO_BASE_DIR/share/config/images.zip"));
+ rtl::Bootstrap::expandMacros(url);
+- m_zips.push_back(
+- std::make_pair(
+- url, css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(url);
+ }
+ }
+
+diff --git xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/cxxhelp/provider/provider.cxx
+index 6d8240e..d31fdc9 100644
+--- xmlhelp/source/cxxhelp/provider/provider.cxx
++++ xmlhelp/source/cxxhelp/provider/provider.cxx
+@@ -348,7 +348,7 @@ void ContentProvider::init()
+ setupextension );
+ rtl::OUString vendorshort = vendorname;
+
+- uno::Sequence< rtl::OUString > aImagesZipPaths( 2 );
++ uno::Sequence< rtl::OUString > aImagesZipPaths( 3 );
+ xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" );
+
+ rtl::OUString aPath( getKey( xHierAccess, "Path/Current/UserConfig" ) );
+@@ -357,6 +357,14 @@ void ContentProvider::init()
+
+ aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/share/config"));
+ rtl::Bootstrap::expandMacros(aPath);
++ aImagesZipPaths[ 2 ] = aPath;
++
++ // try also /usr/share and even before /usr/lib
++ ::rtl::OUString aDataDir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
++ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "@libdir@/" );
++ sal_Int32 nLibDirPos = aPath.indexOf( aLibDir );
++
++ if ( nLibDirPos >= 0 )
++ aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
+ aImagesZipPaths[ 1 ] = aPath;
+
+ uno::Reference< uno::XComponentContext > xContext;
More information about the ooo-build-commit
mailing list