diff options
Diffstat (limited to 'sal/osl/w32')
-rw-r--r-- | sal/osl/w32/file_url.cxx | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx index 479c1741d785..248529bef9f4 100644 --- a/sal/osl/w32/file_url.cxx +++ b/sal/osl/w32/file_url.cxx @@ -133,75 +133,6 @@ static BOOL IsValidFilePathComponent( lpComponentEnd = lpCurrent; } - /* Test whether the component specifies a device name what is not allowed */ - - // MT: PERFORMANCE: - // This is very expensive. A lot of calls to _tcsicmp. - // in SRC6870m71 67.000 calls of this method while empty office start result into more than 1.500.00 calls of _tcsicmp! - // Possible optimizations - // - Array should be const static - // - Sorted array, use binary search - // - More intelligent check for com1-9, lpt1-9 - // Maybe make szComponent upper case, don't search case insensitive - // Talked to HRO: Could be removed. Shouldn't be used in OOo, and if used for something like a filename, it will lead to an error anyway. - /* - if ( fValid ) - { - LPCWSTR alpDeviceNames[] = - { - TEXT("CON"), - TEXT("PRN"), - TEXT("AUX"), - TEXT("CLOCK$"), - TEXT("NUL"), - TEXT("LPT1"), - TEXT("LPT2"), - TEXT("LPT3"), - TEXT("LPT4"), - TEXT("LPT5"), - TEXT("LPT6"), - TEXT("LPT7"), - TEXT("LPT8"), - TEXT("LPT9"), - TEXT("COM1"), - TEXT("COM2"), - TEXT("COM3"), - TEXT("COM4"), - TEXT("COM5"), - TEXT("COM6"), - TEXT("COM7"), - TEXT("COM8"), - TEXT("COM9") - }; - - WCHAR szComponent[MAX_PATH]; - int nComponentLength; - LPCWSTR lpDot; - int i; - - // A device name with an extension is also invalid - lpDot = _tcschr( lpComponent, '.' ); - - if ( !lpDot || lpDot > lpComponentEnd ) - nComponentLength = lpComponentEnd - lpComponent; - else - nComponentLength = lpDot - lpComponent; - - _tcsncpy( szComponent, lpComponent, nComponentLength ); - szComponent[nComponentLength] = 0; - - for ( i = 0; i < sizeof( alpDeviceNames ) / sizeof(LPCWSTR); i++ ) - { - if ( 0 == _tcsicmp( szComponent, alpDeviceNames[i] ) ) - { - lpComponentEnd = lpComponent; - fValid = FALSE; - break; - } - } - } - */ - if ( fValid ) { // Empty components are not allowed |