summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-19 10:43:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-08-19 10:48:42 +0200
commit236714e86c1c517d84d38395efabaf6e3793d196 (patch)
tree32c17d639ef464fba371d7d3a02afac18af8bfdb /sd
parente87c08babed9e3ac34908771fc95cab5386f01a2 (diff)
Clean up remaining utl::LocalFileHelper::Convert...
together with 58d68a1bc9146334376206ae7ba8b1a6594a1040 "ConvertURLToSystemPath->getSystemPathFromFileURL" and 28f3464a571a23a2c16bd0980e9021b95d011511 "ConvertSystemPathToURL->getFileURLFromSystemPath," this replaces all those Convert... functionality with direct calls to the corresponding osl::FileBase functions. Change-Id: I2876171cd337a5eb939d25d8cf1e0c1253ff73a7
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/html/htmlex.cxx3
-rw-r--r--sd/source/filter/ppt/pptin.cxx11
-rw-r--r--sd/source/ui/dlg/navigatr.cxx6
-rw-r--r--sd/source/ui/view/sdview4.cxx4
4 files changed, 14 insertions, 10 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 9bef488e8301..21f210c603d0 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -30,7 +30,6 @@
#include <unotools/pathoptions.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <unotools/ucbstreamhelper.hxx>
-#include <unotools/localfilehelper.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
@@ -3209,7 +3208,7 @@ sal_uLong EasyFile::createFileName( const OUString& rURL, OUString& rFileName )
if( aURL.GetProtocol() == INetProtocol::NotValid )
{
OUString aURLStr;
- ::utl::LocalFileHelper::ConvertPhysicalNameToURL( rURL, aURLStr );
+ osl::FileBase::getFileURLFromSystemPath( rURL, aURLStr );
aURL = INetURLObject( aURLStr );
}
DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 735ac0f3ae2c..063c6ec176ce 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -75,7 +75,6 @@
#include <unotools/fltrcfg.hxx>
#include <sfx2/progress.hxx>
-#include <unotools/localfilehelper.hxx>
#include <editeng/editstat.hxx>
#include <unotools/pathoptions.hxx>
#include <sfx2/docfac.hxx>
@@ -1969,7 +1968,8 @@ OUString ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
OUString aStr;
if ( ReadString( aStr ) )
{
- if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aStr, aRetVal ) )
+ if( osl::FileBase::getFileURLFromSystemPath( aStr, aRetVal )
+ == osl::FileBase::E_None )
{
aRetVal = INetURLObject( aRetVal ).GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
}else{
@@ -2065,8 +2065,11 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv
OUString aBaseURL = pDocShell->GetMedium()->GetBaseURL();
OUString aBookmarkURL( pInfo->GetBookmark() );
INetURLObject aURL( pPtr->aTarget );
- if( INetProtocol::NotValid == aURL.GetProtocol() )
- osl::FileBase::getFileURLFromSystemPath( pPtr->aTarget, aBookmarkURL );
+ if( INetProtocol::NotValid == aURL.GetProtocol()
+ && (osl::FileBase::getFileURLFromSystemPath(
+ pPtr->aTarget, aBookmarkURL)
+ != osl::FileBase::E_None) )
+ aBookmarkURL.clear();
if( aBookmarkURL.isEmpty() )
aBookmarkURL = URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pPtr->aTarget, URIHelper::GetMaybeFileHdl(), true );
pInfo->SetBookmark( aBookmarkURL );
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index a52c43c7dd9f..343be422b595 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -17,8 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <osl/file.hxx>
#include <tools/urlobj.hxx>
-#include <unotools/localfilehelper.hxx>
#include <sfx2/imgmgr.hxx>
#include <sfx2/fcontnr.hxx>
#include <svl/eitem.hxx>
@@ -593,7 +595,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
if( aURL.GetProtocol() == INetProtocol::NotValid )
{
OUString aURLStr;
- ::utl::LocalFileHelper::ConvertPhysicalNameToURL( rFileName, aURLStr );
+ osl::FileBase::getFileURLFromSystemPath( rFileName, aURLStr );
aURL = INetURLObject( aURLStr );
}
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index bf55d9439357..1616d619d711 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -18,7 +18,7 @@
*/
#include "View.hxx"
-#include <unotools/localfilehelper.hxx>
+#include <osl/file.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
#include <sfx2/docfilt.hxx>
@@ -418,7 +418,7 @@ IMPL_LINK_NOARG_TYPED(View, DropInsertFileHdl, Idle *, void)
if( aURL.GetProtocol() == INetProtocol::NotValid )
{
OUString aURLStr;
- ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aCurrentDropFile, aURLStr );
+ osl::FileBase::getFileURLFromSystemPath( aCurrentDropFile, aURLStr );
aURL = INetURLObject( aURLStr );
}