--- xmlhelp/source/cxxhelp/provider/databases.cxx.old	2006-11-01 15:07:23.000000000 +0100
+++ xmlhelp/source/cxxhelp/provider/databases.cxx	2007-08-29 17:54:22.000000000 +0200
@@ -45,6 +45,9 @@
 #ifndef _OSL_THREAD_H_
 #include <osl/thread.h>
 #endif
+#ifndef _OSL_PROCESS_H_
+#include <osl/process.h>
+#endif
 #ifndef _RTL_URI_HXX_
 #include <rtl/uri.hxx>
 #endif
@@ -181,17 +184,21 @@ static bool impl_getZipFile(
         const rtl::OUString & rZipName,
         rtl::OUString & rFileName )
 {
+    rtl::OUString aWorkingDir;
+    osl_getProcessWorkingDir( &aWorkingDir.pData );
     const rtl::OUString *pPathArray = rImagesZipPaths.getArray();
     for ( int i = 0; i < rImagesZipPaths.getLength(); ++i )
     {
-        rFileName = pPathArray[ i ];
-        if ( rFileName.getLength() )
+        rtl::OUString aFileName = pPathArray[ i ];
+        if ( aFileName.getLength() )
         {
-            if ( 1 + rFileName.lastIndexOf( '/' ) != rFileName.getLength() )
+            if ( 1 + aFileName.lastIndexOf( '/' ) != aFileName.getLength() )
             {
-                rFileName += rtl::OUString::createFromAscii( "/" );
+                aFileName += rtl::OUString::createFromAscii( "/" );
             }
-            rFileName += rZipName;
+            aFileName += rZipName;
+            // the icons are not read when the URL is a symlink
+            osl::File::getAbsoluteFileURL( aWorkingDir, aFileName, rFileName );
 
             // test existence
             osl::DirectoryItem aDirItem;
@@ -1044,7 +1051,9 @@ void Databases::cascadingStylesheet( con
 				osl::FileBase::E_None == aFile.open( OpenFlag_Read )                 &&
 				osl::FileBase::E_None == aDirItem.getFileStatus( aStatus ) )
 			{
-				m_nCustomCSSDocLength = int( aStatus.getFileSize() );
+				sal_uInt64 nSize;
+				aFile.getSize( nSize );
+				m_nCustomCSSDocLength = (int)nSize;
 				m_pCustomCSSDoc = new char[ 1 + m_nCustomCSSDocLength ];
 				m_pCustomCSSDoc[ m_nCustomCSSDocLength ] = 0;
 				sal_uInt64 a = m_nCustomCSSDocLength,b = m_nCustomCSSDocLength;
--- xmlhelp/source/treeview/tvread.cxx.old	2006-11-01 14:50:18.000000000 +0100
+++ xmlhelp/source/treeview/tvread.cxx	2007-08-29 17:55:33.000000000 +0200
@@ -789,9 +789,14 @@ ConfigData TVChildTarget::init( const Re
 				rtl::OUString baseName = aFileName.copy(0,idx_).toAsciiLowerCase();
 				if(! showBasic && baseName.compareToAscii("sbasic") == 0 )
 				  continue;
-				
-                configData.filelen[j] = aFileStatus.getFileSize();
-				configData.fileurl[j++] = aFileUrl ;
+
+				osl::File aFile( aFileUrl );
+				if( osl::FileBase::E_None == aFile.open( OpenFlag_Read ) )
+				{
+					aFile.getSize( configData.filelen[j] );
+				        configData.fileurl[j++] = aFileUrl ;
+					aFile.close();
+				}
 			  }
 		  }
 		aDirectory.close();
