ooo-build r15332 - in trunk: . patches/dev300



Author: pmladek
Date: Fri Feb 13 19:26:11 2009
New Revision: 15332
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15332&view=rev

Log:
2009-02-13  Petr Mladek  <pmladek suse cz>

	* patches/dev300/split-icons-search-usr-share.diff:
	* patches/dev300/split-icons-search-usr-share-m0.diff:
	* patches/dev300/apply: update for ooo310-m1 and enable again



Added:
   trunk/patches/dev300/split-icons-search-usr-share-m0.diff
      - copied unchanged from r15330, /trunk/patches/dev300/split-icons-search-usr-share.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/split-icons-search-usr-share.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Feb 13 19:26:11 2009
@@ -1047,15 +1047,15 @@
 # crazy hack, I am looking forward for the clean upstream fix
 jvmfwk-detect-removed-java.diff, i#83140, n#336242, pmladek
 
-[ NovellOnlyUnix < dev300-m42 < ooo310-m1 ]
+[ NovellOnlyUnix <= dev300-m41 <= ooo310-m0 ]
+split-icons-search-usr-share-m0.diff, n#296502, pmladek
 
+[ NovellOnlyUnix > dev300-m41 > ooo310-m0 ]
 # 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 ;-)
-# FIXME: ooo310-m1 includes another implementation => it needs to rewrite
 split-icons-search-usr-share.diff, n#296502, pmladek
 
-
 [ BrokenSystemNSS ]
 
 # fix build with system libnss installed apart from mozilla

Modified: trunk/patches/dev300/split-icons-search-usr-share.diff
==============================================================================
--- trunk/patches/dev300/split-icons-search-usr-share.diff	(original)
+++ trunk/patches/dev300/split-icons-search-usr-share.diff	Fri Feb 13 19:26:11 2009
@@ -1,107 +1,109 @@
-diff --git vcl/source/gdi/impimagetree.cxx vcl/source/gdi/impimagetree.cxx
-index 807535f..ad999b3 100644
---- vcl/source/gdi/impimagetree.cxx
-+++ vcl/source/gdi/impimagetree.cxx
-@@ -87,6 +87,21 @@ ImplZipAccessor::~ImplZipAccessor()
- 
- // -----------------------------------------------------------------------
- 
-+static void impl_addToZipVector( uno::Reference< ucb::XSimpleFileAccess > xFileAccess,
-+        ::std::vector< ::rtl::OUString > &rURLVector,
-+        const rtl::OUString &rURL, const rtl::OUString &rZipName )
+--- 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()
 +{
-+    if ( rURL.getLength() == 0 || rZipName.getLength() == 0 )
-+        return;
-+
-+    INetURLObject aThemeBrandURL( rURL );
-+    aThemeBrandURL.Append( rZipName );
-+
-+    rtl::OUString aMainURL( aThemeBrandURL.GetMainURL( INetURLObject::NO_DECODE ) );
-+    if ( xFileAccess->exists( aMainURL ) )
-+        rURLVector.push_back( aMainURL );
++    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 ImplZipAccessor::Update( const ::rtl::OUString& rSymbolsStyle )
- {
- #ifdef DEBUG
-@@ -105,57 +120,57 @@ void ImplZipAccessor::Update( const ::rtl::OUString& rSymbolsStyle )
-     rtl::Bootstrap::expandMacros( aBrandPath );
-     rtl::Bootstrap::expandMacros( aOOOPath );
- 
-+    // If we are installed in /usr/lib*/something, we try also
-+    // /usr/share/something
-+    ::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
-+
-+    rtl::OUString aOOOPathInShare;
-+    sal_Int32 nLibDirPos = aOOOPath.indexOf( aLibDir );
-+    if ( nLibDirPos >= 0 )
-+        aOOOPathInShare = aOOOPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
-+
-     // Theme Branding Zip
-     if( rSymbolsStyle.getLength() )
+ void ImplImageTree::resetZips() {
+     m_zips.clear();
      {
--        INetURLObject   aThemeBrandURL( aBrandPath );
-         ::rtl::OUString aThemeBrandZip( aZipFileName );
--
-         ( aThemeBrandZip += ::rtl::OUString::createFromAscii( "_" ) ) += rSymbolsStyle;
-         aThemeBrandZip += ::rtl::OUString::createFromAscii( IMAGES_ZIPFILENAME_BRAND );
-         aThemeBrandZip += ::rtl::OUString::createFromAscii( IMAGES_ZIPFILENAME_SUFFIX );
--        aThemeBrandURL.Append( aThemeBrandZip );
- 
--        if( mxFileAccess->exists( aThemeBrandURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
--            aTmpURLVector.push_back( aThemeBrandURL.GetMainURL( INetURLObject::NO_DECODE ) );
-+        impl_addToZipVector( mxFileAccess, aTmpURLVector, aBrandPath, aThemeBrandZip );
+@@ -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));
      }
- 
-     // Branding Zip
--    INetURLObject   aBrandURL( aBrandPath );
-     ::rtl::OUString aBrandZip( aZipFileName );
--
-     aBrandZip += ::rtl::OUString::createFromAscii( IMAGES_ZIPFILENAME_BRAND );
-     aBrandZip += ::rtl::OUString::createFromAscii( IMAGES_ZIPFILENAME_SUFFIX );
--    aBrandURL.Append( aBrandZip );
- 
--    if( mxFileAccess->exists( aBrandURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
--        aTmpURLVector.push_back( aBrandURL.GetMainURL( INetURLObject::NO_DECODE ) );
-+    impl_addToZipVector( mxFileAccess, aTmpURLVector, aBrandPath, aBrandZip );
- 
-     // Theme Zip
-     if( rSymbolsStyle.getLength() )
      {
--        INetURLObject   aThemeURL( aOOOPath );
-         ::rtl::OUString aThemeZip( aZipFileName );
--
-         ( aThemeZip += ::rtl::OUString::createFromAscii( "_" ) ) += rSymbolsStyle;
-         aThemeZip += ::rtl::OUString::createFromAscii( IMAGES_ZIPFILENAME_SUFFIX );
--        aThemeURL.Append( aThemeZip );
- 
--        if( mxFileAccess->exists( aThemeURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
--            aTmpURLVector.push_back( aThemeURL.GetMainURL( INetURLObject::NO_DECODE ) );
-+        impl_addToZipVector( mxFileAccess, aTmpURLVector, aOOOPath, aThemeZip );
-+        impl_addToZipVector( mxFileAccess, aTmpURLVector, aOOOPathInShare, aThemeZip );
+         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));
      }
- 
-     // Default Zip
-     if( rSymbolsStyle.getLength() )
      {
--        INetURLObject   aDefaultURL( aOOOPath );
-         ::rtl::OUString aDefaultZip( aZipFileName );
--
-         aDefaultZip += ::rtl::OUString::createFromAscii( IMAGES_ZIPFILENAME_SUFFIX );
--        aDefaultURL.Append( aDefaultZip );
- 
--        if( mxFileAccess->exists( aDefaultURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
--            aTmpURLVector.push_back( aDefaultURL.GetMainURL( INetURLObject::NO_DECODE ) );
-+        impl_addToZipVector( mxFileAccess, aTmpURLVector, aOOOPath, aDefaultZip );
-+        impl_addToZipVector( mxFileAccess, aTmpURLVector, aOOOPathInShare, aDefaultZip );
+         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);
      }
+ }
  
-     if( xFactory.is() )
 diff --git xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/cxxhelp/provider/provider.cxx
 index 6d8240e..d31fdc9 100644
 --- xmlhelp/source/cxxhelp/provider/provider.cxx



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]