summaryrefslogtreecommitdiff
path: root/svtools/source/control/filectrl2.cxx
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2002-10-10 07:55:45 +0000
committerMalte Timmermann <mt@openoffice.org>2002-10-10 07:55:45 +0000
commit01f64c434f0e5858cee6e6db903b8fdb2479fb46 (patch)
tree749e675763f17445357c062145a6f06cc010dea4 /svtools/source/control/filectrl2.cxx
parentaea87c0dfaf772c934d1812ff198c70ad9585095 (diff)
#90430# Check if URL is really a file URL
Diffstat (limited to 'svtools/source/control/filectrl2.cxx')
-rw-r--r--svtools/source/control/filectrl2.cxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/svtools/source/control/filectrl2.cxx b/svtools/source/control/filectrl2.cxx
index ccb9440c1c8f..f8142e44270c 100644
--- a/svtools/source/control/filectrl2.cxx
+++ b/svtools/source/control/filectrl2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: filectrl2.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mt $ $Date: 2002-08-22 13:44:16 $
+ * last change: $Author: mt $ $Date: 2002-10-10 08:55:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,8 +114,13 @@ void FileControl::ImplBrowseFile( )
if ( nError == osl_File_E_INVAL )
sFileURL = GetText(); // #97709# Maybe URL is already a file URL...
- // initially set this directory
- xFilePicker->setDisplayDirectory( sFileURL );
+ //#90430# Check if URL is really a file URL
+ ::rtl::OUString aTmp;
+ if ( osl_getSystemPathFromFileURL( sFileURL.pData, &aTmp.pData ) == osl_File_E_None )
+ {
+ // initially set this directory
+ xFilePicker->setDisplayDirectory( sFileURL );
+ }
if ( xFilePicker.is() && xFilePicker->execute() )
{
@@ -135,9 +140,8 @@ void FileControl::ImplBrowseFile( )
else
ShowServiceNotAvailableError( this, sServiceName, sal_True );
}
- catch( const Exception& e )
+ catch( const Exception& )
{
- e; // make compiler happy
DBG_ERROR( "FileControl::ImplBrowseFile: caught an exception while executing the file picker!" );
}
}
@@ -145,6 +149,9 @@ void FileControl::ImplBrowseFile( )
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.2 2002/08/22 13:44:16 mt
+ * #97709# Maybe URL is already a file URL...
+ *
* Revision 1.1 2001/09/04 09:00:26 fs
* initial checkin - exception enabled parts of filectrl.cxx
*