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 /toolkit | |
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 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/helper/formpdfexport.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index e13b535ea4d0..6a483bacdd17 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -1912,7 +1912,7 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const css::uno::Any for ( auto n = pListBox->GetEntryCount(); n; ) pListBox->SelectEntryPos( --n, false ); - if ( aItems.getLength() ) + if ( aItems.hasElements() ) selectItemsPos( aItems, true ); else pListBox->SetNoSelection(); diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index f7612736efc6..8f7412437667 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -421,7 +421,7 @@ void UnoControl::propertiesChange( const Sequence< PropertyChangeEvent >& rEvent ++pEvents; aEvents.realloc( pEventsEnd - aEvents.getConstArray() ); - if ( !aEvents.getLength() ) + if ( !aEvents.hasElements() ) return; } } diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx index 6668de2abc03..796de3d56a2a 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -585,7 +585,7 @@ namespace toolkitform // get selected items Sequence< sal_Int16 > aSelectIndices; OSL_VERIFY( xModelProps->getPropertyValue("SelectedItems") >>= aSelectIndices ); - if( aSelectIndices.getLength() > 0 ) + if( aSelectIndices.hasElements() ) { pListWidget->SelectedEntries.resize( 0 ); for( sal_Int32 i = 0; i < aSelectIndices.getLength(); i++ ) |