From 1ce99678e5647076da3c152f0b7350e5ddd410e4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 18 Aug 2015 15:23:03 +0200 Subject: Simplify from ucbhelper::getSystemPathFromFileURL to osl::FileBase (vnd.sun.star.wfs is long gone) Change-Id: Ica7d972c04cc065ffbd5debf72e1ec3eeb5c6c64 --- unotools/source/ucbhelper/tempfile.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'unotools') diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 4f6628d3ba16..83c3b856fb53 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -120,15 +119,12 @@ OUString ConstructTempDir_Impl( const OUString* pParent ) com::sun::star::ucb::UniversalContentBroker::create( comphelper::getProcessComponentContext() ) ); - // if parent given try to use it - OUString aTmp( *pParent ); - // test for valid filename OUString aRet; - ::osl::FileBase::getFileURLFromSystemPath( - ::ucbhelper::getSystemPathFromFileURL( pBroker, aTmp ), - aRet ); - if ( !aRet.isEmpty() ) + if ((osl::FileBase::getSystemPathFromFileURL(*pParent, aRet) + == osl::FileBase::E_None) + && (osl::FileBase::getFileURLFromSystemPath(aRet, aRet) + == osl::FileBase::E_None)) { ::osl::DirectoryItem aItem; sal_Int32 i = aRet.getLength(); -- cgit