ooo-build r13588 - in trunk: . patches/dev300
- From: jholesovsky svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13588 - in trunk: . patches/dev300
- Date: Fri, 15 Aug 2008 12:13:34 +0000 (UTC)
Author: jholesovsky
Date: Fri Aug 15 12:13:34 2008
New Revision: 13588
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13588&view=rev
Log:
* patches/dev300/split-icons-search-usr-share.diff: Fixed not to crash
when not installed in /usr/lib.
Modified:
trunk/ChangeLog
trunk/patches/dev300/split-icons-search-usr-share.diff
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 Aug 15 12:13:34 2008
@@ -1,10 +1,35 @@
---- vcl/source/gdi/impimagetree.cxx.old 2008-06-16 16:29:33.000000000 +0200
-+++ vcl/source/gdi/impimagetree.cxx 2008-07-02 21:04:02.000000000 +0200
-@@ -105,6 +105,19 @@ void ImplZipAccessor::Update( const ::rt
+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 )
++{
++ 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 );
++}
++
+ 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 );
-+ // try /usr/share
++ // 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/" );
@@ -15,58 +40,72 @@
+ rtl::OUString aOOOPathInShare;
+ sal_Int32 nLibDirPos = aOOOPath.indexOf( aLibDir );
+ if ( nLibDirPos >= 0 )
-+ aOOOPathInShare = aOOOPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
++ aOOOPathInShare = aOOOPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
+
// Theme Branding Zip
if( rSymbolsStyle.getLength() )
{
-@@ -120,6 +133,8 @@ void ImplZipAccessor::Update( const ::rt
- aTmpURLVector.push_back( aThemeBrandURL.GetMainURL( INetURLObject::NO_DECODE ) );
+- 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 );
}
-+
-+
// Branding Zip
- INetURLObject aBrandURL( aBrandPath );
+- INetURLObject aBrandURL( aBrandPath );
::rtl::OUString aBrandZip( aZipFileName );
-@@ -135,27 +150,35 @@ void ImplZipAccessor::Update( const ::rt
+-
+ 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 );
-+ INetURLObject aThemeInShareURL( aOOOPathInShare );
+- INetURLObject aThemeURL( aOOOPath );
::rtl::OUString aThemeZip( aZipFileName );
-
+-
( aThemeZip += ::rtl::OUString::createFromAscii( "_" ) ) += rSymbolsStyle;
aThemeZip += ::rtl::OUString::createFromAscii( IMAGES_ZIPFILENAME_SUFFIX );
- aThemeURL.Append( aThemeZip );
-+ aThemeInShareURL.Append( aThemeZip );
+- aThemeURL.Append( aThemeZip );
- if( mxFileAccess->exists( aThemeURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
- aTmpURLVector.push_back( aThemeURL.GetMainURL( INetURLObject::NO_DECODE ) );
-+ if( mxFileAccess->exists( aThemeInShareURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
-+ aTmpURLVector.push_back( aThemeInShareURL.GetMainURL( INetURLObject::NO_DECODE ) );
+- 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 );
}
// Default Zip
if( rSymbolsStyle.getLength() )
{
- INetURLObject aDefaultURL( aOOOPath );
-+ INetURLObject aDefaultInShareURL( aOOOPath );
+- INetURLObject aDefaultURL( aOOOPath );
::rtl::OUString aDefaultZip( aZipFileName );
-
+-
aDefaultZip += ::rtl::OUString::createFromAscii( IMAGES_ZIPFILENAME_SUFFIX );
- aDefaultURL.Append( aDefaultZip );
-+ aDefaultInShareURL.Append( aDefaultZip );
+- aDefaultURL.Append( aDefaultZip );
- if( mxFileAccess->exists( aDefaultURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
- aTmpURLVector.push_back( aDefaultURL.GetMainURL( INetURLObject::NO_DECODE ) );
-+ if( mxFileAccess->exists( aDefaultInShareURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
-+ aTmpURLVector.push_back( aDefaultInShareURL.GetMainURL( INetURLObject::NO_DECODE ) );
+- 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 );
}
if( xFactory.is() )
---- xmlhelp/source/cxxhelp/provider/provider.cxx.old 2008-07-02 11:35:38.000000000 +0200
-+++ xmlhelp/source/cxxhelp/provider/provider.cxx 2008-08-14 18:27:47.000000000 +0200
+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;
@@ -92,7 +131,7 @@
+ sal_Int32 nLibDirPos = aPath.indexOf( aLibDir );
+
+ if ( nLibDirPos >= 0 )
-+ aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
++ aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
aImagesZipPaths[ 1 ] = aPath;
uno::Reference< uno::XComponentContext > xContext;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]