diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-02 13:39:20 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-02 13:37:13 +0200 |
commit | deffca13fd8a765ddc518cfcff464cb1b6f5c65a (patch) | |
tree | e1a34de7398b803bca75fc9dcd69985cc8b9fc18 /uui | |
parent | e2abbc0062398ea67cb13cb5b0b7bfdce78e652c (diff) |
Use hasElements to check Sequence emptiness in [t-u]*
Similar to clang-tidy readability-container-size-empty
Change-Id: Idefe55e37f5c837c889548ffe7c5711400012a4d
Reviewed-on: https://gerrit.libreoffice.org/71667
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl-filter.cxx | 2 | ||||
-rw-r--r-- | uui/source/iahndl.cxx | 4 | ||||
-rw-r--r-- | uui/source/passwordcontainer.cxx | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx index 829d761b0d06..64bc7fe7ebc5 100644 --- a/uui/source/iahndl-filter.cxx +++ b/uui/source/iahndl-filter.cxx @@ -200,7 +200,7 @@ handleFilterOptionsRequest_( { } - if( xFilterCFG.is() && rRequest.rProperties.getLength() ) + if( xFilterCFG.is() && rRequest.rProperties.hasElements() ) { try { diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 6680ea4feae7..f0c6cdb67016 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -397,7 +397,7 @@ UUIInteractionHelper::handleRequest_impl( std::vector< OUString > aArguments; uno::Sequence< OUString > sModules = aModSizeException.Names; - if ( sModules.getLength() ) + if ( sModules.hasElements() ) { OUStringBuffer aName; for ( sal_Int32 index=0; index< sModules.getLength(); ++index ) @@ -1142,7 +1142,7 @@ UUIInteractionHelper::handleMacroConfirmRequest( bool bApprove = false; - bool bShowSignatures = aSignInfo.getLength() > 0; + bool bShowSignatures = aSignInfo.hasElements(); uno::Reference<awt::XWindow> xParent = getParentXWindow(); MacroWarning aWarning(Application::GetFrameWeld(xParent), bShowSignatures); diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index ef8fef56a10f..de057886e792 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -61,9 +61,9 @@ bool fillContinuation( } return false; } - else if (aRec.UserList.getLength() != 0) + else if (aRec.UserList.hasElements()) { - if (aRec.UserList[0].Passwords.getLength() == 0) + if (!aRec.UserList[0].Passwords.hasElements()) { // Password sequence can be empty, for instance if master // password was not given (e.g. master pw dialog canceled) @@ -176,7 +176,7 @@ bool PasswordContainerHelper::handleAuthenticationRequest( if ( !rURL.isEmpty() ) aRec = m_xPasswordContainer->find(rURL, xIH1); - if ( aRec.UserList.getLength() == 0 ) + if ( !aRec.UserList.hasElements() ) { // compat: try server name. aRec = m_xPasswordContainer->find(rRequest.ServerName, xIH1); @@ -200,7 +200,7 @@ bool PasswordContainerHelper::handleAuthenticationRequest( aRec = m_xPasswordContainer->findForName( rURL, rRequest.UserName, xIH1); - if ( aRec.UserList.getLength() == 0 ) + if ( !aRec.UserList.hasElements() ) { // compat: try server name. aRec = m_xPasswordContainer->findForName( |