diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-19 10:43:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-19 10:48:42 +0200 |
commit | 236714e86c1c517d84d38395efabaf6e3793d196 (patch) | |
tree | 32c17d639ef464fba371d7d3a02afac18af8bfdb /sfx2/source/appl | |
parent | e87c08babed9e3ac34908771fc95cab5386f01a2 (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 'sfx2/source/appl')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 26 | ||||
-rw-r--r-- | sfx2/source/appl/linkmgr2.cxx | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index f7b541433c4b..54cd1528c4bb 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/util/XFlushable.hpp> +#include <osl/file.hxx> #include <stdlib.h> #include <vcl/msgbox.hxx> @@ -51,7 +52,6 @@ #include <unotools/pathoptions.hxx> #include <svtools/miscopt.hxx> #include <vcl/toolbox.hxx> -#include <unotools/localfilehelper.hxx> #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/idle.hxx> @@ -448,7 +448,7 @@ bool SfxApplication::GetOptions( SfxItemSet& rSet ) OUString aValue; switch ( nProp ) { - case SvtPathOptions::PATH_ADDIN: ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aPathCfg.GetAddinPath(), aValue ); break; + case SvtPathOptions::PATH_ADDIN: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetAddinPath(), aValue ); break; case SvtPathOptions::PATH_AUTOCORRECT: aValue = aPathCfg.GetAutoCorrectPath(); break; case SvtPathOptions::PATH_AUTOTEXT: aValue = aPathCfg.GetAutoTextPath(); break; case SvtPathOptions::PATH_BACKUP: aValue = aPathCfg.GetBackupPath(); break; @@ -457,15 +457,15 @@ bool SfxApplication::GetOptions( SfxItemSet& rSet ) case SvtPathOptions::PATH_CONFIG: aValue = aPathCfg.GetConfigPath(); break; case SvtPathOptions::PATH_DICTIONARY: aValue = aPathCfg.GetDictionaryPath(); break; case SvtPathOptions::PATH_FAVORITES: aValue = aPathCfg.GetFavoritesPath(); break; - case SvtPathOptions::PATH_FILTER: ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aPathCfg.GetFilterPath(), aValue ); break; + case SvtPathOptions::PATH_FILTER: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetFilterPath(), aValue ); break; case SvtPathOptions::PATH_GALLERY: aValue = aPathCfg.GetGalleryPath(); break; case SvtPathOptions::PATH_GRAPHIC: aValue = aPathCfg.GetGraphicPath(); break; - case SvtPathOptions::PATH_HELP: ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aPathCfg.GetHelpPath(), aValue ); break; + case SvtPathOptions::PATH_HELP: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetHelpPath(), aValue ); break; case SvtPathOptions::PATH_LINGUISTIC: aValue = aPathCfg.GetLinguisticPath(); break; - case SvtPathOptions::PATH_MODULE: ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aPathCfg.GetModulePath(), aValue ); break; + case SvtPathOptions::PATH_MODULE: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetModulePath(), aValue ); break; case SvtPathOptions::PATH_PALETTE: aValue = aPathCfg.GetPalettePath(); break; - case SvtPathOptions::PATH_PLUGIN: ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aPathCfg.GetPluginPath(), aValue ); break; - case SvtPathOptions::PATH_STORAGE: ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aPathCfg.GetStoragePath(), aValue ); break; + case SvtPathOptions::PATH_PLUGIN: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetPluginPath(), aValue ); break; + case SvtPathOptions::PATH_STORAGE: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetStoragePath(), aValue ); break; case SvtPathOptions::PATH_TEMP: aValue = aPathCfg.GetTempPath(); break; case SvtPathOptions::PATH_TEMPLATE: aValue = aPathCfg.GetTemplatePath(); break; case SvtPathOptions::PATH_USERCONFIG: aValue = aPathCfg.GetUserConfigPath(); break; @@ -798,7 +798,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) case SvtPathOptions::PATH_ADDIN: { OUString aTmp; - if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( sValue, aTmp ) ) + if( osl::FileBase::getSystemPathFromFileURL( sValue, aTmp ) == osl::FileBase::E_None ) aPathOptions.SetAddinPath( aTmp ); break; } @@ -814,7 +814,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) case SvtPathOptions::PATH_FILTER: { OUString aTmp; - if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( sValue, aTmp ) ) + if( osl::FileBase::getSystemPathFromFileURL( sValue, aTmp ) == osl::FileBase::E_None ) aPathOptions.SetFilterPath( aTmp ); break; } @@ -823,7 +823,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) case SvtPathOptions::PATH_HELP: { OUString aTmp; - if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( sValue, aTmp ) ) + if( osl::FileBase::getSystemPathFromFileURL( sValue, aTmp ) == osl::FileBase::E_None ) aPathOptions.SetHelpPath( aTmp ); break; } @@ -832,7 +832,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) case SvtPathOptions::PATH_MODULE: { OUString aTmp; - if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( sValue, aTmp ) ) + if( osl::FileBase::getSystemPathFromFileURL( sValue, aTmp ) == osl::FileBase::E_None ) aPathOptions.SetModulePath( aTmp ); break; } @@ -841,7 +841,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) case SvtPathOptions::PATH_PLUGIN: { OUString aTmp; - if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( sValue, aTmp ) ) + if( osl::FileBase::getSystemPathFromFileURL( sValue, aTmp ) == osl::FileBase::E_None ) aPathOptions.SetPluginPath( aTmp ); break; } @@ -849,7 +849,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) case SvtPathOptions::PATH_STORAGE: { OUString aTmp; - if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( sValue, aTmp ) ) + if( osl::FileBase::getSystemPathFromFileURL( sValue, aTmp ) == osl::FileBase::E_None ) aPathOptions.SetStoragePath( aTmp ); break; } diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index 6a934f31c6a8..3fa3e4665fdf 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -34,7 +34,6 @@ #include <svl/stritem.hxx> #include <svl/eitem.hxx> #include <svl/intitem.hxx> -#include <unotools/localfilehelper.hxx> #include <i18nlangtag/languagetag.hxx> #include <sfx2/request.hxx> #include <vcl/dibtools.hxx> @@ -431,7 +430,8 @@ void LinkManager::ReconnectDdeLink(SfxObjectShell& rServer) OUString aTmp; OUString aURL = aFile; - if (utl::LocalFileHelper::ConvertPhysicalNameToURL(aFile, aTmp)) + if (osl::FileBase::getFileURLFromSystemPath(aFile, aTmp) + == osl::FileBase::E_None) aURL = aTmp; if (!aURL.equalsIgnoreAsciiCase(pMed->GetName())) |