From 50a03ed5c55c0f0b445f6e0923716d78c35747d5 Mon Sep 17 00:00:00 2001 From: Peter Burow Date: Thu, 14 Dec 2000 14:49:49 +0000 Subject: fix: #81914# INET_PROT_FILE replaced --- svtools/source/config/pathoptions.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'svtools') diff --git a/svtools/source/config/pathoptions.cxx b/svtools/source/config/pathoptions.cxx index 67f85ec30f54..02ecc2c3df42 100644 --- a/svtools/source/config/pathoptions.cxx +++ b/svtools/source/config/pathoptions.cxx @@ -2,9 +2,9 @@ * * $RCSfile: pathoptions.cxx,v $ * - * $Revision: 1.37 $ + * $Revision: 1.38 $ * - * last change: $Author: pb $ $Date: 2000-12-14 08:18:58 $ + * last change: $Author: pb $ $Date: 2000-12-14 15:49:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1454,7 +1454,7 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath ) { sal_Bool bCfg = ( PATH_USERCONFIG == ePath ); bRet = sal_True; - INetURLObject aObj( bCfg ? GetUserConfigPath() : GetUserDictionaryPath(), INET_PROT_FILE ); + INetURLObject aObj( bCfg ? GetUserConfigPath() : GetUserDictionaryPath() ); xub_StrLen i, nCount = aIniFile.GetTokenCount( '/' ); for ( i = 0; i < nCount; ++i ) aObj.insertName( aIniFile.GetToken( i, '/' ) ); @@ -1510,9 +1510,14 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath ) sal_uInt16 i, nIdx = 0, nCount = aPath.GetTokenCount( SEARCHPATH_DELIMITER ); for ( i = 0; i < nCount; ++i ) { - INetURLObject aObj; - aObj.SetSmartProtocol( INET_PROT_FILE ); - aObj.SetSmartURL( aPath.GetToken( 0, SEARCHPATH_DELIMITER, nIdx ) ); + String aPathToken = aPath.GetToken( 0, SEARCHPATH_DELIMITER, nIdx ); + INetURLObject aObj( aPathToken ); + if ( aObj.HasError() ) + { + String aURL; + if ( LocalFileHelper::ConvertPhysicalNameToURL( aPathToken, aURL ) ) + aObj.SetURL( aURL ); + } xub_StrLen i, nCount = aIniFile.GetTokenCount( '/' ); for ( i = 0; i < nCount; ++i ) aObj.insertName( aIniFile.GetToken( i, '/' ) ); -- cgit