[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Sep 30 04:37:54 PDT 2009
patches/dev300/apply | 18 -
patches/dev300/optional-icon-themes.diff | 11
patches/dev300/split-icons-search-usr-share-and-optional-icons.diff | 141 ++++++++++
3 files changed, 158 insertions(+), 12 deletions(-)
New commits:
commit e1317097d458059bac7511a11fcbb1c6f853c28b
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Sep 29 20:28:42 2009 +0200
Allow to apply optional-icon-themes.diff for other distros
* patches/dev300/optional-icon-themes.diff: move the Novell Linux only
split-icons-search-usr-share.diff after this diff
* patches/dev300/split-icons-search-usr-share-and-optional-icons.diff:
keep split-icons-search-usr-share.diff as is for older distributions;
add this new diff to be applied after optional-icon-themes.diff on
openSUSE-11.2
* patches/dev300/apply: update for the above
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 654fb70..fc742b6 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1042,12 +1042,6 @@ scp2-user-config-ooo3.diff, pmladek
# Push fonts into the ps stream always
pushfont-psstream.diff, i#84481, michael
-[ NovellOnlyUnix ]
-# search also /usr/share for icons
-# it is a temporary hack; we should do more clean FHS compliant installation
-# we need a good plan before, though ;-)
-split-icons-search-usr-share.diff, n#296502, pmladek
-
[ BrokenSystemNSS ]
# fix build with system libnss installed apart from mozilla
@@ -2165,6 +2159,18 @@ kde4-kab.diff
# show only the installed icon themes in Tools/Options.../OpenOffice.org/View
optional-icon-themes.diff, i#105062, bnc#529404, pmladek
+[ NovellOnlyUnix and OptionalIconThemes ]
+# search also /usr/share for icons
+# it is a temporary hack; we should do more clean FHS compliant installation
+# we need a good plan before, though ;-)
+split-icons-search-usr-share-and-optional-icons.diff, n#296502, pmladek
+
+[ NovellOnlyUnix and not OptionalIconThemes ]
+# search also /usr/share for icons
+# it is a temporary hack; we should do more clean FHS compliant installation
+# we need a good plan before, though ;-)
+split-icons-search-usr-share.diff, n#296502, pmladek
+
[ ArkOnly ]
SectionOwner => brosenk
diff --git a/patches/dev300/optional-icon-themes.diff b/patches/dev300/optional-icon-themes.diff
index 961df15..5612bca 100644
--- a/patches/dev300/optional-icon-themes.diff
+++ b/patches/dev300/optional-icon-themes.diff
@@ -82,8 +82,8 @@
}
@@ -243,6 +276,7 @@ void ImplImageTree::resetZips() {
- OSL_ASSERT(ok); (void) ok;
- addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ u.GetMainURL(INetURLObject::NO_DECODE),
+ css::uno::Reference< css::container::XNameAccess >()));
}
+ if ( m_style.equals(::rtl::OUString::createFromAscii("default")) )
{
@@ -256,9 +256,9 @@
+ 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/
-@@ -79,14 +84,17 @@ private:
+ rtl::OUString m_style;
+ Zips m_zips;
+@@ -79,13 +84,16 @@ private:
rtl::OUString m_style;
Zips m_zips;
@@ -268,7 +268,6 @@
void setStyle(rtl::OUString const & style);
- void addUrlToZips(const rtl::OUString &url);
void resetZips();
- bool cacheLookup(
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
new file mode 100644
index 0000000..a7d9be9
--- /dev/null
+++ b/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff
@@ -0,0 +1,141 @@
+--- 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;
More information about the ooo-build-commit
mailing list