summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-05-01 00:53:03 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-02 09:53:48 +0200
commit855f52ead7fa361b6a73105d1f0086559a8ed5b6 (patch)
tree042fb792f2c64666ef5fa01436ccafd728860eca /vcl/unx/gtk
parent0c434b06a3792a6429fbe718a0231c48597c1ff5 (diff)
Use hasElements to check Sequence emptiness in [v-x]*
Similar to clang-tidy readability-container-size-empty Change-Id: I71e7af4ac3043d8d40922e99f8a4798f0993294c Reviewed-on: https://gerrit.libreoffice.org/71603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/a11y/atktable.cxx2
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx6
-rw-r--r--vcl/unx/gtk/salprn-gtk.cxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx
index 91e526e0d3b8..016d697dce59 100644
--- a/vcl/unx/gtk/a11y/atktable.cxx
+++ b/vcl/unx/gtk/a11y/atktable.cxx
@@ -350,7 +350,7 @@ table_wrapper_get_summary( AtkTable *table )
static gint
convertToGIntArray( const uno::Sequence< ::sal_Int32 >& aSequence, gint **pSelected )
{
- if( aSequence.getLength() )
+ if( aSequence.hasElements() )
{
*pSelected = g_new( gint, aSequence.getLength() );
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 0ed5b6fe7d71..e82674af9040 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -351,7 +351,7 @@ public:
bool FilterEntry::hasSubFilters() const
{
- return( 0 < m_aSubFilters.getLength() );
+ return m_aSubFilters.hasElements();
}
void FilterEntry::getSubFilters( css::uno::Sequence< css::beans::StringPair >& _rSubFilterList )
@@ -633,7 +633,7 @@ void SAL_CALL SalGtkFilePicker::appendFilterGroup( const OUString& /*sGroupTitle
// ensure that we have a filter list
OUString sInitialCurrentFilter;
- if( aFilters.getLength() )
+ if( aFilters.hasElements() )
sInitialCurrentFilter = aFilters[0].First;
ensureFilterVector( sInitialCurrentFilter );
@@ -1580,7 +1580,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
{
// parameter checking
uno::Any aAny;
- if( 0 == aArguments.getLength() )
+ if( !aArguments.hasElements() )
throw lang::IllegalArgumentException(
"no arguments",
static_cast<XFilePicker2*>( this ), 1 );
diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx
index c3be7e405451..feec41bb5b4d 100644
--- a/vcl/unx/gtk/salprn-gtk.cxx
+++ b/vcl/unx/gtk/salprn-gtk.cxx
@@ -429,7 +429,7 @@ GtkPrintDialog::impl_initCustomTab()
//Fix fdo#69381
//Next options if this one is empty
- if ( aOptProp.getLength() == 0)
+ if (!aOptProp.hasElements())
continue;
for (int n = 0; n != aOptProp.getLength(); n++)