diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-01 14:02:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-01 19:36:39 +0200 |
commit | 9bac19e37f5a432375d24e8f210bb58de9c31bd8 (patch) | |
tree | 5b48512eeef519279895381c90f0e247ee365628 /comphelper/source | |
parent | a2d3b5721fc723608cea13a78ce09f959d0b9b9f (diff) |
loplugin:reducevarscope in comphelper,connectivity
Change-Id: Ia70d4963fb892120cc8f79597b46a8fe67b540a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103762
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/documentinfo.cxx | 3 | ||||
-rw-r--r-- | comphelper/source/misc/instancelocker.cxx | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx index 3b191f956866..044a6d0103fd 100644 --- a/comphelper/source/misc/documentinfo.cxx +++ b/comphelper/source/misc/documentinfo.cxx @@ -66,7 +66,6 @@ namespace comphelper { if ( !_rxDocument.is() ) return sTitle; - OUString sDocURL; try { // 1. ask the model and the controller for their XTitle::getTitle @@ -81,7 +80,7 @@ namespace comphelper { // work around a problem with embedded objects, which sometimes return // private:object as URL - sDocURL = _rxDocument->getURL(); + OUString sDocURL = _rxDocument->getURL(); if ( sDocURL.startsWithIgnoreAsciiCase( "private:" ) ) sDocURL.clear(); diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx index c32747e26514..b942d7ec8329 100644 --- a/comphelper/source/misc/instancelocker.cxx +++ b/comphelper/source/misc/instancelocker.cxx @@ -121,7 +121,6 @@ void SAL_CALL OInstanceLocker::initialize( const uno::Sequence< uno::Any >& aArg uno::Reference< uno::XInterface > xInstance; uno::Reference< embed::XActionsApproval > xApproval; - sal_Int32 nModes = 0; try { @@ -138,6 +137,7 @@ void SAL_CALL OInstanceLocker::initialize( const uno::Sequence< uno::Any >& aArg uno::Reference< uno::XInterface >(), 0 ); + sal_Int32 nModes = 0; if ( !( aArguments[1] >>= nModes ) || ( |