ooo-build r11837 - in trunk: . patches/test
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11837 - in trunk: . patches/test
- Date: Thu, 6 Mar 2008 22:18:21 +0000 (GMT)
Author: thorstenb
Date: Thu Mar 6 22:18:20 2008
New Revision: 11837
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11837&view=rev
Log:
* patches/test/sal-relaxed-maxpath.diff: an attempt to relax the
stupid 260 character limit on W32/OS2 path names. At least removes
the limit from those functions not relying on Win32 API.
Added:
trunk/patches/test/sal-relaxed-maxpath.diff
Modified:
trunk/ChangeLog
trunk/patches/test/README
Modified: trunk/patches/test/README
==============================================================================
--- trunk/patches/test/README (original)
+++ trunk/patches/test/README Thu Mar 6 22:18:20 2008
@@ -110,3 +110,9 @@
# in addition to supporting sheet protection options like Excel does.
sc-book-n-sheet-protection-test.diff, kohei
+
+# An attempt to relax the stupid 260 character limit on W32/OS2 path
+# names. At least removes the limit from those functions not relying
+# on Win32 API
+
+sal-relaxed-maxpath.diff, thorsten
\ No newline at end of file
Added: trunk/patches/test/sal-relaxed-maxpath.diff
==============================================================================
--- (empty file)
+++ trunk/patches/test/sal-relaxed-maxpath.diff Thu Mar 6 22:18:20 2008
@@ -0,0 +1,165 @@
+--- sal/osl/os2/file.cxx 2 Nov 2007 12:30:51 -0000 1.4
++++ sal/osl/os2/file.cxx 6 Mar 2008 14:53:47 -0000
+@@ -582,7 +582,7 @@ oslFileError SAL_CALL osl_getDirectoryIt
+ if (osl_File_E_None != error)
+ return error;
+
+- dwPathType = IsValidFilePath( strSysFilePath->buffer, NULL, VALIDATEPATH_NORMAL );
++ dwPathType = IsValidFilePath( strSysFilePath->buffer, VALIDATEPATH_NORMAL );
+
+ if ( dwPathType & PATHTYPE_IS_VOLUME )
+ type = PATHTYPE_VOLUME;
+--- sal/osl/os2/file_url.cxx 25 Sep 2007 09:48:07 -0000 1.3
++++ sal/osl/os2/file_url.cxx 6 Mar 2008 14:53:48 -0000
+@@ -369,7 +369,7 @@ BOOL WINAPI IsValidFilePathComponent(
+ }
+
+ //#####################################################
+-DWORD WINAPI IsValidFilePath(LPCTSTR lpszPath, LPCTSTR *lppError, DWORD dwFlags)
++DWORD WINAPI IsValidFilePath(LPCTSTR lpszPath, DWORD dwFlags)
+ {
+ LPCTSTR lpComponent;
+ BOOL fValid = TRUE;
+@@ -490,19 +490,10 @@ DWORD WINAPI IsValidFilePath(LPCTSTR lps
+ /* If the string behind the backslash is empty, we've done */
+
+ if ( !*lpComponent )
+- lpComponent = NULL;
++ break;
+ }
+ }
+
+- if ( fValid && _tcslen( lpszPath ) >= _MAX_PATH )
+- {
+- fValid = FALSE;
+- lpComponent = lpszPath + _MAX_PATH;
+- }
+-
+- if ( lppError )
+- *lppError = lpComponent;
+-
+ return fValid ? dwPathType : PATHTYPE_ERROR;
+ }
+
+@@ -646,7 +637,7 @@ oslFileError SAL_CALL _osl_getFileURLFro
+ DWORD dwPathType = PATHTYPE_ERROR;
+
+ if (strPath)
+- dwPathType = IsValidFilePath(strPath->buffer, NULL, VALIDATEPATH_ALLOW_RELATIVE);
++ dwPathType = IsValidFilePath(strPath->buffer, VALIDATEPATH_ALLOW_RELATIVE);
+
+ if (dwPathType)
+ {
+@@ -887,14 +878,14 @@ oslFileError SAL_CALL _osl_getSystemPath
+ else
+ rtl_uString_newFromStr_WithLength( &strTempPath, pDecodedURL + nSkip, nDecodedLen - nSkip );
+
+- if ( IsValidFilePath( strTempPath->buffer, NULL, VALIDATEPATH_ALLOW_ELLIPSE ) )
++ if ( IsValidFilePath( strTempPath->buffer, VALIDATEPATH_ALLOW_ELLIPSE ) )
+ nError = osl_File_E_None;
+ }
+ else if ( bAllowRelative ) /* This maybe a relative file URL */
+ {
+ rtl_uString_assign( &strTempPath, strDecodedURL );
+
+- if ( IsValidFilePath( strTempPath->buffer, NULL, VALIDATEPATH_ALLOW_RELATIVE | VALIDATEPATH_ALLOW_ELLIPSE ) )
++ if ( IsValidFilePath( strTempPath->buffer, VALIDATEPATH_ALLOW_RELATIVE | VALIDATEPATH_ALLOW_ELLIPSE ) )
+ nError = osl_File_E_None;
+ }
+ /*
+--- sal/osl/os2/file_url.h 25 Sep 2007 09:51:30 -0000 1.3
++++ sal/osl/os2/file_url.h 6 Mar 2008 14:53:48 -0000
+@@ -136,7 +136,7 @@ typedef enum _PATHTYPE
+ PATHTYPE_FILE
+ } PATHTYPE;
+
+-DWORD WINAPI IsValidFilePath(LPCTSTR, LPCTSTR*, DWORD);
++DWORD WINAPI IsValidFilePath(LPCTSTR, DWORD);
+
+ typedef struct
+ {
+--- sal/osl/w32/file.cxx 24 Jan 2008 14:27:40 -0000 1.14.96.1
++++ sal/osl/w32/file.cxx 6 Mar 2008 14:53:54 -0000
+@@ -232,7 +232,7 @@ namespace /* private */
+ // forward
+ void _osl_warnFile(const char*, rtl_uString*);
+ oslFileError SAL_CALL _osl_getFileURLFromSystemPath(rtl_uString* , rtl_uString**);
+- DWORD WINAPI IsValidFilePath(LPCTSTR, LPCTSTR*, DWORD);
++ DWORD WINAPI IsValidFilePath(LPCTSTR, DWORD);
+ HANDLE WINAPI OpenLogicalDrivesEnum(void);
+ BOOL WINAPI EnumLogicalDrives(HANDLE, LPTSTR);
+ BOOL WINAPI CloseLogicalDrivesEnum(HANDLE);
+@@ -1262,7 +1262,7 @@ namespace /* private */
+ }
+
+ //#####################################################
+- DWORD WINAPI IsValidFilePath(LPCTSTR lpszPath, LPCTSTR *lppError, DWORD dwFlags)
++ DWORD WINAPI IsValidFilePath(LPCTSTR lpszPath, DWORD dwFlags)
+ {
+ LPCTSTR lpComponent;
+ BOOL fValid = TRUE;
+@@ -1383,19 +1383,10 @@ namespace /* private */
+ /* If the string behind the backslash is empty, we've done */
+
+ if ( !*lpComponent )
+- lpComponent = NULL;
++ break;
+ }
+ }
+
+- if ( fValid && _tcslen( lpszPath ) >= MAX_PATH )
+- {
+- fValid = FALSE;
+- lpComponent = lpszPath + MAX_PATH;
+- }
+-
+- if ( lppError )
+- *lppError = lpComponent;
+-
+ return fValid ? dwPathType : PATHTYPE_ERROR;
+ }
+
+@@ -2178,14 +2169,14 @@ namespace /* private */
+ else
+ rtl_uString_newFromStr_WithLength( &strTempPath, pDecodedURL + nSkip, nDecodedLen - nSkip );
+
+- if ( IsValidFilePath( reinterpret_cast<LPCTSTR>(strTempPath->buffer), NULL, VALIDATEPATH_ALLOW_ELLIPSE ) )
++ if ( IsValidFilePath( reinterpret_cast<LPCTSTR>(strTempPath->buffer), VALIDATEPATH_ALLOW_ELLIPSE ) )
+ nError = osl_File_E_None;
+ }
+ else if ( bAllowRelative ) /* This maybe a relative file URL */
+ {
+ rtl_uString_assign( &strTempPath, strDecodedURL );
+
+- if ( IsValidFilePath( reinterpret_cast<LPCTSTR>(strTempPath->buffer), NULL, VALIDATEPATH_ALLOW_RELATIVE | VALIDATEPATH_ALLOW_ELLIPSE ) )
++ if ( IsValidFilePath( reinterpret_cast<LPCTSTR>(strTempPath->buffer), VALIDATEPATH_ALLOW_RELATIVE | VALIDATEPATH_ALLOW_ELLIPSE ) )
+ nError = osl_File_E_None;
+ }
+ /*
+@@ -2219,7 +2210,7 @@ namespace /* private */
+ DWORD dwPathType = PATHTYPE_ERROR;
+
+ if (strPath)
+- dwPathType = IsValidFilePath(reinterpret_cast<LPCTSTR>(strPath->buffer), NULL, VALIDATEPATH_ALLOW_RELATIVE);
++ dwPathType = IsValidFilePath(reinterpret_cast<LPCTSTR>(strPath->buffer), VALIDATEPATH_ALLOW_RELATIVE);
+
+ if (dwPathType)
+ {
+@@ -3083,7 +3074,7 @@ oslFileError SAL_CALL osl_openDirectory(
+ }
+ */
+
+- dwPathType = IsValidFilePath( reinterpret_cast<LPCTSTR>(strSysDirectoryPath->buffer), NULL, VALIDATEPATH_NORMAL );
++ dwPathType = IsValidFilePath( reinterpret_cast<LPCTSTR>(strSysDirectoryPath->buffer), VALIDATEPATH_NORMAL );
+
+ if ( dwPathType & PATHTYPE_IS_SERVER )
+ {
+@@ -3187,7 +3178,7 @@ oslFileError SAL_CALL osl_getDirectoryIt
+ }
+ */
+
+- dwPathType = IsValidFilePath( reinterpret_cast<LPCTSTR>(strSysFilePath->buffer), NULL, VALIDATEPATH_NORMAL );
++ dwPathType = IsValidFilePath( reinterpret_cast<LPCTSTR>(strSysFilePath->buffer), VALIDATEPATH_NORMAL );
+
+ if ( dwPathType & PATHTYPE_IS_VOLUME )
+ type = PATHTYPE_VOLUME;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]