summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-05-04 13:33:20 +0000
committerRüdiger Timm <rt@openoffice.org>2006-05-04 13:33:20 +0000
commit4b76748ff1f96eaf408b4e8884cb8870a2c0e466 (patch)
tree79828a83df175b90f4ba3ae4032ec87ec0fab09f /sfx2
parent4f364258612bb5f04746bb7cd3add315566d5165 (diff)
INTEGRATION: CWS pb15 (1.120.22); FILE MERGED
2006/04/26 06:47:04 pb 1.120.22.1: fix: #i64206# impl_isFolder() now catches all Exceptions
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 68fa4078c812..5b214b66ad67 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: filedlghelper.cxx,v $
*
- * $Revision: 1.121 $
+ * $Revision: 1.122 $
*
- * last change: $Author: rt $ $Date: 2006-05-02 16:34:01 $
+ * last change: $Author: rt $ $Date: 2006-05-04 14:33:20 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -132,6 +132,9 @@
#ifndef _VOS_MUTEX_HXX_
#include <vos/mutex.hxx>
#endif
+#ifndef _VOS_SECURITY_HXX_
+#include <vos/security.hxx>
+#endif
#ifndef _SV_CVTGRF_HXX
#include <vcl/cvtgrf.hxx>
@@ -2397,10 +2400,7 @@ static int impl_isFolder( const OUString& rPath )
return 0;
}
- catch ( star::ucb::ContentCreationException const & )
- {
- }
- catch ( star::ucb::InteractiveAugmentedIOException const & )
+ catch ( Exception const & )
{
}
@@ -2432,7 +2432,14 @@ void FileDialogHelper::SetDisplayDirectory( const String& _rPath )
else
{
INetURLObject aObjPathName( _rPath );
- mpImp->displayFolder( aObjPathName.GetMainURL( INetURLObject::NO_DECODE ) );
+ ::rtl::OUString sFolder( aObjPathName.GetMainURL( INetURLObject::NO_DECODE ) );
+ if ( sFolder.getLength() == 0 )
+ {
+ // _rPath is not a valid path -> fallback to home directory
+ NAMESPACE_VOS( OSecurity ) aSecurity;
+ aSecurity.getHomeDir( sFolder );
+ }
+ mpImp->displayFolder( sFolder );
}
}