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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/dialogs/hldocntp.cxx | 1 | ||||
-rw-r--r-- | cui/source/dialogs/hldoctp.cxx | 1 | ||||
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 3 | ||||
-rw-r--r-- | cui/source/dialogs/multipat.cxx | 3 | ||||
-rw-r--r-- | cui/source/options/optinet2.cxx | 9 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 5 |
6 files changed, 13 insertions, 9 deletions
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 4581dbad2d45..d0aba8f9cdd7 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -25,7 +25,6 @@ #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/uno/Exception.hpp> -#include <unotools/localfilehelper.hxx> #include <vcl/image.hxx> #include <tools/urlobj.hxx> #include <unotools/pathoptions.hxx> diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 2943637a2a30..c1125c6ba211 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -19,7 +19,6 @@ #include "cuihyperdlg.hxx" #include <osl/file.hxx> -#include <unotools/localfilehelper.hxx> #include <sfx2/filedlghelper.hxx> #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 9764400f5f2e..2107a5c8b234 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + #include <osl/file.hxx> #include <sfx2/frame.hxx> #include <sfx2/viewfrm.hxx> @@ -24,7 +26,6 @@ #include <sfx2/sfxsids.hrc> #include <svl/macitem.hxx> #include <ucbhelper/content.hxx> -#include <unotools/localfilehelper.hxx> #include "cuihyperdlg.hxx" #include "hltpbase.hxx" #include "macroass.hxx" diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 15e9a0b1afd7..c1d3bd5d72d6 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + #include <osl/file.hxx> #include <tools/urlobj.hxx> #include <vcl/msgbox.hxx> @@ -32,7 +34,6 @@ #include <com/sun/star/ui/dialogs/FolderPicker.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> -#include <unotools/localfilehelper.hxx> #include <unotools/pathoptions.hxx> #include "svtools/treelistentry.hxx" diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 59bee66ad0a7..67d5fed7124c 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -43,7 +43,6 @@ #include <sfx2/viewfrm.hxx> #include <unotools/pathoptions.hxx> #include <unotools/securityoptions.hxx> -#include <unotools/localfilehelper.hxx> #include <unotools/extendedsecurityoptions.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -1089,14 +1088,18 @@ IMPL_LINK( SvxEMailTabPage, FileDialogHdl_Impl, PushButton*, pButton ) sPath = "/usr/bin"; OUString sUrl; - ::utl::LocalFileHelper::ConvertPhysicalNameToURL(sPath, sUrl); + osl::FileBase::getFileURLFromSystemPath(sPath, sUrl); aHelper.SetDisplayDirectory(sUrl); aHelper.AddFilter( m_sDefaultFilterName, OUString("*")); if ( ERRCODE_NONE == aHelper.Execute() ) { sUrl = aHelper.GetPath(); - ::utl::LocalFileHelper::ConvertURLToPhysicalName(sUrl, sPath); + if (osl::FileBase::getSystemPathFromFileURL(sUrl, sPath) + != osl::FileBase::E_None) + { + sPath.clear(); + } m_pMailerURLED->SetText(sPath); } } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 753bb9249a47..1c3266c32e0f 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -18,6 +18,7 @@ */ #include <editeng/sizeitem.hxx> +#include <osl/file.hxx> #include <tools/urlobj.hxx> #include <sfx2/app.hxx> #include <sfx2/module.hxx> @@ -45,7 +46,6 @@ #include <sfx2/objsh.hxx> #include <editeng/brushitem.hxx> #include <svx/gallery.hxx> -#include <unotools/localfilehelper.hxx> #include "paragrph.hrc" #include "sfx2/opengrf.hxx" #include <svx/dialmgr.hxx> @@ -309,7 +309,8 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton) // Convert URL encodings to UI characters (e.g. %20 for spaces) OUString aPhysicalName; - if (utl::LocalFileHelper::ConvertURLToPhysicalName(*it, aPhysicalName)) + if (osl::FileBase::getSystemPathFromFileURL(*it, aPhysicalName) + == osl::FileBase::E_None) { pUIName = &aPhysicalName; } |