summaryrefslogtreecommitdiff
path: root/cui/source/options/optinet2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-17 14:48:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-17 15:50:58 +0200
commit3e57aad962c9d24c535daff893db203314709cfc (patch)
tree5744fcaae69751cdd4174f5da6024ba656e77ccc /cui/source/options/optinet2.cxx
parentbb3ea0ae51bb943f7bb3dca80eee153f9c55c03e (diff)
loplugin:flatten in cui
Change-Id: I0ea0784ab8c4542747da1e15fa7c60c60bccb602 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/options/optinet2.cxx')
-rw-r--r--cui/source/options/optinet2.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 86a0431e03ad..0644d84ec394 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -907,28 +907,28 @@ void SvxEMailTabPage::Reset( const SfxItemSet* )
IMPL_LINK_NOARG(SvxEMailTabPage, FileDialogHdl_Impl, weld::Button&, void)
{
- if (!pImpl->bROProgram)
- {
- FileDialogHelper aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
- OUString sPath = m_xMailerURLED->get_text();
- if ( sPath.isEmpty() )
- sPath = "/usr/bin";
+ if (pImpl->bROProgram)
+ return;
+
+ FileDialogHelper aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
+ OUString sPath = m_xMailerURLED->get_text();
+ if ( sPath.isEmpty() )
+ sPath = "/usr/bin";
- OUString sUrl;
- osl::FileBase::getFileURLFromSystemPath(sPath, sUrl);
- aHelper.SetDisplayDirectory(sUrl);
- aHelper.AddFilter( m_sDefaultFilterName, "*");
+ OUString sUrl;
+ osl::FileBase::getFileURLFromSystemPath(sPath, sUrl);
+ aHelper.SetDisplayDirectory(sUrl);
+ aHelper.AddFilter( m_sDefaultFilterName, "*");
- if ( ERRCODE_NONE == aHelper.Execute() )
+ if ( ERRCODE_NONE == aHelper.Execute() )
+ {
+ sUrl = aHelper.GetPath();
+ if (osl::FileBase::getSystemPathFromFileURL(sUrl, sPath)
+ != osl::FileBase::E_None)
{
- sUrl = aHelper.GetPath();
- if (osl::FileBase::getSystemPathFromFileURL(sUrl, sPath)
- != osl::FileBase::E_None)
- {
- sPath.clear();
- }
- m_xMailerURLED->set_text(sPath);
+ sPath.clear();
}
+ m_xMailerURLED->set_text(sPath);
}
}