summaryrefslogtreecommitdiff
path: root/unotools/source/config/pathoptions.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-04 21:29:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-05 05:02:29 +0200
commitf3ff488fd4fb56f178ffbb7b3880dfafdd9d8e9c (patch)
treead5d8b09e36457beaa906a393dce0a67c1686fb1 /unotools/source/config/pathoptions.cxx
parent48a3d6b85e3c2858c281d5f258fcf2120ca84265 (diff)
loplugin:flatten in unotools
Change-Id: I2fad16061bca6dc3e57926863e7a3b71947a8ade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100139 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config/pathoptions.cxx')
-rw-r--r--unotools/source/config/pathoptions.cxx62
1 files changed, 31 insertions, 31 deletions
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index 1896f456a3a8..cb70189aa3dd 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -268,41 +268,41 @@ void SvtPathOptions_Impl::SetPath( SvtPathOptions::Paths ePath, const OUString&
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( ePath < SvtPathOptions::PATH_COUNT )
- {
- OUString aResult;
- OUString aNewValue;
- Any a;
-
- switch ( ePath )
- {
- case SvtPathOptions::PATH_ADDIN:
- case SvtPathOptions::PATH_FILTER:
- case SvtPathOptions::PATH_HELP:
- case SvtPathOptions::PATH_MODULE:
- case SvtPathOptions::PATH_PLUGIN:
- case SvtPathOptions::PATH_STORAGE:
- {
- // These office paths have to be convert back to UCB-URL's
- osl::FileBase::getFileURLFromSystemPath( rNewPath, aResult );
- aNewValue = aResult;
- }
- break;
+ if ( ePath >= SvtPathOptions::PATH_COUNT )
+ return;
- default:
- aNewValue = rNewPath;
- }
+ OUString aResult;
+ OUString aNewValue;
+ Any a;
- // Resubstitution is done by the service itself using the substitution service
- a <<= aNewValue;
- try
- {
- m_xPathSettings->setFastPropertyValue( m_aMapEnumToPropHandle[ static_cast<sal_Int32>(ePath)], a );
- }
- catch (const Exception&)
+ switch ( ePath )
+ {
+ case SvtPathOptions::PATH_ADDIN:
+ case SvtPathOptions::PATH_FILTER:
+ case SvtPathOptions::PATH_HELP:
+ case SvtPathOptions::PATH_MODULE:
+ case SvtPathOptions::PATH_PLUGIN:
+ case SvtPathOptions::PATH_STORAGE:
{
- TOOLS_WARN_EXCEPTION("unotools.config", "SetPath");
+ // These office paths have to be convert back to UCB-URL's
+ osl::FileBase::getFileURLFromSystemPath( rNewPath, aResult );
+ aNewValue = aResult;
}
+ break;
+
+ default:
+ aNewValue = rNewPath;
+ }
+
+ // Resubstitution is done by the service itself using the substitution service
+ a <<= aNewValue;
+ try
+ {
+ m_xPathSettings->setFastPropertyValue( m_aMapEnumToPropHandle[ static_cast<sal_Int32>(ePath)], a );
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("unotools.config", "SetPath");
}
}