diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-09 21:05:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-10 10:09:28 +0000 |
commit | 3c62fbcdd78e472d3dde604eff33be54cb3e21be (patch) | |
tree | 12a45fa393c2ce35a1fdff7efc0a63ef7600b7cd /cui/source | |
parent | ffbd3846d40eaf3dc8e8fa37e57d48ff7da88a5b (diff) |
simplify LocalFileHelper::ConvertURLToPhysicalName
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optinet2.cxx | 12 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index e0c7c7aac574..bcf0c6000a40 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -1422,19 +1422,19 @@ IMPL_LINK( SvxEMailTabPage, FileDialogHdl_Impl, PushButton*, pButton ) FileDialogHelper aHelper( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); - String sPath = aMailerURLED.GetText(); - if ( !sPath.Len() ) - sPath.AppendAscii("/usr/bin"); + rtl::OUString sPath = aMailerURLED.GetText(); + if ( sPath.isEmpty() ) + sPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/usr/bin")); - String sUrl; - ::utl::LocalFileHelper::ConvertPhysicalNameToURL(sPath,sUrl); + rtl::OUString sUrl; + ::utl::LocalFileHelper::ConvertPhysicalNameToURL(sPath, sUrl); aHelper.SetDisplayDirectory(sUrl); aHelper.AddFilter( m_sDefaultFilterName, String::CreateFromAscii("*")); if ( ERRCODE_NONE == aHelper.Execute() ) { sUrl = aHelper.GetPath(); - ::utl::LocalFileHelper::ConvertURLToPhysicalName(sUrl,sPath); + ::utl::LocalFileHelper::ConvertURLToPhysicalName(sUrl, sPath); aMailerURLED.SetText(sPath); } } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 3a27eaace18b..63700aacfc6e 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1470,8 +1470,12 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) // convert URL encodings to UI characters (eg %20 for spaces) String aPhysicalName; - if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( *it, aPhysicalName )) + rtl::OUString sTmp; + if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( *it, sTmp )) + { + aPhysicalName = sTmp; pUIName = &aPhysicalName; + } SvxBrushItem* pBrushItem = new SvxBrushItem(*it, aEmptyStr, GPOS_AREA, SID_ATTR_BRUSH); pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl)); |