1 --- xmlhelp/source/cxxhelp/provider/databases.cxx.old 2006-11-01 15:07:23.000000000 +0100
2 +++ xmlhelp/source/cxxhelp/provider/databases.cxx 2007-08-29 17:54:22.000000000 +0200
4 // MARKER(update_precomp.py): autogen include statement, do not remove
5 #include "precompiled_xmlhelp.hxx"
7 -#ifndef _VOS_DIAGNOSE_HXX_
8 #include <vos/diagnose.hxx>
10 #include <osl/thread.h>
11 +#include <osl/process.h>
12 #include <rtl/uri.hxx>
13 #include <osl/file.hxx>
14 #include <rtl/memory.h>
15 @@ -181,17 +184,21 @@ static bool impl_getZipFile(
16 const rtl::OUString & rZipName,
17 rtl::OUString & rFileName )
19 + rtl::OUString aWorkingDir;
20 + osl_getProcessWorkingDir( &aWorkingDir.pData );
21 const rtl::OUString *pPathArray = rImagesZipPaths.getArray();
22 for ( int i = 0; i < rImagesZipPaths.getLength(); ++i )
24 - rFileName = pPathArray[ i ];
25 - if ( rFileName.getLength() )
26 + rtl::OUString aFileName = pPathArray[ i ];
27 + if ( aFileName.getLength() )
29 - if ( 1 + rFileName.lastIndexOf( '/' ) != rFileName.getLength() )
30 + if ( 1 + aFileName.lastIndexOf( '/' ) != aFileName.getLength() )
32 - rFileName += rtl::OUString::createFromAscii( "/" );
33 + aFileName += rtl::OUString::createFromAscii( "/" );
35 - rFileName += rZipName;
36 + aFileName += rZipName;
37 + // the icons are not read when the URL is a symlink
38 + osl::File::getAbsoluteFileURL( aWorkingDir, aFileName, rFileName );
41 osl::DirectoryItem aDirItem;
42 @@ -1044,7 +1051,9 @@ void Databases::cascadingStylesheet( con
43 osl::FileBase::E_None == aFile.open( OpenFlag_Read ) &&
44 osl::FileBase::E_None == aDirItem.getFileStatus( aStatus ) )
46 - m_nCustomCSSDocLength = int( aStatus.getFileSize() );
48 + aFile.getSize( nSize );
49 + m_nCustomCSSDocLength = (int)nSize;
50 m_pCustomCSSDoc = new char[ 1 + m_nCustomCSSDocLength ];
51 m_pCustomCSSDoc[ m_nCustomCSSDocLength ] = 0;
52 sal_uInt64 a = m_nCustomCSSDocLength,b = m_nCustomCSSDocLength;
53 --- xmlhelp/source/treeview/tvread.cxx.old 2006-11-01 14:50:18.000000000 +0100
54 +++ xmlhelp/source/treeview/tvread.cxx 2007-08-29 17:55:33.000000000 +0200
55 @@ -789,9 +789,15 @@ ConfigData TVChildTarget::init( const Re
56 rtl::OUString baseName = aFileName.copy(0,idx_).toAsciiLowerCase();
57 if(! showBasic && baseName.compareToAscii("sbasic") == 0 )
60 - configData.vFileLen.push_back( aFileStatus.getFileSize() );
61 - configData.vFileURL.push_back( aFileUrl );
62 + osl::File aFile( aFileUrl );
63 + if( osl::FileBase::E_None == aFile.open( OpenFlag_Read ) )
66 + aFile.getSize( nSize );
67 + configData.vFileLen.push_back( aFileStatus.getFileSize() );
68 + configData.vFileURL.push_back( aFileUrl );