[Libreoffice-commits] .: patches/dev300
Fridrich Strba
fridrich at kemper.freedesktop.org
Fri Nov 26 06:10:27 PST 2010
patches/dev300/apply | 3
patches/dev300/xmlhelp-work-with-symlinks.diff | 81 -------------------------
2 files changed, 84 deletions(-)
New commits:
commit d08dd896c94b04cef95f4eec1e1ef1f424934930
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Fri Nov 26 15:09:59 2010 +0100
xmlhelp-work-with-symlinks.diff: migrated to git
i#81138
display help correctly even when the files are symlinks
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 22fcc10..1410bf8 100755
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -352,9 +352,6 @@ jpegc.c.diff, i#80674, n#272574, flr
# check real help path defined in registry instead of the $(instpath)/help
sfx-check-real-help-path.diff, i#81139, pmladek
-# display help correctly even when the files are symlinks
-xmlhelp-work-with-symlinks.diff, i#81138, pmladek
-
localize-pl-cygwin-paths.diff, tml
# make sure that we have mpGraphics
diff --git a/patches/dev300/xmlhelp-work-with-symlinks.diff b/patches/dev300/xmlhelp-work-with-symlinks.diff
deleted file mode 100644
index 0cb8863..0000000
--- a/patches/dev300/xmlhelp-work-with-symlinks.diff
+++ /dev/null
@@ -1,81 +0,0 @@
----
- xmlhelp/source/cxxhelp/provider/databases.cxx | 21 +++++++++++++--------
- xmlhelp/source/treeview/tvread.cxx | 12 +++++++++---
- 2 files changed, 22 insertions(+), 11 deletions(-)
-
-diff --git xmlhelp/source/cxxhelp/provider/databases.cxx xmlhelp/source/cxxhelp/provider/databases.cxx
-index 6693d69..0b0dd48 100644
---- xmlhelp/source/cxxhelp/provider/databases.cxx
-+++ xmlhelp/source/cxxhelp/provider/databases.cxx
-@@ -28,6 +28,7 @@
- #include "db.hxx"
- #include <osl/diagnose.h>
- #include <osl/thread.h>
-+#include <osl/process.h>
- #include <rtl/uri.hxx>
- #include <osl/file.hxx>
- #include <rtl/memory.h>
-@@ -239,17 +238,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(RTL_CONSTASCII_USTRINGPARAM( "/" ));
-+ aFileName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ));
- }
-- 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;
-@@ -1328,7 +1331,9 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language,
- 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;
-diff --git xmlhelp/source/treeview/tvread.cxx xmlhelp/source/treeview/tvread.cxx
-index 02ba6b9..aa399a5 100644
---- xmlhelp/source/treeview/tvread.cxx
-+++ xmlhelp/source/treeview/tvread.cxx
-@@ -781,9 +781,15 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
- rtl::OUString baseName = aFileName.copy(0,idx_).toAsciiLowerCase();
- if(! showBasic && baseName.compareToAscii("sbasic") == 0 )
- continue;
--
-- configData.vFileLen.push_back( aFileStatus.getFileSize() );
-- configData.vFileURL.push_back( aFileUrl );
-+ osl::File aFile( aFileUrl );
-+ if( osl::FileBase::E_None == aFile.open( OpenFlag_Read ) )
-+ {
-+ sal_uInt64 nSize;
-+ aFile.getSize( nSize );
-+ configData.vFileLen.push_back( aFileStatus.getFileSize() );
-+ configData.vFileURL.push_back( aFileUrl );
-+ aFile.close();
-+ }
- }
- }
- aDirectory.close();
---
-1.7.0.1
-
More information about the Libreoffice-commits
mailing list