summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-02 13:38:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-04 14:06:14 +0200
commit27f1827afa11ba9c5d912614dc84dd308ecf8b5f (patch)
tree1c1970f9f2d2eacc2c57ccd0fb1b7e8687652241 /unotools
parent2a338d521618333a0630a31b46fd0fc9decbe0e5 (diff)
loplugin:reducevarscope in toolkit..unotools
Change-Id: I439b9f456ac0bfaa3eb9bf17472053bd4787e828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/eventcfg.cxx2
-rw-r--r--unotools/source/config/pathoptions.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index b0e36fc62c4d..819a18576144 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -196,9 +196,9 @@ void GlobalEventConfig_Impl::initBindingInfo()
lMacros[0] = aSetNode + rEventName + aCommandKey;
SAL_INFO("unotools", "reading binding for: " << lMacros[0]);
Sequence< Any > lValues = GetProperties( lMacros );
- OUString sMacroURL;
if( lValues.hasElements() )
{
+ OUString sMacroURL;
lValues[0] >>= sMacroURL;
sal_Int32 startIndex = rEventName.indexOf('\'');
sal_Int32 endIndex = rEventName.lastIndexOf('\'');
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index cb70189aa3dd..eb7d9244a897 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -218,7 +218,6 @@ const OUString& SvtPathOptions_Impl::GetPath( SvtPathOptions::Paths ePath )
try
{
OUString aPathValue;
- OUString aResult;
sal_Int32 nHandle = m_aMapEnumToPropHandle[ static_cast<sal_Int32>(ePath) ];
// Substitution is done by the service itself using the substitution service
@@ -233,6 +232,7 @@ const OUString& SvtPathOptions_Impl::GetPath( SvtPathOptions::Paths ePath )
)
{
// These office paths have to be converted to system pates
+ OUString aResult;
osl::FileBase::getSystemPathFromFileURL( aPathValue, aResult );
aPathValue = aResult;
}