summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-03-16 13:33:39 +0200
committerTor Lillqvist <tml@collabora.com>2016-03-16 13:39:06 +0200
commit54a679338ee1dab29477d5a491403ff91f98b6dd (patch)
tree4a9ff2e4bcca8d7dc997cd6db9cfe2102e8fcce8 /sal
parent78f0d15893c56d7368ddd7ded4e70f2a3bb9d2f4 (diff)
Remove code that has been commented-out for long
Commented-out in a198aa60a9d346128043e3e65ae82bb8ff670272 in 2005. Change-Id: Id174dae6632fa8d8e9845b06b916a8515cd6acf3
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/file_url.cxx69
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