summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-05-04 17:06:38 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-31 16:10:17 +0200
commit966f40eecfc60f20c309bc2477149442d753763a (patch)
treeed72f7b3d2fe609696834d47da120eeb4bd1460c /fpicker
parent4830a1bae89a8ed60696503e315ffd42c70dff74 (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 'fpicker')
-rw-r--r--fpicker/source/office/OfficeControlAccess.cxx2
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx6
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx6
3 files changed, 7 insertions, 7 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index baf8f20f3b23..723d8d3268c5 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -509,7 +509,7 @@ namespace svt
Sequence < OUString > aTemplateList;
_rValue >>= aTemplateList;
- if ( aTemplateList.getLength() )
+ if ( aTemplateList.hasElements() )
{
for ( long i=0; i < aTemplateList.getLength(); i++ )
_pListbox->InsertEntry( aTemplateList[i] );
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 8271b9a302c8..dddd0b8164fc 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -93,7 +93,7 @@ FilterEntry::FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFil
bool FilterEntry::hasSubFilters( ) const
{
- return ( 0 < m_aSubFilters.getLength() );
+ return m_aSubFilters.hasElements();
}
@@ -910,7 +910,7 @@ void SAL_CALL SvtFilePicker::appendFilterGroup( const OUString& sGroupTitle,
// ensure that we have a filter list
OUString sInitialCurrentFilter;
- if ( aFilters.getLength() )
+ if ( aFilters.hasElements() )
sInitialCurrentFilter = aFilters[0].First;
ensureFilterList( sInitialCurrentFilter );
@@ -978,7 +978,7 @@ void SAL_CALL SvtFilePicker::initialize( const Sequence< Any >& _rArguments )
m_nServiceType = TemplateDescription::FILEOPEN_SIMPLE;
- if ( _rArguments.getLength() >= 1 )
+ if ( _rArguments.hasElements() )
{
// compatibility: one argument, type sal_Int16 , specifies the service type
int index = 0;
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index f0491762dde8..c22ebcbf9b3f 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -652,7 +652,7 @@ void RemoteFilesDialog::EnableControls()
UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, Reference< XInteractionHandler>() );
- if( aURLEntries.UserList.getLength() )
+ if( aURLEntries.UserList.hasElements() )
{
m_pAddMenu->EnableItem( "change_password" );
}
@@ -872,7 +872,7 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, void )
UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, xInteractionHandler );
- if( aURLEntries.Url == sUrl && aURLEntries.UserList.getLength() )
+ if( aURLEntries.Url == sUrl && aURLEntries.UserList.hasElements() )
{
OUString sUserName = aURLEntries.UserList[0].UserName;
@@ -914,7 +914,7 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, void )
UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, xInteractionHandler );
- if( aURLEntries.Url == sUrl && aURLEntries.UserList.getLength() )
+ if( aURLEntries.Url == sUrl && aURLEntries.UserList.hasElements() )
{
OUString sUserName = aURLEntries.UserList[0].UserName;