diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-02 22:56:03 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-03 10:08:31 +0200 |
commit | f20810f7829d9f3b7167df316e1303810b746366 (patch) | |
tree | 8a6eb44060c5b4134c24d794e2af3b02b557d885 /shell | |
parent | f1ba393af4f08f8502906c9221f8b6f1be2a7bad (diff) |
Use hasElements to check Sequence emptiness in sfx2..svx
Similar to clang-tidy readability-container-size-empty
Change-Id: Icabd773f3b924d465b33e8581175f1fcf70c282e
Reviewed-on: https://gerrit.libreoffice.org/71704
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/cmdmail/cmdmailmsg.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index 1127e8d47ebe..312d1ad8016c 100644 --- a/shell/source/cmdmail/cmdmailmsg.cxx +++ b/shell/source/cmdmail/cmdmailmsg.cxx @@ -126,16 +126,16 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName ) else if( aName == "to" && !m_aRecipient.isEmpty() ) return makeAny( m_aRecipient ); - else if( aName == "cc" && m_CcRecipients.getLength() ) + else if( aName == "cc" && m_CcRecipients.hasElements() ) return makeAny( m_CcRecipients ); - else if( aName == "bcc" && m_BccRecipients.getLength() ) + else if( aName == "bcc" && m_BccRecipients.hasElements() ) return makeAny( m_BccRecipients ); else if( aName == "subject" && !m_aSubject.isEmpty() ) return makeAny( m_aSubject ); - else if( aName == "attachment" && m_Attachments.getLength() ) + else if( aName == "attachment" && m_Attachments.hasElements() ) return makeAny( m_Attachments ); throw NoSuchElementException("key not found: " + aName, @@ -158,16 +158,16 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( ) if( !m_aRecipient.isEmpty() ) aRet[nItems++] = "to"; - if( m_CcRecipients.getLength() ) + if( m_CcRecipients.hasElements() ) aRet[nItems++] = "cc"; - if( m_BccRecipients.getLength() ) + if( m_BccRecipients.hasElements() ) aRet[nItems++] = "bcc"; if( !m_aSubject.isEmpty() ) aRet[nItems++] = "subject"; - if( m_Attachments.getLength() ) + if( m_Attachments.hasElements() ) aRet[nItems++] = "attachment"; aRet.realloc( nItems ); @@ -187,16 +187,16 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( ) else if( aName == "to" && !m_aRecipient.isEmpty() ) return true; - else if( aName == "cc" && m_CcRecipients.getLength() ) + else if( aName == "cc" && m_CcRecipients.hasElements() ) return true; - else if( aName == "bcc" && m_BccRecipients.getLength() ) + else if( aName == "bcc" && m_BccRecipients.hasElements() ) return true; else if( aName == "subject" && !m_aSubject.isEmpty() ) return true; - else if( aName == "attachment" && m_Attachments.getLength() ) + else if( aName == "attachment" && m_Attachments.hasElements() ) return true; return false; @@ -210,7 +210,7 @@ Type SAL_CALL CmdMailMsg::getElementType( ) sal_Bool SAL_CALL CmdMailMsg::hasElements( ) { - return 0 != getElementNames().getLength(); + return getElementNames().hasElements(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |