diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-04 17:06:38 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-31 16:10:17 +0200 |
commit | 966f40eecfc60f20c309bc2477149442d753763a (patch) | |
tree | ed72f7b3d2fe609696834d47da120eeb4bd1460c /framework/source/dispatch | |
parent | 4830a1bae89a8ed60696503e315ffd42c70dff74 (diff) |
Use hasElements to check Sequence emptiness in [e-i]*
Similar to clang-tidy readability-container-size-empty
Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b
Reviewed-on: https://gerrit.libreoffice.org/71795
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/dispatch')
-rw-r--r-- | framework/source/dispatch/closedispatcher.cxx | 2 | ||||
-rw-r--r-- | framework/source/dispatch/dispatchdisabler.cxx | 2 | ||||
-rw-r--r-- | framework/source/dispatch/interceptionhelper.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 1b9af10a8afc..09023554928e 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -290,7 +290,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, LinkParamNone*, void) // NOTE: There is a race between checking this and connections being created/destroyed before // we close the frame / terminate the app. css::uno::Reference<css::bridge::XBridgeFactory2> bridgeFac( css::bridge::BridgeFactory::create(xContext) ); - bool bHasActiveConnections = bridgeFac->getExistingBridges().getLength() > 0; + bool bHasActiveConnections = bridgeFac->getExistingBridges().hasElements(); // a) If the current frame (where the close dispatch was requested for) does not have // any parent frame ... it will close this frame only. Such frame isn't part of the diff --git a/framework/source/dispatch/dispatchdisabler.cxx b/framework/source/dispatch/dispatchdisabler.cxx index 0ad5932c0251..76fe27d8cf4a 100644 --- a/framework/source/dispatch/dispatchdisabler.cxx +++ b/framework/source/dispatch/dispatchdisabler.cxx @@ -25,7 +25,7 @@ DispatchDisabler::DispatchDisabler(const uno::Reference< uno::XComponentContext void SAL_CALL DispatchDisabler::initialize( const uno::Sequence< uno::Any >& aArguments ) { uno::Sequence< OUString > aDisabledURLs; - if( aArguments.getLength() > 0 && + if( aArguments.hasElements() && ( aArguments[0] >>= aDisabledURLs ) ) { for( sal_Int32 i = 0; i < aDisabledURLs.getLength(); ++i ) diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx index bca143bc92a3..c1ef179b0e69 100644 --- a/framework/source/dispatch/interceptionhelper.cxx +++ b/framework/source/dispatch/interceptionhelper.cxx @@ -57,7 +57,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL InterceptionHelper::queryD { for (auto const& lInterceptionReg : m_lInterceptionRegs) { - if (!lInterceptionReg.lURLPattern.getLength()) + if (!lInterceptionReg.lURLPattern.hasElements()) { // no pattern -> need to ask this guy! xInterceptor = lInterceptionReg.xInterceptor; |