summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-05-03 19:51:47 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-12 14:18:12 +0200
commit038e4b3b1e10d072b432cb06234521ae9a262a70 (patch)
tree6fb8087fd6a11fea6440dae91e8419043ad5f784 /sdext
parent7bc6a7187c26690c64acb397e68d921be71e362e (diff)
Use hasElements to check Sequence emptiness in sax..sdext
Similar to clang-tidy readability-container-size-empty Change-Id: If6a567708d3c59355d54933fad23c85195846624 Reviewed-on: https://gerrit.libreoffice.org/71763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/minimizer/fileopendialog.cxx4
-rw-r--r--sdext/source/minimizer/optimizerdialog.cxx4
-rw-r--r--sdext/source/minimizer/optimizerdialogcontrols.cxx4
-rw-r--r--sdext/source/pdfimport/test/tests.cxx2
-rw-r--r--sdext/source/presenter/PresenterTextView.cxx2
5 files changed, 8 insertions, 8 deletions
diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx
index 472951469571..b415a696625e 100644
--- a/sdext/source/minimizer/fileopendialog.cxx
+++ b/sdext/source/minimizer/fileopendialog.cxx
@@ -134,7 +134,7 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext
break;
}
}
- if ( aExtensions.getLength() )
+ if ( aExtensions.hasElements() )
{
// The filter title must be formed in the same way it is
// currently done in the internal implementation:
@@ -166,7 +166,7 @@ void FileOpenDialog::setDefaultName( const OUString& rDefaultName )
OUString FileOpenDialog::getURL() const
{
Sequence< OUString > aFileSeq( mxFilePicker->getSelectedFiles() );
- return aFileSeq.getLength() ? aFileSeq[ 0 ] : OUString();
+ return aFileSeq.hasElements() ? aFileSeq[ 0 ] : OUString();
};
OUString FileOpenDialog::getFilterName() const
{
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index eb9670a31464..61b877e7fa72 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -164,7 +164,7 @@ void OptimizerDialog::UpdateConfiguration()
aAny = getControlProperty( "ListBox0Pg0", "SelectedItems" );
if ( aAny >>= aSelectedItems )
{
- if ( aSelectedItems.getLength() )
+ if ( aSelectedItems.hasElements() )
{
sal_Int16 nSelectedItem = aSelectedItems[ 0 ];
aAny = getControlProperty( "ListBox0Pg0", "StringItemList" );
@@ -184,7 +184,7 @@ void OptimizerDialog::UpdateConfiguration()
if ( !(aAny >>= aSelectedItems) )
return;
- if ( aSelectedItems.getLength() )
+ if ( aSelectedItems.hasElements() )
{
sal_Int16 nSelectedItem = aSelectedItems[ 0 ];
aAny = getControlProperty( "ListBox0Pg3", "StringItemList" );
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index 6d237ddbfb48..f36185f2e515 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -461,7 +461,7 @@ void OptimizerDialog::InitPage1()
DeactivatePage( 1 );
setControlProperty( "CheckBox3Pg3", "State", Any( false ) );
- setControlProperty( "CheckBox3Pg3", "Enabled", Any( aCustomShowList.getLength() != 0 ) );
+ setControlProperty( "CheckBox3Pg3", "Enabled", Any( aCustomShowList.hasElements() ) );
setControlProperty( "ListBox0Pg3", "Enabled", Any( false ) );
UpdateControlStatesPage1();
@@ -646,7 +646,7 @@ void OptimizerDialog::UpdateControlStatesPage4()
Any aAny = getControlProperty( "ListBox0Pg3", "SelectedItems" );
if ( aAny >>= aSelectedItems )
{
- if ( aSelectedItems.getLength() )
+ if ( aSelectedItems.hasElements() )
{
sal_Int16 nSelectedItem = aSelectedItems[ 0 ];
aAny = getControlProperty( "ListBox0Pg3", "StringItemList" );
diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx
index 4cbf870dc28a..aef522b470bd 100644
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -161,7 +161,7 @@ namespace
double start ) override
{
GraphicsContext& rContext( getCurrentContext() );
- if( dashes.getLength() )
+ if( dashes.hasElements() )
comphelper::sequenceToContainer(rContext.DashArray,dashes);
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "line dashing start offset", 0.0, start, 0.000000001 );
}
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index 59350c34f3fa..a11bc4f193e3 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -1173,7 +1173,7 @@ PresenterTextParagraph::Line::Line (
void PresenterTextParagraph::Line::ProvideCellBoxes()
{
- if ( mnLineStartCharacterIndex < mnLineEndCharacterIndex && maCellBoxes.getLength()==0 )
+ if ( mnLineStartCharacterIndex < mnLineEndCharacterIndex && !maCellBoxes.hasElements() )
{
if (mxLayoutedLine.is())
maCellBoxes = mxLayoutedLine->queryInkMeasures();